欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

SAP CRM销售订单UI上的字段对应的数据库表存储字段:请求开始和结束字段 CRMSAPSAP云平台SAP Cloud PlatformSAP成都研究院 

程序员文章站 2022-06-14 22:34:19
...

Suppose you need to investigate which database table stores the value of Requested start date and end date:

 

SAP CRM销售订单UI上的字段对应的数据库表存储字段:请求开始和结束字段
            
    
    
        CRMSAPSAP云平台SAP Cloud PlatformSAP成都研究院 

 

You can just activate SQL trace via tcode ST05, make changes on either field, and save the change. Then display trace and search with keyword “update”:

 

SAP CRM销售订单UI上的字段对应的数据库表存储字段:请求开始和结束字段
            
    
    
        CRMSAPSAP云平台SAP Cloud PlatformSAP成都研究院 

 

You could find one record whose UPDATE statement contains the changed date you maintained in WebUI, which indicates the table SCAPPTSEG is what we are looking for.

 

SAP CRM销售订单UI上的字段对应的数据库表存储字段:请求开始和结束字段
            
    
    
        CRMSAPSAP云平台SAP Cloud PlatformSAP成都研究院 

 

When we browse this table in SE11, we didn’t know the relationship between APPT_GUID or APPL_GUID with the service order guid.

 

SAP CRM销售订单UI上的字段对应的数据库表存储字段:请求开始和结束字段
            
    
    
        CRMSAPSAP云平台SAP Cloud PlatformSAP成都研究院 

 

We can click the display source code button in ST05:

 

SAP CRM销售订单UI上的字段对应的数据库表存储字段:请求开始和结束字段
            
    
    
        CRMSAPSAP云平台SAP Cloud PlatformSAP成都研究院 

 

And set a breakpoint on the very code where the table is updated. From the callstack we can know the function module CRM_DATES_UPDATE_DU is updating this table.

 

SAP CRM销售订单UI上的字段对应的数据库表存储字段:请求开始和结束字段
            
    
    
        CRMSAPSAP云平台SAP Cloud PlatformSAP成都研究院 

 

Perform where used list on CRM_DATES_UPDATE_DU and we can get CRM_DATES_SAVE_OB,

 

SAP CRM销售订单UI上的字段对应的数据库表存储字段:请求开始和结束字段
            
    
    
        CRMSAPSAP云平台SAP Cloud PlatformSAP成都研究院 

 

then CRM_DATES_SAVE_EC:

 

SAP CRM销售订单UI上的字段对应的数据库表存储字段:请求开始和结束字段
            
    
    
        CRMSAPSAP云平台SAP Cloud PlatformSAP成都研究院 

 

In this function, we can know the relationship between appl_guid and service order guid:

 

SAP CRM销售订单UI上的字段对应的数据库表存储字段:请求开始和结束字段
            
    
    
        CRMSAPSAP云平台SAP Cloud PlatformSAP成都研究院 

 

I use a simple report below to illustrate the process how to get requested start and end date starting from Service order guid:

REPORT zdisplay_request_date.
PARAMETERS: guid TYPE crmt_object_guid OBLIGATORY DEFAULT '00163EA720041EE19BB780506245F081'.
DATA: lt_dates TYPE STANDARD TABLE OF scapptseg,
      lv_link  TYPE crmd_link-guid_set.
START-OF-SELECTION.
  SELECT SINGLE guid_set INTO lv_link FROM crmd_link WHERE guid_hi = guid AND objtype_set = '30'.
  IF sy-subrc <> 0.
    WRITE: / 'no requested data maintained'.
    RETURN.
  ENDIF.
  SELECT * INTO TABLE lt_dates FROM scapptseg WHERE appl_guid = lv_link.
  READ TABLE lt_dates ASSIGNING FIELD-SYMBOL(<start>) WITH KEY appt_type = 'SRV_CUST_BEG'.
  IF sy-subrc = 0.
    WRITE: / 'requested start: ' , <start>-tst_from.
  ENDIF.
  READ TABLE lt_dates ASSIGNING FIELD-SYMBOL(<end>) WITH KEY appt_type = 'SRV_CUST_END'.
  IF sy-subrc = 0.
    WRITE: / 'requested end: ' , <end>-tst_from.
  ENDIF.

Note: “30” means object name “APPOINTMENT”, you can find the relationship from this table CRMC_OBJECTS:

 

SAP CRM销售订单UI上的字段对应的数据库表存储字段:请求开始和结束字段
            
    
    
        CRMSAPSAP云平台SAP Cloud PlatformSAP成都研究院 

 

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

SAP CRM销售订单UI上的字段对应的数据库表存储字段:请求开始和结束字段
            
    
    
        CRMSAPSAP云平台SAP Cloud PlatformSAP成都研究院