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

Problem with IDOC_INBOUND_FROM_FILE within a loop

maria_merino
Active Participant
0 Likes
1,448

Hi experts,

I need to create several idocs with fm IDOC_INBOUND_FROM_FILE. As the user can choose many files to upload, I use this function within a loop. The first one goes well and the idoc's number is shown but it's not processed. And for the following files I get idoc number "0000000000" and sy-subrc = 1 -> idoc_not_stored, and they are not processed.

When I execute WE02 I can see both idoc created.

If I only choose one file all the process works, the idoc is created and processed.

Is there any other thing I have to do in order to create all the idocs ?

Thanks in advance,

María

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,246

Try putting a wait loop in your process and checking the idoc status until it is complete, before continuing to the next itteration of the read loop.

Neal

Try putting a wait loop in your process and checking the idoc status until it is complete, before continuing to the next itteration of the read loop.

Neal

5 REPLIES 5
Read only

Former Member
0 Likes
1,247

Try putting a wait loop in your process and checking the idoc status until it is complete, before continuing to the next itteration of the read loop.

Neal

Read only

0 Likes
1,246

How can I know if the idoc is correct ?

Read only

0 Likes
1,246

Typically 53 indicated that the idoc was processed correctly.

Read only

former_member404244
Active Contributor
0 Likes
1,246

Hello,

Please use while loop and process the FM if sy-subrc eq 0.

Regards,

Nagaraj

Read only

maria_merino
Active Participant
0 Likes
1,246

Problem solved.. the consultant gave me an incorrect file, field mandt was not filled correctly. Instead of callinf FM IDOC_INBOUND_FROM_FILE, I used submit report RSEINB00 and got the error..

thanks a lot for your answers !!

María