Link Attachments of Purchase Requisition to Purchase Order
If during creation of purchase requisition you've attached some documents into requisition and you convert requisition to purchase order then the attachments aren't copy to PO. But you can do it either by daily job or by the implementation of user-exit if you know how to link GOS object to PO. I faced a request to copy attachments from PR to PO, but what I did was in fact just linking existing attachment to PO. In that way you do not double the same content on server. Bellow you can find the code of an function module which uses 'BINARY_RELATION_CREATE' and 'BINARY_RELATION_CREATE_COMMIT'.
- Importing
I_EBELN TYPE EBELN -> Purchase Order number
I_COMMIT TYPE C -> Do you want to do the commit?
- Tables
T_EBAN STRUCTURE EBAN -> Table with PR lines to check GOS relations
- Exceptions
BINARY_RELATION_CREATE_ERROR
Add a comment