Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Function Module tables

Folks

In the FM EXIT_SAPLCMAT_001, I have the below code for an enhancement CIFMAT01.Basically , I believe its using one free attribute field to get the value from another field and updating the same in APO through CIF. however I am not sure and wld appreciate if you can interpret the code for me.

Why are there always two tables one without sufix 'x' and one with suffix 'x'.

Ex : CT_CIF_MATKEY, CT_CIF_MATKEYX

From the below code, I didn't understand why a field value thats already existing in the table CT_CIF_MATKEY is being assigned to a free attribute and then the same free attribute is assigned to 'X' in CT_CIF_MATKEYX. what is the purpose of doing this ?

LOOP AT CT_CIF_MATKEY
  CT_CIF_MATKEY-ATT01 = CT_CIF_MATKEY-TRAGR
  MODIFY CT_CIF_MATKEY.
ENDLOOP.

LOOP AT CT_CIF_MATKEYX.
  CT_CIF_MATKEYX-ATT01 = 'X'.
  MODIFY CT_CIF_MATKEY.
ENDLOOP.

PS: If a table doesnt have a free attribute, can I define one and use it ?

Thanks

Former Member
Not what you were looking for? View more on this topic or Ask a question