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: 

Idoc segment data add in User exit EXIT_SAPLIEDP_902

Former Member
0 Kudos

Hi all,

I havea requirement to add segments to Basic type PEXR2002 for payment transaction from F110.

I wrote code in user exit EXIT_SAPLIEDP_902. But idoc givining an error status message as 26. Segment not fount..

see my code here how i add the segment in User exit, pleas ego through it and let me know the correct code...

note: edidd_table iscoming from user exit function module..

data: ls_e1idku3 TYPE e1idku3,

ls_e1idt01 type e1idt01.

loop at edidd_table INTO ls_edidd1 where segnam = 'E1IDKU3'.

ls_e1idku3 = ls_edidd1-sdata.

IF ls_e1idku3-PAYRUNCC = 'US01'.

ls_e1idt01-txt04 = ls_e1idku3-instext4.

ls_edidd-segnam = 'E1IDT01'.

ls_edidd-sdata = ls_e1idt01.

append ls_edidd to edidd_table.

CLEAR: ls_e1idt01, ls_e1idku3, ls_edidd1.

ENDIF.

CLEAR: ls_edidd, ls_edidd1, ls_index..

ENDLOOP.

please advise, its bit urgent..

thx

1 REPLY 1

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

You can't append a different segment like E1IDT01 at the wrong sequence... your IDoc will not be properly formatted. You have to make sure the segment sequence corresponds to the IDoc definition. Either insert it at the correct position into EDIDD_TABLE (which is right before the current E1IDKU03), or modify an existing E1IDT01 segment.