且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SAP CRM数据库表CRMD_CUMULAT_H的设计原理

更新时间:2022-09-05 23:22:32

Recently I am working in a project and the prerequisite is to understand how table CRMD_CUMULAT_H works. As I could not find enough material in SCN, I make some self study on it and list my learning in this blog.

Let me use one record for example to illustrate how its GROSS WEIGHT 400 KG is determined.

SAP CRM数据库表CRMD_CUMULAT_H的设计原理

As the table name “cumulate” indicates, certain fields in this table are cumulated. I write a small API to demonstrate the logic, it will generate the same Gross Weight amount: 400


SAP CRM数据库表CRMD_CUMULAT_H的设计原理

In order to better explain the calculation logic, I draw a picture below.

SAP CRM数据库表CRMD_CUMULAT_H的设计原理

Where is gross weight in CRMD_PRODUCT_I.GROSS_WEIGHT coming from

The next question is: how is the value of field GROSS_WEIGHT in table CRMD_PRODUCT_I populated?

When we log on WebClient UI, we can only see the quantity 4 ST in each line item. Why 4 ST of product has gross weight 200 KG?

SAP CRM数据库表CRMD_CUMULAT_H的设计原理

First get product IMU’s guid from table COMM_PRODUCT:


00163EA71FFC1EE1A7CCADA1477A9164

Then query table COMM_PR_UNIT with this guid, and we can know from there that 1 ST = 50 KG, so 4 ST = 200 KG.


SAP CRM数据库表CRMD_CUMULAT_H的设计原理

When I change the quantity of first item from 4 to 3,

SAP CRM数据库表CRMD_CUMULAT_H的设计原理

the updated gross weight ( 3 * 50 = 150 KG ) is persisted to database via update function module:

SAP CRM数据库表CRMD_CUMULAT_H的设计原理