cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Proxy Attachment

former_member189418
Participant
0 Kudos

Hi All,

I had created an ABAP proxy which sends an XML message along with an attachment(PDF). The PDF is written to the application server first (just to double check the correctness of the file) and then the same file is sent to the XI as an attachment. But when i download it from the SXMB_MONI to the local system, it is saying that the file may be corrupted or might be a poblem with the decoding. i had gone through the following weblog.

[/people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments|/people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments]

I'm using the following code to send the pdf as attachment.

attachment_protocol TYPE REF TO if_wsprotocol_attachments,

attachment TYPE REF TO if_ai_attachment,

attachments TYPE prx_attach,

attach_xstring TYPE xstring.

attachment_protocol ?= prxy->get_protocol( if_wsprotocol=>attachments ).

attachment = attachment_protocol->get_attachment_from_binary( data = attach_xstring

type = if_ai_attachment=>c_mimetype_pdf

name = 'Invoice_attachment' ).

APPEND attachment TO attachments.

attachment_protocol->set_attachments( attachments ).

Can anyone please help me out in resolving the issue.

Thnx in Advance

Anil

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Anil,

I have the same scenario .I need to create the PDF attachment in ABAP client proxy for Invoice document.Do you have any idea or sample code to attach the PDF document.

And is there any special steps i need to follow in the ESR in the atachment point of view.

Thanks

Former Member
0 Kudos

Hi,

I think I have the same problem. Some bytes are replaced by different values.

Did you found a solution for your problem?

Regards

Fanninger Thomas