I have a scenario where Delivery would be created as soon as GR is complete. I need to save the GR number into a custom table as soon as it is created.
But, suppose if the output type triggering is failing, or as soon as it is triggered the control goes to delivery. So, any suggestions as to how to implement/.
I am using BDC call transaction
U can make use of the Function Exit EXIT_SAPLMBMB_001 which will be fired just before saving GR. Here u can write code to save GR num into custom table. The Tables XMKPF and XMSEG contains GR data in the exit.
In the exit u will have a include, just double click and implement the code:
IF SY-TCODE = 'MB01'.
The perform contains the Z table data population and updation.