09-07-2016 5:25 AM
Hi Experts,
i have a requirement where in I have to send classification data to another SAP system.
This has to be done ONLY when classification data is changed in MM02.
I found a user exit where I can do my coding:
FM : EXIT_SAPLMGMU_001
Include : ZXMG0U02
However, this user exit is triggered for below 3 cases:
1. ONLY basic data is changed.
2. ONLY classification data is changed. < --- My condition.
3. Both basic and classification data is changed.
But my condition is applicable only for the 2. point above.
Therefore how to check if ONLY classification data was changed and nothing else? Please help!
Thanks
Gopal
09-07-2016 6:24 AM
HI,
Some points i understood.
Suppose classification data was saved in Table xyz. 1st time
Now, 2nd time ,you are changing classification fields changing, you can compare user exit classification fields data to the table xyz fields data.
if the values are differ which means they had changed it.
in the similar way other basic data also.
condition if only classification Changes.if both are changed.
09-07-2016 6:50 AM
NB: You could also use BAdI BADI_MATERIAL_CHECK instead of Customer Exit EXIT_SAPLMGMU_001.
In exit or method CHECK_DATA you could use some FM like MARA_SINGLE_READ to compare current values and database values of fields.
Regards,
Raymond
09-12-2016 4:46 AM
In my user exit
FM : EXIT_SAPLMGMU_001
Include : ZXMG0U02
I am able to determine if classification data is changed. However I also want to know if basic data was also changed. How to get the changed value in basic data in the same user exit?
I use the below FM to get the changed classification data from buffer:
CALL FUNCTION 'CLAP_DDB_GET_BUFFER_PARAMS'
EXPORTING
OBJECT = lv_material_id
CLASSTYPE = '001'
OBTAB = 'MARA'
IMPORTING
E_CHANGE_ANY = lv_chg
E_OBJ_IN_BUFFER = lv_buff
E_CHANGE_OBJ = lv_obj
E_CHANGENO_USED = lv_chgno
TABLES
E_AUSP_TAB = lt_ausp <--- THis will hold the changed classification data
E_KSSK_TAB = lt_kssk
E_DELCL_TAB = lt_delcl
E_DELOB_TAB = lt_delob.
Here lt_ausp contains the changed classification data. Similarly I am not able to see any other output parameter for basic data change. Can somebody help?
Regards
Gopal
09-12-2016 5:49 AM
09-20-2016 9:06 AM
09-20-2016 3:30 PM
Did you look for TABLES statement in the main program (e.g. MARA and *MARA)