cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI CSV to Proxy Structure

Former Member
0 Kudos

Hi All,

I have scenario wherein I will be getting data from external PI system to my PI system through XI adapter so at external PI end receiver adapter will be XI adapter and at my end sender adapter will be XI adapter.

Now through XI adapter i will be getting CSV data in single field which i have to update in my SAP. For this I flow would be as follow

External PI to MY PI , my PI to my SAP ECC.

Since data coming through XI adapter would be in single field and of CSV format, I will have to convert this data into a structure say ABC having 30 odd fields. I have made inbound and outbound interface for same. Now once i have xml structure i will like to map this xml structure to my proxy structure which will hit my SAP ECC. Now the issue I am facing is there are 2 scenarios now 1st  Converting CSV data to XML structure using Java/ABAP mapping and second is XML structure mapping to proxy structure. Both these interfaces are independent of each other. Whereas I want that once I have got CSV data field it should be converted into xml and then proxy structure.

Please suggest how this could be achieved? Also if i will use ABAP mapping can i call second outbound interface inside it?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Niraj,

You can also do this using single mapping. CSV to PROXY.(use substring function to differentiate the fields and then create the target structre using ABAP code(PROXY) ).

Hope this helps.

Thanks.

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Both these interfaces are independent of each other. Whereas I want that once I have got CSV data field it should be converted into xml and then proxy structure.

I'm not sure if I get your question correctly. You can actually link these two in your operation mapping:

1. Specify the csv structure as your Source Interface

2. Specify the proxy structure as your Target Interface

3. Use two mappings in this order: Java/ABAP Mapping, then normal message mapping. Take note that in your operation mapping ,you can add additional mappings by clicking the add icon.

Hope this helps,

Mark

Former Member
0 Kudos

Thanks Mark for your reply.

But in my case I have 3 structures CSV , XML structure and proxy structure.

If proxy and XML structure was same we could have easily done this using operational mapping and defining 2 mapping programs in it but what should be done now?

Former Member
0 Kudos

Hi Niraj

I think Mark's response will suit you eeasily.

Step1 is to convert CSV into a meaningful XML-> Mapping 1

Step2 map the XML with the Proxy Structure -> Mapping 2

What is the challenge you are facing in this approach?

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

     This is exactly the case. In your first mapping, that would be CSV to XML. 2nd mapping is XML to proxy. The output of the first mapping is the input to the second mapping. The final output would still be your proxy structure since this is the last mapping specified in OM. Try it first and then get back to us.

Regards,

Mark

Former Member
0 Kudos

My challenge is xml structure generated and proxy structure both are different