Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Email Archived PDF

Former Member
0 Likes
954

I have a requirement to retrieve archived SD Invoices (stored as PDFs) and email them as a PDF attachment. I am using FM 'ARCHIVOBJECT_GET_TABLE' to retrieve the PDF, which works successfully. But, when I use FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to email the PDF it is unsuccessful.

FM 'ARCHIVOBJECT_GET_TABLE' returns two tables ARCHIVOBJECT and BINARCHIVOBJECT , I am not sure which one I should use as input for FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' . ARCHIVOBJECT and BINARCHIVOBJECT are not size compatible with the corressponding Table Parameter in FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' - is a conversion required?

Sample code would be appreciated.

thanks,

Con.

I have a requirement to retrieve archived SD Invoices (stored as PDFs) and email them as a PDF attachment. I am using FM 'ARCHIVOBJECT_GET_TABLE' to retrieve the PDF, which works successfully. But, when I use FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to email the PDF it is unsuccessful.

FM 'ARCHIVOBJECT_GET_TABLE' returns two tables ARCHIVOBJECT and BINARCHIVOBJECT , I am not sure which one I should use as input for FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' . ARCHIVOBJECT and BINARCHIVOBJECT are not size compatible with the corressponding Table Parameter in FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' - is a conversion required?

Sample code would be appreciated.

thanks,

Con.

2 REPLIES 2
Read only

vijy_mukunthan
Active Contributor
0 Likes
694

Hi

You need to convert to xstring using the FM SCMS_BINARY_TO_XSTRING. The binary format need to convert to SOLIX using the above fm. Because the mail FM SO_NEW_DOCUMENT_ATT_SEND_API1 needs the attachment in SOLIX format.

Regards

vijay

Read only

Former Member
0 Likes
694

Hi Vijay,

I am assuming I use the itab returned by FM 'ARCHIVOBJECT_GET_TABLE' Tables Parameter BINARCHIVOBJECT as input for Tables Parameter BINARY_TAB for FM 'SCMS_BINARY_TO_XSTRING' - is this right?

Do I pass one line at a time from BINARCHIVOBJECT itab (lines defined as RAW 1024) to FM 'SCMS_BINARY_TO_XSTRING' ?

Do I set the Exporting Parameter INPUT_LENGTH of FM 'SCMS_BINARY_TO_XSTRING' to 255?

Do I assigned the binary to xstring converted itab to FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' Tables Parameter contents_bin or contents_hex?

Do you have sample code of this?

thanks,

Con.