I have created an extension to the standard ORDERS05 idoc to include a couple of extra flags.
I have extended the VBAK structure to include the 2 new fields and I have added code within EXIT_SAPLVEDA_001 to populate xvbak with the values from this flag as follows:-
IF segment-segnam = 'ZE1EDK01'.
s_ze1edk01 = segment-sdata.
hxvbak-ZZFULFILLALL = s_ze1edk01-zzfulfillall.
hxvbak-ZZPRICEMISMATCH = s_ze1edk01-zzpricemismatch.
MOVE hxvbak TO dxvbak.
However, later in the Sales order useexit, I want to set reason for rejection based on the values of these flags.
I have debugged the code and I can see that the xvbak structure is correctly updated within EXIT_SAPLVEDA_001 when an idoc comes in but the values in the xvbak structure don't seem to be available in the xvbak structure within the Sales Order Userexit (MV45AFZZ).
Can anyone advise on whether this should be possible and if so, what I am doing wrong.