cancel
Showing results for 
Search instead for 
Did you mean: 

2 material documents (107) in STO when executing BAPI_GOODSMVT_CREATE - WHY?

Former Member
0 Kudos

Hello Experts,

What are the reasons why there could be 2 material documents (107 movement) in my STO upon executing BAPI_GOODSMVT_CREATE? I'm using the exact identical parameters. There are two scenarios to this.

Scenario 1:

     PGI (movement 643) through VL02N Post goods issue. Run BAPI_GOODSMVT_CREATE for 107 movement.

     Result: Only 1 material document (107) in my STO

Scenario 2:

     PGI (movement 643) through shipment completion (VT02N). Run BAPI_GOODSMVT_CREATE for 107 movement.

     Result: 2 material documents (107) in my STO

During debug of the 2nd scenario, there is always only 1 entry in the MSEG internal tables. When the FM is done executing, 1 material document (107) appears in ME23N purchase order history. Upon executing 'BAPI_TRANSACTION_COMMIT', another material document (107) is added to the STO history. Upon checking in MSEG table, the user for the first 107 is the background user, and the 2nd one is in my username. Any thoughts? I'm an ABAP developer, let me know if you have any clarifications.

Many thanks,

Jack

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi All,

Just cleared the importing parameters below. Its weird though why this could cause an additional 107 movement.

IMPORTING

(MATERIALDOCUMENT)

(MATDOCUMENTYEAR)

Answers (0)