Application Development and Automation 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: 
Read only

Inbound Idoc LOOP problem

Former Member
0 Likes
519

Hi,

I'm debugging my Inbound FM but can't get it into a loop after I filled the segmentdata into an itab...

this is my code:

  • IT0014 -IDOC

DATA: L_IT_0014_DATA LIKE E1P0014.

  • IT0220 -IDOC

DATA: L_IT_0220_DATA LIKE Y1HR_XI_EXT_P0220.

  • Internal Table IT0014

DATA : IT0014 TYPE STANDARD TABLE OF IT_APP_IT0014 WITH HEADER LINE. "Internal Table

  • Internal Table IT0220

DATA : IT0220 TYPE STANDARD TABLE OF P0220 WITH HEADER LINE. "Internal Table

  • Split input data into seperate Internal Tables

DATA: IT_P0001 TYPE TABLE OF P0001 WITH HEADER LINE.

DATA: IT_P0014 LIKE TABLE OF P0014 WITH HEADER LINE,

IT_P0220 TYPE STANDARD TABLE OF P0220 WITH HEADER LINE.

  • Process all records and pass them on to application buffers

LOOP AT IDOC_DATA WHERE DOCNUM EQ IDOC_CONTRL-DOCNUM.

CASE IDOC_DATA-SEGNAM.

WHEN 'E1P0014'. " IT0014

L_IT_0014_DATA = IDOC_DATA-SDATA.

MOVE-CORRESPONDING L_IT_0014_DATA TO IT0014.

WHEN 'Y1HR_XI_EXT_P0220'. " IT0220

L_IT_0220_DATA = IDOC_DATA-SDATA.

MOVE-CORRESPONDING L_IT_0220_DATA TO IT0220.

ENDCASE.

ENDLOOP.

break-point.

LOOP AT IT0220 INTO IT_P0220.

I have data in IT0220, but when I try to loop on that it fails...

Any help appreciated..

John

2 REPLIES 2
Read only

former_member186741
Active Contributor
0 Likes
371

you are populating but do not seem to be doing an 'append' to put entries into the table. i.e after the move-corresponding do an append. Seems to apply to IT0220 and IT0114.

Read only

0 Likes
371

Thanks... It works...