Application Development 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: 

Send PDF output via Idoc

SimoneMilesi
Active Contributor
0 Kudos
3,028

Hi Gurus,

I need to send via Idoc the Purchase order Print as PDF.

I can create my PDF and i can download to local or attach via mail or download to the server without problem.

I tryed the FM SCMS_BINARY_TO_TEXT to convert my PDF to a char string for Idoc, but this doesn't work: i got an error because the FM cannot convert images i got in my print (in binary or hexadecimal i don't have any problem).

What i can do? there is a solution?

8 REPLIES 8

SuhaSaha
Advisor
Advisor
0 Kudos
732

What is the point of sending PDF document in an idoc ? Sounds absurd to me !!

May be other SDNers can convince me on this .

BR,

Suhas

0 Kudos
732

I'm only the developer and a consultant too! I asked the same question to the customer and the answer was "because these are the agreements with the receiver".

Former Member
0 Kudos
732

I have the same requirement. We have 2 systems (eai between) that communicate via idoc. How else should we transfer documents?

SimoneMilesi
Active Contributor
0 Kudos
732

Hi Gurus!

Nobody can help me?

SimoneMilesi
Active Contributor
0 Kudos
732

.

Former Member
0 Kudos
732

Hi All,

Even I am looking for a similar solution, can any body please help?

Regards,

Prabhav

Former Member
0 Kudos
732

Hi !

Don' know if you have solved this by now, but as there is other users asking for a solution, maybe someone will find this useful.

Sending a pdf file embedded in an IDOC would require the receiver to be ABLE to interpret the content of the idoc, in this case a pdf file.

Try creating segment in the IDOC with file info ( type / mimetype etc ) including a field telling the file data is in base64 encoding to inform the receiver on how to unpack the file data.

Under this file info segment create a subsegment for the file that contains the file content (lines)

SO convert the pdf binary data to an xstring (hint, you may use FM SCMS_BINARY_TO_XSTRING for this purpose), then use FM SSFC_BASE64_ENCODE to encode the binary data to base64 encoded data lines.

At the receiver end the customer can use base64_decode function to unpack the file.

using this method you should be able to embed the file in the IDOC

Please let me know if this is useful.

best regards

Jøran Sanna

0 Kudos
732

Hi,

Thanks for the overview. Do you know if there is a file limit due to  "base64 encoded data lines" limitation?

Thanks in advance,

Patrick