2013 May 12 5:51 PM
I have a report that, among other things, has vendor invoices as one of the fields. Currently the report looks at the BDS to determine if there is an attachment (using FM BDS_ALL_CONNECTIONS_GET). If there is an attachment then it simply tells the user that via a field in the ALV. The next step is to allow the user to print the attachments using a button on the ALV. First the user will highlight the row that corresponds to the invoice in question and click the button.
My issue is that I am unable to find a way to print these documents. The FM that I use returns to me the document ID. I can take that document ID to FM SO_DOCUMENT_READ_API1 and that gives me the contents in two different tables. One is in Hex form and the other is what I assume is binary but I could be wrong.
I am wondering, how do I take this Hex format and print it? Is there a FM to print the BDS document directly?
Regards.
I have a report that, among other things, has vendor invoices as one of the fields. Currently the report looks at the BDS to determine if there is an attachment (using FM BDS_ALL_CONNECTIONS_GET). If there is an attachment then it simply tells the user that via a field in the ALV. The next step is to allow the user to print the attachments using a button on the ALV. First the user will highlight the row that corresponds to the invoice in question and click the button.
My issue is that I am unable to find a way to print these documents. The FM that I use returns to me the document ID. I can take that document ID to FM SO_DOCUMENT_READ_API1 and that gives me the contents in two different tables. One is in Hex form and the other is what I assume is binary but I could be wrong.
I am wondering, how do I take this Hex format and print it? Is there a FM to print the BDS document directly?
Regards.
2013 May 13 4:28 AM
Adam,
If possible, take the binary content and convert it to pdf format so that you can download it and take the print.
~Athreya
2013 May 13 4:38 AM
Hi,
Please try to use the FM BDS_OBJECT_DISPLAY to get the file content in table CONTENT, You also have the ASCII format in ASCII_CONTENT. Then to achieve your functionality of print can you put this in Application server or presentation server using FM SXPG_COMMAND_EXECUTE and print from there.
Hope this helps.
Cheers,
Arindam
2013 May 13 12:44 PM
Arindam,
Thanks for the suggestion. I am running into a problem finding the URL of the document for FM BDS_OBJECT_DISPLAY. I have tried to use FM BDS_BUSINESSDOCUMENT_GET_URL but it says that nothing is found when I pass the correct parameters (the same parameters that I pass to BDS_ALL_CONNECTIONS_GET.
2013 May 13 10:42 PM
Hi,
Try the FM BDS_BUILD_URL_FOR_AL to build the URL for the doc. Also check BDS_BUSINESSDOCUMENT_GET_URL if URL exists.
Cheers,
Arindam
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |