IDOC_OUTPUT_DELINS - fill enhancement for DELFOR02
this is something new for me so I hope that somebody here can give me the necessary hints to solve this issue.
I have added an enhancement to IDOC type DELFOR02. It is only a segment with three fields on position level.
My problem is, how to fill this enhancement?
I have identified via the processing code ME14 the function module IDOC_OUTPUT_DELINS where I found a perform for an user exit.
Looks like I can fill the additional segment here.
But I have no idea how the structure will look like that is filled with the idoc data as there is only this table INT_EDIDD general structure type EDIDD .
As this is a background function it is not easy to find when debugging from the moment of saving the form LPA.
So, how can I step forward to have an idea how to fill the additional segment correctly?
Any help is appreciate!
Thank you in advance!
Asik Shameem replied
You an use the exit EXIT_SAPLEINM_019 or EXIT_SAPLEINM_002.
There what you need to do is.
Check for the previous segment. For example you inserted a ZSEGMNET under E1EDP10 in WE30.
DATA: lw_edidd TYPE edidd. lw_zsegment TYPE zsegment. lw_edidd-segnam = 'ZSEGMENT'. lw_zsegment-field1 = '1000'. lw_zsegment-field2 = 'ABCD'. MOVE lw_zsegment TO lw_edidd-sdata. LOOP AT int_edidd. lv_index = sy-tabix. ADD 1 TO lv_index. IF int_edidd-SEGNAM = 'E1EDP10'. INSERT lw_edidd INTO int_edidd INDEX lv_index. " Insert your segment ENDIF. ENDLOOP.