We have a requirement of attaching a file of any type(Doc,PDF,TXT,PPT) to the purchase requisition, We are able to attach a document through transaction(ME51n). Can any one please suggest are there any function modules or classes to do the same through coding.
Thanks in advance,
I guess the Methord you are following is not the Correct one,
you should not directly attach the Document in the production server as the File size varies and takes a huge space in the Production Server, for this reason we go for DMS(Data Management System), you should create the document in CV01N and then use this Document NO as reference.
Hope it helps you.
Thanks for your quick reply
We don't want to use any standard transactions, instead is there any other way to attach a document for the purchase requisition that is created through bapi_pr_create ( the function module we are using to create purchase requisition).
I have done the same long time back by creating the Document in the DMS, and at the same time attaching the document to an Object, the Bapi Used was BAPI_DOCUMENT_CREATE2.
But for Directly Creating the document I guess you can take the Help from the ABAP.
Are you asking for the ABAP Code, You can ask with your Abaper to right the code.
but the important thing is that this BAPI calls for the Standard T-Code CV01N, for creating the Document, but you are not using the same Functionality.
I doubt, if it could be used in that condition, because you need to have all the DMS Settings, all the Document Types Described and DMS document Types assigned to which all Objects they can be attached with.
Please check the prerequisites be for going for any development.
Hope it helps you
Difference between DMS and GOS attachement
GOS Attachment list:
This attachment list can be found for nearly all object (document info record, material master,euqipments,...) and allows you to add specific files to the object and store them by archivelink technique.
Original tab in DMS:
This area is something DMS specific and allows you to store original files to the document info records. This original files are normally stored in a content server and from DMS point of view you will have more functionalities as when you add the files to the attachment list.
How to create DMS attachment master?
Important tables and FM related to DMS
With the tables and FMs you can work with ABAPER to achieve your requirement