cancel
Showing results for 
Search instead for 
Did you mean: 

Receive CSV attachment via Mail Adapter and process into ABAP proxy

Former Member
0 Kudos

Hi,

I have the following scenario:

1. Receive e-mail with CSV attachment

2. Process through Mail adapter (KeepAttachments = Yes in order to retain the CSV attachment)

3. Receive into ABAP proxy (with CSV attachment)

The next step is to read the attachment in the ABAP proxy and process the CSV attachment data into CRM.

The CSV attachment contains the data I wish to process - the body of the e-mail will not contain this information.

The problem I have is reading the attachment data in the proxy - not sure of the methods/class to call - anyone got any ideas ?

Another question is this the best way to do this and process the CSV attachment data ?

I know I could use the PayloadSwapBean to switch the payload to the attachment but then I am stumped with how the attachment is processed through PI 7.1 - how do you transform the CSV format payload into XML so PI will be able to process it through mapping.

Either option is viable - an answer to either question would be great.

1. How do you read the attachment data in an inbound ABAP proxy ?

2. How do you transform the CSV attachment data after the PayloadSwapBean from CSV to XML ?

Kind regards

Colin.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Colin

As you are not interested in processing the body of email. Swap the payload to the attachment using the PayloadSwapBean

Change the content from CSV to XML using MessageTransformBean. Now pass this information to Proxy. You dont need to deal with attachments in proxy.

It is not possible to read attachment in server proxy because the class and interface you create will not have data type which can refer to an attachment processing interface in ABAP.

Thanks

Gaurav

Former Member
0 Kudos

Hi,

With regard to the MessageTransformBean, what parameters do you need to add to transform from CSV to XML ?

Cheers

Colin.

Former Member
0 Kudos

Hi Stefan,

I have done the same a syou proposed and while testing I found some strange thing that sometimes the Mail document is converted into XML and Sometimes the Attachment is treated as main document and converted into XML , is there any other things to be added in order to tell adapter to treat the attachment as main payload.

Thanks,

Kiran

stefan_grube
Active Contributor
0 Kudos

Check Michal's blog:

and the online help.

Regards

Stefan

Former Member
0 Kudos

> 1. How do you read the attachment data in an inbound ABAP proxy ?

Hi,

In my opinion, if your CSV attachment can be dropped to Application Server (R3) directory then in inbound proxy we can use the ABAP statement "Open Dataset" & "Read Dataset" etc to read and execute the data.

But I don't have any idea how you are sending this attachment to Proxy.

Regards,

Sarvesh