cancel
Showing results for 
Search instead for 
Did you mean: 

Parsing XML File for IDOC and BAPI

raviteja_satuluri
Contributor
0 Kudos

Hi Experts,

I got One new requirement.

We are getting One file from sender system that is XML File.The File will be parsed in to 2 Files for SAP IDOC and BAPI.

How to Achieve this Requirement ??

What are the objects we need to design and Configure in ESR and ID.

Can Any One tell me the procedure which i need to follow.

File---->PI---->Idoc and BAPI

It will helpful to me a lot.

Thanks and Regards,

Ravi

Accepted Solutions (1)

Accepted Solutions (1)

former_member183816
Active Participant
0 Kudos

You have 2 option, Interface split and Mapping based message split.

Defining Message Splits - SAP NetWeaver Process Integration - SAP Library

ESR:

1 outbound interface: sender to PI

2 inbound interface: PI to IDOC & PI to BAPI.

in case of interafce split: 2 message mapping for each interface (Source to IDOC and source to BAPI)

in case of Mapping based message split: 1 message mapping (Source to Messages)

Your mapping Traget structure will look like this,

<Messages>

    <Message1>

         IDOC

    </Message1>

    <Message2>

         BAPI

    </Message2>

<Messages>

ID:

Two channels for each inbound interface.

Use extended receiver determination in case of condition based receiver determining.

You will get option to choose mappings accordingly for multiple receivers in interface determination.

For more details regarding ESR and ID objects, refer above link.

raviteja_satuluri
Contributor
0 Kudos

Hi Ambuja,

Thanks for your reply.

Can you please tell me my requirement is comes under either interface split or mapping based message split...

The link which you specified is Configuring a Message Split with Different Receiver Systems.

but in my case there is only one receiver system.

In this case what are the configuration steps in ID.

Please let me know.

Regards,

Teja.

raviteja_satuluri
Contributor
0 Kudos

I think my requirement comes under Mapping based message split.

but how to configure in ID for a single receiver system.

Please let me know.

Regards,

Teja.

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Teja,

Yes, it is possibe to achieve 1:N mapping with out using BPM.

Please refer the below blog by Jin:

Let me know if you struck any where.

Regards

Vishnu

former_member183816
Active Participant
0 Kudos

Normal ID configuration. You just have to specify your channels separately in receiver agreement accordingly (if you are not using ICO) .

Following is a screen shot of I Flow for scenario like this for your understanding.

ICO:

For each receiver service interface, you will define corresponding communication channel for same receiver system.

raviteja_satuluri
Contributor
0 Kudos

Hi Ambuj,

Thanks for your reply.

We are using PI 7.1 dual stack. I wish to design and configure the objects below.

Please guide me if any thing went wrong

ESR Part:

Sender                                                                                                                     Receiver

--------------------                                                                                                    --------------------------

One data type                                                              No need to create DT,MT,SI for Idoc and RFC

One Message type

One Service Interface

                                           Message Mapping (Multi mapping)

                                            Operation Mapping

ID Part

Sender                                                                                                                     Receiver

--------------------                                                                                                    --------------------------

One BS/BC                                                                                    One BS for Idoc and One BS for RFC

Sender CC                                                                  Two Receiver CC, One for Idoc and One for RFC

Sender Agreement                                                                                          Two Receiver Agreements

                                             Receiver determination

                                             Interface determination

Please guide me whether i am going on right way if any thing going wrong please let me know.

Thanks in Advance,

Regards,

Teja.

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Teja,

Yes, you are in the right way. Go ahead and configure and do the testing.

You can also refer the below blog for your reference.

Multi-Mapping without BPM - Yes, it’s possible!

Please let us know if you get struck anywhere.

Regards

Vishnu

raviteja_satuluri
Contributor
0 Kudos

Hi Vishnu,

Thanks for your reply.

I have one doubt, Here I have to post the data to only Single Target system.

Can i go for standard or extended receiver determination ?

If i go standard how to maintain the conditions in Receiver determination and how to maintain Interface determination Similarly if extended receiver determination.

Can you share the screenshots for receiver determination and Interface determination.

Thanks in advance,

Regards,

Teja

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Teja,

Use Standard Receiver determination and mention the ECC business component.

In Interface determination, use standard interface determination only and use your interface mapping which created in IR.

As the interface mapping yields you two messages(IDOC & RFC messages), create two receiver agreements accordingly for the transfer of these messages to the ECC system.

Regards

Vishnu

raviteja_satuluri
Contributor
0 Kudos

Hi Vishnu,

What is the occurrence i need to maintain for source and target messages in message mapping and operation mapping 1..1 or 0..unbounded. if 0..unbounded please let me know the reason why we are maintaining.

Please find the below images

Here i am doing multi mapping. While doing multi mapping what are the occurrences we need to maintain in message mapping and operation mapping

Thanks in advance,

Regards,

Teja.

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Teja,

In the source side, just maintain 1:1 occurrence.

Coming to the target side, maintain 0:1 or 0:unbounded, whatever the occurrence you are giving here applies to the message type of the target which you can see in the Definition tab of message mapping.

I assume in your case, from the source file, you want to split to one IDOC message and one BAPI message, so in message mapping maintain 0:1 for the target messages.

In Operation mapping, just keep the target service interfaces occurrence as 1:1.

Regards

Vishnu

raviteja_satuluri
Contributor
0 Kudos

And I am getting more than One file from Sender system.

In this case what is the Occurrence should i have maintained.

Please let me know

Thanks in advance,

Regards,

Teja.

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Teja,

At a time, only one message comes from source right, then this setup solves your requirement.

By more than one file from Sender, what exactly do you mean?

Regards

Vishnu

raviteja_satuluri
Contributor
0 Kudos

Hi Vishnu,

Thanks for your reply.

When i am going to testing in PI Level it is fine at Message mapping, Operation mapping and Test Configuration Levels.

When i pushed message from RWB to IE, I am Getting One error.

Please find the below screenshot.

Please help on this and i have used standard receiver determination.

Regards,

Teja K.

raviteja_satuluri
Contributor
0 Kudos

Hi Mishra,

Thanks for your reply. I am using PI 7.1 dual stack.

I am getting source file from sender system that will be parsed in to two and one is for idoc and one is for BAPI is need to be posted.

Can you please help to me whether i need to go for Standard receiver determination or Extended. if Extended can you share the screenshot for me how i will configure receivers

Thanks in advance,

Regards,

Kamal.

former_member183908
Active Contributor
0 Kudos

can you try test end to end instead of testing from PI RWB.error explains about the two channels with different runtime which belongs to IE and AAE.

Thanks

iaki_vila
Active Contributor
0 Kudos

Hi Kamal,

In PI 7.1 IDOC adapter is in integration engine (ABAP) and RFC adapter is in adapter engine (Java), multi-mapping utility is not supported by ABAP adapters. Is it possible that you or your ABAPers colleagues can modify the endpoint code and to wrap the IDOC with an RFC?, in this way you will can avoid your last issue.

IDOC_AAE, IDOC on the Java stack, is on PI 7.31 and upper versions.

Regards

raviteja_satuluri
Contributor
0 Kudos

Hi Vila,

Thanks for your reply.

1:N multi mapping will works definitely. I think the as pavan said end to end testing will success.



Regards,

Kamal.

Answers (3)

Answers (3)

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Ravi,

Yes, as suggested above, you can go for multi mapping(1:2), one file which needs to be converted to IDOC & BAPI structure.

Regarding Development approach, just follow normal development approach only but in case of receiver just you need to include those two in your operational mapping and message mapping.

In ID part, you need to define two receiver agreements.

Regards

Vishnu

former_member193376
Active Contributor
0 Kudos

The blog that Inika has provided is a very good to follow. in addition to that, please go through the below thread where multimapping for idocs are possible(check Eng Swee answer)

Thanks

Saiyog

iaki_vila
Active Contributor
0 Kudos

Hi Ravi,

As you need to parse the file to the RFC interface and IDOC interface, you will have two different XMLs. You can try with multi-mapping: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1...

I'm not sure the ABAP IDOC adapter is supported in multimapping, if it is possible i would talk with ECC developer in order to wrap the IDOC with a RFC, and you will have two RFCs, totally feasible with multimapping.

Regards.

raviteja_satuluri
Contributor
0 Kudos

Hi Vila,

Thanks for your reply.

Here I am getting the single file from sender system and it should parse in to two files for IDOC and BAPI.   Can you explain the procedure of Development approach.

Thanks and Regards,

Teja.

iaki_vila
Active Contributor
0 Kudos

Hi Ravi,

If you check

raviteja_satuluri
Contributor
0 Kudos

Hi Vila,

Thanks for your reply.

In case of PI----> BAPI which adapter we need to use either RFC or Proxy.

here the adapter is not defined in FS and using BAPI Structure.

If we go for RFC....adapter for PI---->RFC.

How we can use adapter as asynchronous..

is there any standard SAP module

what are the configurations we need to do in Module parameter..

Thanks and Regards,

Teja.

former_member193376
Active Contributor
0 Kudos

Use the rfc channel. You don't have to do any module configuration. Import your bapi into pi and use that structure.

Regards,

Saiyog

raviteja_satuluri
Contributor
0 Kudos

Please find the above specified Message flow.

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Ravi,

Use RFC channel.

In case of RFC's, the mode depends on BAPI coding, whether it sends out any response or not.

Since I guess you need asynchronous mode, which means BAPI just needs to take the request and process in ECC. You can check with any ABAP person on this.

Regards

Vishnu

raviteja_satuluri
Contributor
0 Kudos

But RFC is by default for Synchronous.

How to use RFC as asynchronous i am not expecting the Response or

While taking BAPI at Message mapping shall we take only the Structure with out response.

Like Assume BAPI_Material_ExistingCheck after importing BAPI, we use this in Message mapping at that time it will ask

BAPI_Material_ExistingCheck

BAPI_Material_ExistingCheck_Responce.


so at that time we will take the structure with out response

Regards,

Ravi.