日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

POC of settype read harmonization - using description settype as example

發布時間:2023/12/19 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 POC of settype read harmonization - using description settype as example 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Background introduction

In CRM WebUI, Genil layer will call CRM PRODUCT API CRM_PRODUCT_GETDETAIL_API to retrieve data from database table.

For example, in order to display the description data in WebUI assignment block, settype ID “COMM_PR_SHTEXT” must be passed to parameter IT_REQ_SETTYPES of CRM_PRODUCT_GETDETAIL_API, which will delegate the call to COM_PRODUCT_GETDETAIL_INTERNAL .

In Codeployment scenario, customer will create material in tcode MM01, as a result there will be NO entry for created material in table COMM_PRODUCT. So, verification is needed to check whether the existing logic described above can still work. On the other hand, now the S4 material text read API should finally be called instead.

In summary, a POC is built to check the scenario which should fulfill the following two requirements:

  • The material description read should still work although no corresponding entry exists in table COMM_PRODUCT
  • The S4 Material text read API should be used instead
  • POC Introduction

    POC detail: Q3R/111, execute the following method directly. It will use CRM API to trigger description read, and finally the read will be dispatched to S4 text read API instead.

    The dispatch works because a new function module is configured in settype administrative table COMC_SETTYPE as read operation for settype COMM_PR_SHTEXT in Q3R/111.

    According to Carsten’s slide, we should ensure the description read against other product type ( Financing, Service and IP product ) still works in codeployment scenario. As a result we should have a switch logic based on product type.

    Inside this method ( class ZCL_ERP_MARA_TOOL, method GET_DESCRIPTION ) , the switch is done below:

    Test Result

    Before you test POC, please execute this method first:

    Test is ok. The description maintained in tcode MM02 could successfully be retrieved by CRM_PRODUCT_GETDETAIL_API:

    Jerry’s concern

    In COM_PRODUCT_GETDETAIL_INTERNAL, before dedicated read function module for each settype is called, there is a product anchor check against product guid. If check fails, the following settype read via dedicated read function module will never be executed.

    In codeployment scenario, this anchor read will fail, since now there is no entry for given product guid in table comm_product, and thus these two internal buffers are empty.

    In order to deal with this issue, my solution is to manually fill these two buffers using COM API COM_PRODUCT_CREATEM and COM_PRODUCT_MAINTAIN_SET_CC . The source code could be found from ZCL_ERP_MARA_TOOL~CREATE_ANCHOR_CACHE in Q3R/111. The source code is also listed here:

    method CREATE_ANCHOR_CACHE. rs_cache-PRODUCT_GUID = iv_prod_guid. rs_cache-PRODUCT_ID = 'I042416'. rs_cache-product_type = '01'. CALL FUNCTION 'COM_PRODUCT_CREATEM' CHANGING CS_PRODUCT = rs_cache. CALL FUNCTION 'COM_PRODUCT_MAINTAIN_SET_CC' EXPORTING IV_ACTIVE_PRODUCT_GUID = rs_cache-PRODUCT_GUID IV_INACTIVE_PRODUCT_GUID = rs_cache-PRODUCT_GUID IV_ACTIVE_EXISTS = abap_true IV_INACTIVE_EXISTS = abap_false EXCEPTIONS DOUBLE_ENTRIES = 1 OTHERS = 2. assert SY-SUBRC = 0. endmethod.

    This solution works however I have one concern: will this manual buffer manipulation lead to any side effect ? Since I do not have expertise on AP-MD-PRO, I need to ask related expert for confirmation.

    Problematic scenario

    Suppose we open Material A whose header data is stored in MARA now. Using the approach described in this wiki, in WebUI when customer opens the description assignment block, one entry with ID A is inserted into buffer.
    Later, customer opens another product B with type “02” for example, and makes some changes and clicks save button. At this time, how will the buffer for Material A be handled?
    要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":

    創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

    總結

    以上是生活随笔為你收集整理的POC of settype read harmonization - using description settype as example的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。