Your Organization (say COY, which is in SAP) acquired another company (say XYZ, which is also in SAP). As per design, business plan to load all data and process from XYZ to COY. So, they need to put the attachments from XYZ business objects to corresponding business objects in COY system.
This simple tool would upload any attachments (pdf, txt, xls, xml etc) from source sap system to target sap system for all business object types.
Prepare file with Target Objects (PO/PR/Vendor/Materials/Contracts etc) and corresponding Source Objects. Make sure to have corresponding leading zeroes for all the objects. Example PR would have total 10 characters; materials would have total 18 characters, vendor would have total 10 characters with leading zeroes etc.
Below is an example file (xls) of Purchase Req from COY and XYZ system.
Execute program Z_GOS_PREPARE_FILE in target system.
Execute program Z_GOS_ATTACHMENT in target system.
Common Business Objects
Pur Req = BUS2105 Material = BUS1001 or BUS1001006
Pur Ord = BUS2012 Vendor = LFA1 Contract = BUS2014 etc
Validation for our example:
Go to ME53N for Purchase Requisition in source System
Go to ME53N for Purchase Requisition in target System
ABAPer would be more interested in the code to achieve the above functionalities. 🙂
Please find the working code attached in four files. Please click the link on the right.
Please note: in the Main program (in PERFORM get_rfc_name), you need to put the RFC name of your system in Development, Quality and Production system respectively.
If you have any query or issue, please leave your questions at the comment section or email at mailsapyard[at]gmail[dot]com.
Image source : www.spyderlovers.com