Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Need to populate EDIDC-SNDLAD

Former Member
0 Kudos
832

Hi,

I have an outbound delivery IDoc that will call EXIT_SAPLV56K_001;  I need to use a couple of the fields in the CONTROL_RECORD_OUT structure that is passed back to the IDoc.  This exit consists of Include ZXTRKU01.  What I need to do is select the plant number and the sold-to partner number for the delivery and pass those back to the IDoc via CONTROL_RECORD_OUT (SNDLAD and RCVLAD).  However, I cannot find where the delivery number (VBELN) is available in this exit or include, so I am unable to select the plant and sold-to party.  I was hoping that the delivery number was in the CONTROL_RECORD_OUT structure already (it is used as Import and Export...) but I don't see it.

** I am not asking about the segments, I have already extended my segments and I am not filling those at this point.  I just need to populate a couple of fields in CONTROL_RECORD_OUT from within this user exit.  The exit is shown below:

FUNCTION EXIT_SAPLV56K_001.

*"----------------------------------------------------------------------

*"*"Globale Schnittstelle:

*"  IMPORTING

*"     VALUE(CONTROL_RECORD_OUT) LIKE  EDIDC STRUCTURE  EDIDC

*"     REFERENCE(DATA) TYPE  TR_IDOC_SHPMNT_INDATA OPTIONAL

*"     VALUE(OBJECT) LIKE  NAST STRUCTURE  NAST OPTIONAL

*"  EXPORTING

*"     VALUE(CONTROL_RECORD_OUT) LIKE  EDIDC STRUCTURE  EDIDC

*"  EXCEPTIONS

*"      ERROR_MESSAGE_RECEIVED

*"      DATA_NOT_RELEVANT_FOR_SENDING

*"----------------------------------------------------------------------

  INCLUDE ZXTRKU01.

ENDFUNCTION.

Thank you in advance.

1 ACCEPTED SOLUTION

jitendra_it
Active Contributor
0 Kudos
169

Hello Phillip,

Can you check import parameter DATA is filled or not ? If DATA is filled you can find delivery number in

DATA-TAB_LIKP-VBLEN.

4 REPLIES 4

jitendra_it
Active Contributor
0 Kudos
170

Hello Phillip,

Can you check import parameter DATA is filled or not ? If DATA is filled you can find delivery number in

DATA-TAB_LIKP-VBLEN.

0 Kudos
169

Hi Jitendra,

What is the method for accessing the DATA structure?  The message I'm getting is that it is a table without a header line; I haven't used this exit before.  Thank you

0 Kudos
169

The message I'm getting is that it is a table without a header line;

Import parameter DATA is deep structure. Check sample code below to access it.

data : lt_likp type table of likp,

         ls_likp type likp,

         lv_vblen type VBELN_VL.

lt_likp = data-tab_likp[].

**** Here you can loop over table lt_likp Or Read table lt_likp based on your requirement.

read table lt_likp into ls_likp index 1.

if sy-subrc = 0.

lv_vbeln = ls_likp-vbeln.

endif.

0 Kudos
169

I understand perfectly.  Will give it a shot and update accordingly.