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

BAPI_GOODSMVT_CREATE

Former Member
0 Likes
1,452

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
Read only

Former Member
0 Likes
1,184

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
Read only

Former Member
0 Likes
1,184

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

Read only

Former Member
0 Likes
1,185

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 .

Read only

0 Likes
1,184

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

Read only

0 Likes
1,184

Are you editing any Material data in MM02.

Read only

0 Likes
1,184

No....thx

Read only

0 Likes
1,184

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

Read only

Former Member
0 Likes
1,184

This message was moderated.