08-04-2008 3:13 PM
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
08-04-2008 3:19 PM
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 .
08-04-2008 3:16 PM
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
08-04-2008 3:19 PM
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 .
08-04-2008 3:26 PM
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
08-04-2008 3:29 PM
08-04-2008 3:31 PM
08-04-2008 8:14 PM
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
08-04-2008 8:17 PM