07-01-2015 8:05 AM
Hi gurus,
In the implemented BAdI, I would like to know the activity mode.
BAdI: ME_PROCESS_REQ_CUST
Method: IF_EX_ME_PROCESS_REQ_CUST~PROCESS_ITEM
But I cannot find T180-TRTYP in the implementation point.
Is there any other way I can check the activity mode (creation/change/display)?
I need to check the activity mode to handle if I can proceed with the add-on logic or not.
Your feedback would be greatly appreciated.
Best Regards,
Mari
07-01-2015 5:17 PM
Hello Mari,
not direct answer, workaround rather: out of the "creation/change/display" activities:
-- "display" is easy, as method ~PROCESS_ITEM is not executed in display;
-- "creation/change" can be distinguished by comparison of item data with DB data; so either use method IF_PURCHASE_REQUISITION_ITEM~GET_PERSISTENT_DATA or simply check the db table EBAN; if the item is db persistent, than it must be "change", otherwise it must be "creation";
Kind Regards
TomT
07-01-2015 5:17 PM
Hello Mari,
not direct answer, workaround rather: out of the "creation/change/display" activities:
-- "display" is easy, as method ~PROCESS_ITEM is not executed in display;
-- "creation/change" can be distinguished by comparison of item data with DB data; so either use method IF_PURCHASE_REQUISITION_ITEM~GET_PERSISTENT_DATA or simply check the db table EBAN; if the item is db persistent, than it must be "change", otherwise it must be "creation";
Kind Regards
TomT
07-03-2015 7:59 AM
Hi Tom,
Thanks a lot for your feedback.
We've tested your solution and it seemed OK, but actually we came up with another solution.
There is IM_TRTYP in method ~OPEN, and we can pass it to memory ID then read it in ~PROCESS.
Thanks anyway for your help.
Best Regards,
Mari
07-03-2015 9:59 AM
Oh, true, that's more elegant & easier approach. Thank you, Mari.
TomT