‎2007 Dec 10 5:50 PM
I am modifying the ORDERS05 Idoc from an user exit EXIT_SAPLVEDC_003. I need to add the ABLAD field value to E1EDK01 segment.
The code below is not working. How can we add more values to the SDATA field?
DATA: wa_edidd LIKE edidd,
wa_e1edk01 LIKE e1edk01.
LOOP AT dint_edidd.
IF dint_edidd-segnam = 'E1EDK01'.
MOVE dint_edidd-sdata TO wa_e1edk01.
CLEAR wa_edidd.
MOVE dint_edidd TO wa_edidd.
wa_e1edk01-ablad = 'test'.
MOVE wa_e1edk01 TO wa_edidd-sdata.
APPEND wa_edidd TO dint_edidd.
ENDIF.
ENDLOOP.
‎2007 Dec 10 5:55 PM
Instead of APPEND wa_edidd TO dint_edidd.
use
MODIFY dint_edidd from wa_edidd
‎2007 Dec 10 5:57 PM
Hi,
Try this way
DATA: wa_edidd LIKE edidd,
wa_e1edk01 LIKE e1edk01.
LOOP AT dint_edidd.
IF dint_edidd-segnam = 'E1EDK01'.
MOVE dint_edidd-sdata TO wa_e1edk01.
CLEAR wa_edidd.
MOVE dint_edidd TO wa_edidd.
wa_e1edk01-ablad = 'test'.
MOVE wa_e1edk01 TO wa_edidd-sdata.
modify dint_edidd from wa_edidd. "<<<<<<<<<<<<<<<<<<<<
ENDIF.
ENDLOOP.
a®
‎2007 Dec 10 6:14 PM
MODIFY statement is not the issue. Though
wa_e1edk01-ablad = 'test'
populates the segment, when
MOVE wa_e1edk01 TO wa_edidd-sdata
is excuted, the <b>edidd-sdata</b> value is the same. 'Test' needs to be appended to SDATA which is not happening. So ABLAD value remains blank.
Any thoughts?
‎2007 Dec 10 6:21 PM
Hi,
Please check whether you are incrementing the SEGNUM field to next available value while appending?
a®