cancel
Showing results for 
Search instead for 
Did you mean: 

PDF attachments sending From ECC R3 ->PI-> Third party system in SOAP adapter

Former Member
0 Kudos

Dear Friends , I have a scenario like generate a PDF file in the ECC R3 the same file need to send via PI to the Third party system by SOAP adapter. How to handle this  case ? this is synchronous interface . For a request i need to send a responds as PDF file . It will be grateful if i get an idea

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Vignesh,

In this link you have an example of using attachments with ABAP proxy Step by Step guide to develop Outbound ABAP Proxy with PDF attachment. - ABAP Development - SCN Wiki

Later, dont forget on your SOAP receiver to set the checkbox Keep Attachments.

First of all, you can try with SOAPui tool, in order to know if you don't anything special, as MTOM encoding.

Regards.

Former Member
0 Kudos

Hai Vila , Can you give me some other links , its not given detail ... some thing missing in the procedure ..

iaki_vila
Active Contributor
0 Kudos

Hi Vignesh,

You need to work with the class if_wsprotocol_attachments. Check this Michal's blog

Regards.

Former Member
0 Kudos

getting error like get_protocol is "Method "GET_PROTOCOL" is unknown or PROTECTED or PRIVATE".

TRY.

            attch_protocol ?= TEST->get_protocol( if_wsprotocol=>attachments ).

             g_attachment = attch_protocol->get_attachment_from_binary(

             data = g_attach_xstring

             type = if_ai_attachment=>c_mimetype_pdf

             name = 'PDF Attachment' ).           " Name of PDF to be uploaded

             APPEND g_attachment TO g_attachments.

             attch_protocol->set_attachments( g_attachments ).

*Sending Proxy fields to XI through EXECUTE ASYNCHRONOUS Method.

             CALL METHOD TEST->execute_asynchronous

               EXPORTING

                 output = g_t_header.

           CATCH cx_ai_system_fault INTO lo_sys_exception.

             COMMIT WORK.

         ENDTRY.

CATCH cx_ai_system_fault INTO lo_sys_exception.

   ENDTRY.

iaki_vila
Active Contributor
0 Kudos

Hi Vignesh,

Have you defined:

DATA attch_protocol TYPE REF TO if_wsprotocol_attachments.

?

Check your proxy object, you should have GET_PROTOCOL like public:

More inforamation about this method on Klimov's blog

Regards.

Former Member
0 Kudos

you have screens which you implemented for PDF in the Proxy .. If there , Please share to me .

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Use ABAP proxy and send pdf as an attachment and then either read that attachment in PI and send it as a part of soap body (in encoded format) or send that pdf directly as an attachment to ur receiver system.

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Amit , How to send the pdf directly as an attachment to ur receiver system? any Procedure or Screens sorts or documents you have ?