on 07-12-2009 8:59 PM
Hi All,
i am trying to change the source document when i save a document in BADI AFTER_SAVE Method.
i am using FM BAPI_DOCUMENT_CHANGE2, but some have the document data that i am trying to change doesnt get changed.
Please can any one of you help me if am doing something wrong.
Thanks in Advance..
Regards,
Sud
hi,
Sud,
Please check status, while running bapi.
I think IN DC10 for specific document type u should not maintain any staus and run Bapi.
I think it will change.
Benakaraj
??P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
im trying to change the document whose status is dummy which doesnt have any tick in DC10, and i presume it should change the document in that status because when i run the FM BAPI_DOCUMENT_CHANGE2 and test that with the same status it doesnt give any error.
plz correct me if am wrong.
Thanks.
Hi Sud,
for using the BAPI_DOCUMENT_CHANGE2 successfully I would recommend you to call first the BAPI_DOCUMENT_GETDETAIL2. This BAPI will enable you to read all document info record data and then you can modify them and hand them over to the
CHANGE2 BAPI. After this CHANGE2 BAPI please execute also BAPI_TRANSACTION_COMMIT which will save the changed data in the database.
Best regards,
Christoph
Hi Christoph,
Thanks for the response, i used commit after changing the document. but i don't understand the reason why its not working for me.
Plz Note: i am executing the change(BAPI_DOCUMENT_CHANGE2) Bapi in back ground because in After_save method i cannot execute the same in foreground as it throws a runtime error"Commit in Perform on Commit". i use the Commit work as well in back ground. does this make any difference in changing the document?
Thanks,
Sud
Edited by: Sud on Jul 15, 2009 10:46 AM
Edited by: Sud on Jul 15, 2009 10:50 AM
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.