2014 Nov 25 5:10 PM
Hi Experts,
I am trying to update Document file through bapi BAPI_DOCUMENT_CHANGE2,but it is not updating it is adding files to the concerned document. Can anyone tell me the exact parameter to pass so that it will update.
Thanks,
Vinod.
2014 Nov 25 5:14 PM
Hi.
Function should be called in this way:
call function 'BAPI_DOCUMENT_CHANGE2'
exporting
documenttype = documenttype
documentnumber = documentnumber
documentpart = documentpart
documentversion = documentversion
documentdata = dd "Like bapi_doc_draw2 Can be empty
documentdatax = ddx "like bapi_doc_drawx2 Can be empty
importing
return = return
tables
objectlinks = objectlinks.
if return-type na 'EA'.
commit work.
else.
rollback work.
endif.
Hope to help.
Bye.
2014 Nov 25 5:20 PM
Hi Roberto,
Thanks for the quick response, even i have called in the same way but it is not updating the previous file it is go on adding the next file.
Thanks,
Vinod.
2014 Nov 25 5:42 PM
Hi.
please report how do you pass BAPI_DOC_DRAWX2 flags. It's important you've filled correctly this structure.
Hope to help.
2014 Nov 25 6:04 PM
2014 Nov 25 6:20 PM
Hi.
It seems correct.
You should before BAPI_DOCUMENT_GETDETAIL2 and then change with these data.
It's important to read before change. That should be working as others bapi.
If you can't get out, try a BDC equivalent solution.
Hope to help.
2014 Nov 25 5:22 PM
Hi Vinod ,
please go through this links ,
http://www.erpgenie.com/sap/abap/bapi/example.htm
Hope useful,
regards,
sudheer