05-17-2017 9:57 AM
Transaction : COR6N
BADI method Implemented:
MB_DOCUMENT_BADI~MB_DOCUMENT_BEFORE_UPDATE
I am using this implementation to update some custom fields in table AUFK.
I give input values in below screen:
The requirement I working fine except for the FIRST time (immediately after creating PO using COR1).
Code inside BADI method: I am using UPDATE keyword inside below Update FM.
Could anyone please throw some light on this and suggest an approach?
05-18-2017 9:59 AM
You could change your 'Update module' from 'Start Immed.' to type 'Start Delayed' so it will be executed after standard updates.
(I hope you only update some ZZ fields of standard trable AUFK in the module, also are you creating change documents in the module or are you confident that none of the fields data elements has or will have the change flag set?)
05-17-2017 8:50 PM
05-18-2017 9:22 AM
Thank you for pointing out the mistake Nic! My bad.
I have corrected the Title now.
The Implementation works all the time EXCEPT for the first execution.
Any suggestions please?
05-18-2017 9:59 AM
You could change your 'Update module' from 'Start Immed.' to type 'Start Delayed' so it will be executed after standard updates.
(I hope you only update some ZZ fields of standard trable AUFK in the module, also are you creating change documents in the module or are you confident that none of the fields data elements has or will have the change flag set?)
05-18-2017 2:27 PM
Thank you Raymond! Selecting 'Start delayed' resolves the issue. 🙂
I understand this option can be used when execution has to happen after all other standard updates.
For your comments:
I hope you only update some ZZ fields of standard trable AUFK in the module
Yes I am only updating custom fields(part of include structure CI_AUFK):
also are you creating change documents in the module or are you confident that none of the fields data elements has or will have the change flag set?
I have not selected that flag. All data elements are custom and change log is not needed for these fields.
I hope I am following all the desired coding standards.
Kindly let me know if I am missing something important here!
Regards,
Barkha Agrawal