on 02-18-2010 9:35 AM
I try to insert new i segment in oubound idoc but the problem that the segment is not insered under his father segment also its insered more then one time .
I use a user exit to do that and this is a part of code.
IF idoc_data-segnam = 'E1ADRM1'.
IF sid <> ' '.
DATA i1 TYPE i.
i1 = 0.
LOOP AT idoc_data WHERE segnam = 'E1EDL55'.
i1 = i1 + 1.
ENDLOOP.
IF i1 = 0.
CLEAR l_e1edl55.
CLEAR wa_idoc_data.
MOVE sy-tabix TO l_idx1.
MOVE idoc_data TO wa_idoc_data.
l_e1edl55-qualf = 'ZSD'.
l_e1edl55-refnr = sid.
wa_idoc_data-segnam = 'E1EDL55'.
wa_idoc_data-sdata = l_e1edl55.
wa_idoc_data-hlevel = 24.
wa_idoc_data-psgnum = 24.
APPEND wa_idoc_data TO idoc_data.
INSERT wa_idoc_data INTO idoc_data INDEX l_idx1.
ENDIF.
ENDIF.
ENDIF.
Edited by: Ghanem BEN ALI on Feb 18, 2010 10:39 AM
I think it would be a better idea to to create a segment via we31 and then extend the Idoc via we30. In the extended idoc you can insert the new segment.
You may also check the following link:
http://wiki.sdn.sap.com/wiki/display/ABAP/ALEandIDocs
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A segment is visible in Idoc only if it has any data. If there is no data in the segment, you will not see the segment. Please use a proper user exit to populate the relevant data in segment.
Please check the following link for list of user exits for idoc
http://www.erpgenie.com/abaptips/index2.php?option=com_content&do_pdf=1&id=302
Thanks.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.