‎2014 Dec 18 5:14 AM
Hi,
I am going to develop an BSP (SAPUI5) application where I need to create purchase requisition. Hence, instead of using ME51N, those functionality need to be available in my application. Hence, I am using some function modules like BAPI_PR_CREATE or BAPI_REQUISITION_CREATE etc for creating the purchase requisition. Uploading attachment is one of the functionality available in ME51N. Currently attachments are already available in the system which are visible through ME52n etc.
How can I replicate the functionality of uploading attachment in purchase requisition in ME51N/ME52N using ABAP code? If anybody has experience in this kind of requirement it will be of great help if you please share me the same. It is an urgent requirement.
Regards,
Subhabaha Pal
‎2014 Dec 21 8:04 AM
‎2014 Dec 18 5:27 AM
Not sure whether you are using GOS or content repository to store documents.
You need to create class handlers to receive xstring from your UI and upload into SAP via FM.
For content repository you could use FM like SCMS_DOC_CREATE , ARCHIV_CONNECTION_INSERT.
‎2014 Dec 18 6:32 AM
Hi Niyaz,
Thanks for your reply.
I am using GOS in order to store documents.
Can you please suggest any code to upload PR attachment document through code?
Regards,
Subhabaha Pal
‎2014 Dec 18 6:42 AM
Have a look at below links. Refer to reply by Kesavadas Thekkillath
http://scn.sap.com/message/13925228#13925228
Also below link.
Message was edited by: Niyaz Ahamed
‎2014 Dec 18 6:51 AM
Thanks Niyaz ... I am going through the link to see if it helps.....
‎2014 Dec 21 8:04 AM
‎2015 Jan 12 9:02 AM
Thanks Ron for your kind help.
I have used the method SAVE in class cl_fitv_gos for attachment upload and it worked fine for me.
Thanks a lot Ron for your kind help.
Regards,
Subhabaha Pal