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: 

Idocs: Transfer posting; issue found with FM IDOC_INPUT - Advice required

Former Member
0 Kudos

Hi everyone,

I am facing an issue which has the following scenario;

I need to do transfer posting for goods movement 303 and 305.

the scenario is as follow: 303 posts stock on transit and 305 takes the stock from transit for processing.

When sending XML file from XI, which contains two idoc, one woth movemnt 303 and one with movement type 305.

The idocs sequence in the idoc control is as follows: 303 and 305, two idocs.

In my code i have use the fucntion module BAPI_GOODSMVT_CREATE. the 303 is being successfully processed but i am getting the following error for the 305 idoc: u201CPL Stock in transfer exceeded by 2 PC: 12755 GB05 1040 RTNBATCHu201D

While doing some investigation i have found that in the FM IDOC_INPUT, the code is looping through IDOC_CONTROL that contains the two idocs. in each of these loop my FM containing fucntion module BAPI_GOODSMVT_CREATE is being called.

That means even if the database table for stock in transit is being successfully updated, since the program launched initially contains initial data in its buffer, in the loop if the database is updated, teh buffer does not take into consideration any updated data and continues processign with initial data.

Can anyone please advise?

many thanks,

2 REPLIES 2

Former Member
0 Kudos

Make sure the first material document is committed before calling the second one.

Albert

0 Kudos

Hello Albert,

we are comitting the first idoc and it is being committed. As both idocs are using the same session, the buffer used by the standard program has not been refreshed and updated with up to date data from the database.

thank you

regards,