SAP CRM数据库表COMM_PR_FRG_ROD的内容分析

Created by Jerry Wang on Oct 06, 2016

You can use the below source code to perform a mass analysis of table COMM_PR_FRG_ROD:

METHOD sales_area_tab_analyze.
DATA: lt_tab TYPE STANDARD TABLE OF comm_pr_frg_rod,
lt_status TYPE STANDARD TABLE OF crm_jest,
lt_prod TYPE STANDARD TABLE OF comm_product,
lt_settype TYPE STANDARD TABLE OF comc_settype.
SELECT * INTO TABLE lt_tab FROM comm_pr_frg_rod WHERE status_object <> space.
DATA(lv_total) = lines( lt_tab ).
SELECT * INTO TABLE lt_status FROM crm_jest FOR ALL ENTRIES IN lt_tab
WHERE objnr = lt_tab-status_object.
SELECT frgtype_guid frgtype_id INTO CORRESPONDING FIELDS OF TABLE lt_settype
FROM comc_settype.
SELECT product_guid product_id INTO CORRESPONDING FIELDS OF TABLE lt_prod
FROM comm_product FOR ALL ENTRIES IN lt_tab WHERE product_guid = lt_tab-product_guid.
LOOP AT lt_tab ASSIGNING FIELD-SYMBOL(<prod>).
APPEND INITIAL LINE TO rt_sales_data ASSIGNING FIELD-SYMBOL(<line>).
READ TABLE lt_prod ASSIGNING FIELD-SYMBOL(<id>) WITH KEY product_guid = <prod>-product_guid.
IF sy-subrc = 0.
<line>-prod_id = <id>-product_id.
ENDIF.
READ TABLE lt_settype ASSIGNING FIELD-SYMBOL(<set>) WITH KEY frgtype_guid = <prod>-fragment_type.
IF sy-subrc = 0.
<line>-settype_id = <set>-frgtype_id.
ENDIF.
READ TABLE lt_status ASSIGNING FIELD-SYMBOL(<status>) WITH KEY objnr = <prod>-status_object.
IF sy-subrc = 0.
<line>-status_value = <status>-stat.
ENDIF.
ENDLOOP.
ENDMETHOD.
types:
BEGIN OF ty_sales_Data,
prod_id TYPE comm_product-product_id,
settype_id TYPE comc_settype-frgtype_id,
status_value TYPE crm_jest-stat,
END OF ty_sales_data .

types:
tt_Sales_Data TYPE STANDARD TABLE OF ty_sales_Data WITH KEY prod_id status_value .
An example of test output:


The text table for status value is:

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

汪子熙 CSDN认证博客专家 前端框架 Node.js SAP
JerryWang,2007年从电子科技大学计算机专业硕士毕业后加入SAP成都研究院工作至今。Jerry是SAP社区导师,SAP中国技术大使。2020年5月下旬,Jerry做了脑部肿瘤的开颅切除手术,对编程和人生又有了新的感悟。
©️2020 CSDN 皮肤主题: 深蓝海洋 设计师: CSDN官方博客 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值