‎2021 Feb 01 3:29 PM
Hi,
I am using the function BDS_BARCODE_CREATE to attach an archived PDF file to an FI document (FB03). It works fine for a "normal" FI document.
However, if the FI document itself is archived (cannot be found anymore in BKPF), it does not work. All the functions in call chain (BDS_BARCODE_CREATE -> ARCHIV_CONNECTION_INSERT) are successful (SY-SUBRC = 0), entry in table TOA02 is created, but the file does not appear in FB03 -> Services for Object -> Attachment List.
I wanted to test is it possible to attach something to an archived document at all. I tried manual file attachment in FB03 -> Services for Object -> Attachment List and it worked! So it should be possible to create a link for an existing archived PDF file.
Does anyone have experience?
Thanks!
KR,
Igor
‎2021 Apr 08 9:06 AM
Hi,
The solution to this problem was trivial in the end: a simple COMMIT WORK after the BDS_BARCODE_CREATE function did the trick.
‎2021 Feb 01 7:14 PM
BDS_BARCODE_CREATE is usually not proposed in the forum as a way to attach a file to a business object. I guess that the classic solutions (create attachment + relationship to business object) should work.
https://blogs.sap.com/2013/05/23/the-gos-generic-object-services-class-that-does-all-the-work/
https://blogs.sap.com/2012/01/22/automatically-upload-gos-attachments/
https://github.com/keremkoseoglu/ABAP-Library/blob/master/document/zcl_bc_gos_toolkit.abap
etc.
‎2021 Apr 08 9:06 AM
Hi,
The solution to this problem was trivial in the end: a simple COMMIT WORK after the BDS_BARCODE_CREATE function did the trick.