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: 

Populating a seegment in IDOC

Former Member
0 Kudos

Hi,

This is my code.

DATA: i_edidd LIKE edidd OCCURS 0 WITH HEADER LINE,

v_tabix LIKE sy-tabix,

v_tabix1 LIKE sy-tabix,

s_e1edk02 LIKE e1edk02,

s_e1edp01 LIKE e1edp01,

s_e1edp02 LIKE e1edp02,

s_e1edkt1 LIKE e1edkt1,

s_e1edkt2 LIKE e1edkt2,

v_vsbed LIKE ekpv-vsbed,

v_route LIKE ekpv-route, "CHG3232

v_bezei LIKE tvrot-bezei, "CHG3232

po_text LIKE tline OCCURS 0 WITH HEADER LINE.

i_edidd[] = dint_edidd[].

READ TABLE i_edidd WITH KEY segnam = 'E1EDK02'.

v_tabix = sy-tabix.

s_e1edk02-qualf = 'RES'.

s_e1edk02-belnr = dekko-reswk.

i_edidd-sdata = s_e1edk02.

INSERT i_edidd INDEX v_tabix.

READ TABLE i_edidd WITH KEY segnam = 'E1EDKT1'.

v_tabix = sy-tabix. .

s_e1edkt1-tdid = 'F01'.

s_e1edkt1-tsspras = 'EN'.

s_e1edkt1-tdobject = 'EKKO'.

s_e1edkt1-tdobname = dekko-ebeln.

i_edidd-segnam = 'E1EDKT1'.

i_edidd-sdata = s_e1edkt1.

INSERT i_edidd INDEX v_tabix..

The segment E1EDK02 gets populated. But I am unable to populate fields in E1EDKT1. It always gives me a error.

How do i fix this error?

Thanks,

Bhavani.

5 REPLIES 5

Former Member
0 Kudos

what is the error.

0 Kudos

Unable to use break points to understand the error .The execution shows error in line.

INSERT i_edidd INDEX v_tabix.

The values dont get populated for E1EDKT1.

I was thinking there was some error in the way I have used sy-tabix for the segment E1EDKT1.

0 Kudos

Hi

Its in the value of variable v-tabix. check whether its filled with some value or not.

0 Kudos

I checked v-tabix for E1EDK02.It gets populated.But when i include the code for the segment E1EDKT1, I m unable to retirve the value of v-tabix. I tried to add a break point and see the process. It didnt work. I m not sure how i can check the value.

0 Kudos

What is the use of v_tabix1 in the code ? try to reset the v_tabix before reading the e1edk01 segment.