zl程序教程

您现在的位置是:首页 >  其它

当前栏目

When MARA-SCM_MATID_GUID16 is filled

is when SCM
2023-09-14 09:02:52 时间

Created by Wang, Jerry on Jan 05, 2017

As discussed, we will use MARA-SCM_MATID_GUID16 instead of COMM_PRODUCT-PRODUCT_GUID.
However, the field prefix SCM gives us impression that the change of appending this field to MARA belongs to SCM addon.
If this is true, suppose the scenario where the SCM addon is not installed into S4 system, then this field is not available. It means all direct access on MARA-SCM_MATID_GUID16 will cause syntax error.
So we need to figure out the change of appending this field to MARA belongs to SCM addon, or S4Core? The answer is: S4Core.
The code below is the implementation how SCM_MATID_GUID16 is created when we create material via MM01 in S4 system. From the code we can see the field is directly accessed without any dynamical programming.
If the change of this field belongs to SCM addon, the code should be written as:

ASSIGN COMPONENT ‘SCM_MATID_GUID16’ OF STRUCTURE MARA TO FIELD-SYMBOL(<GUID>).
IF sy-subrc <> 0. “ it means SCM addon is not installed!

However it is not the case, so it is safe for we CRM to directly use this field in CRM code.
要获取更多Jerry的原创文章,请关注公众号"汪子熙":