cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP attachtment

Former Member
0 Kudos

Hi Experts,

My scenario is SOAP to PROXY/RFC

I have to read a Invoice ( PDF ) file as a attachment using soap  and send to ECC.

I know that in PI 7.3 i can read a file as attachment using soap communication channel but then what i dont know is how to send it to ECC.

And also how ECC would read it. Basically ECC should read it and attach the same file in the invoice created.

one approach is to create a FM in ECC, the FM will have a field of type base64 encoding which can hold binary data.

For that i have to read the attachment in PI and convert it into binary and send this to that field in FM. Is it a good approach?

is there any better solution?

Accepted Solutions (0)

Answers (3)

Answers (3)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

My scenario is SOAP to PROXY/RFC

I have to read a Invoice ( PDF ) file as a attachment using soap  and send to ECC.

I know that in PI 7.3 i can read a file as attachment using soap communication channel but then what i dont know is how to send it to ECC.

And also how ECC would read it. Basically ECC should read it and attach the same file in the invoice created.

You could avoid reading the attachment in PI by just passing it through and letting it arrive in ECC as is.

Michal has a blog about abap proxy with attachments http://scn.sap.com/community/pi-and-soa-middleware/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies...

You just have to do the opposite, try using GUI_DOWNLOAD in your inbound abap proxy code .

Hope this helps,

Mark

nabendu_sen
Active Contributor
0 Kudos

Hi Sam,

Simply if you select 'Keep Attachment' option in Sender SOAP Adapter, you would be able to push the attachment within PI.

After that you can read the PDF and convert it into XML through Adapter Module or Java Mapping. Then you can populate IDoc / RFC / Proxy structure and trigger the same to ECC.

Adapter Module: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9913a954-0d01-0010-8391-8a3076440...

For sample basic Java Mapping, see the reply of Anupam: http://scn.sap.com/thread/3190504

Another option is Open Source, not sure how much would be helpful:http://scn.sap.com/community/pi-and-soa-middleware/blog/2005/07/31/xi-read-data-from-pdf-file-in-sen...

Former Member
0 Kudos

Hi Nabendu,

Thanks for the effort but my requirement is different.

there is no requirement to read the data inside the PDF. I have to pass the PDF as it is.

nabendu_sen
Active Contributor
0 Kudos

Hi Sam,

I got your point, that means it would be a Bypass Interface to PI and no need of Data transformation within PI.

If you are using any Function Module to handle this PDF attachment at SAP ECC side, you can just expose that Function Module as Web Service itself, in that case you don't need to use SAP PI at all.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f02b33fc-9eb1-2c10-0599-f2ef9fb5c...

But if you want to use PI, then at your Sender SOAP you can select 'Keep Attachment' and same at receiver SOAP.

baskar_gopalakrishnan2
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Baskar,

Thanks , but i have already seen that blog.

Can you please comment on my approach?

one approach is to create a FM in ECC, the FM will have a field of type base64 encoding which can hold binary data.

For that i have to read the attachment in PI and convert it into binary and send this to that field in FM. Is it a good approach?