Skip to Content
author's profile photo Former Member
Former Member

Receive CSV attachment via Mail Adapter and process into ABAP proxy

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2008 at 02:10 PM

    > 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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 07, 2008 at 07:43 PM

    Check Michal's blog:

    https://blogs.sap.com/?p=41601

    and the online help.

    Regards

    Stefan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2008 at 08:39 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Stefan Grube

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.