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: 

BAPI_GOODSMVT_CREATE

Former Member
0 Kudos

Two issues:

My code created the material document, but I do not see it in MB03. I used a commit work in the code after the BAPI executes. Do i need tpo do a 'BAPI_TRANSACTION_COMMIT'?

Also, Now it says I have it locked when trying to test some more. Is there an ENQUEUE/DEQUEUE Function Module I should be using?

Thanks

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

Check the export parameters

MATERIALDOCUMENT

MATDOCUMENTYEAR

after the BAPI call, if the MATERIALDOCUMENT is having some value then transaction is success then call the BAPI_TRANSACTION_COMMIT

No need use any ENQUEUE/DEQUEUE .

7 REPLIES 7

Former Member
0 Kudos

hiii

locked means if it is open somewhere then need to close that tcode from where you are creating document..so close tcode and then execute BAPI.if that document is used by somebody else then also this error will occur.

it is good to use 'BAPI_TRANSACTION_COMMIT' FM after using any BAPI FM..as it will commit work or give you an error message saying where error is and will not save any data.

regards

twinkal

former_member188685
Active Contributor
0 Kudos

Check the export parameters

MATERIALDOCUMENT

MATDOCUMENTYEAR

after the BAPI call, if the MATERIALDOCUMENT is having some value then transaction is success then call the BAPI_TRANSACTION_COMMIT

No need use any ENQUEUE/DEQUEUE .

0 Kudos

It returns:

The plant data of the material XXXXX is locked by the user MYNAME

I do not have a session opened for this. I may have exited debug when testing? How do I unlock the plant data of the material?

Thank-You

0 Kudos

Are you editing any Material data in MM02.

0 Kudos

No....thx

0 Kudos

If you want to release the locks use transaction SM12. When using BAPI_GOODSMVT_CREATE I also had issues with locks and getting it to post. Are you doing anything prior to calling the BAPI that pertains to the material/plant? It may take a few seconds for the locks to clear from a previous action or for the data to commit to the database.

Regards,

C

Former Member
0 Kudos

This message was moderated.