Our WMS kicks off IDOCs SHP_OBDLV_CONFIRM_DECENTRAL and these are inbound to SAP (our WMS does the Goods Issue).
These inbound IDOCs trigger user exit MV50AFZ1 --> userexit_save_document.
In that user exit, I have been given a requirement to SELECT from VEKP for the handling unit header for the delivery number. (Ultimately, we are looking for the tracking number from VEKP).
This would work fine, except through debugging the user exit, I can see that VEKP doesn't get updated until after the user exit is finished. (It is updated from the E1BPDLVHDUNHDR segment from the IDOC). Therefore, there is a timing issue; I can't access the data from the VEKP table b/c it isn't updated prior to the user exit.
Could I instead access the IDOC directly through some function / BAPI that I can call from the user exit? (Rather than selecting VEKP?)
If so, what FM/BAPI could be used?
Is there a better design?
Thanks
Jeremy H.