Skip to Content
0
Former Member
Dec 08, 2008 at 04:15 PM

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

39 Views

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,