cancel
Showing results for 
Search instead for 
Did you mean: 

Multiline mapping

Former Member
0 Kudos

Hi,

There are many invoices present in the incoming message.

I have to make a single Bapi call for each invoice.

For this purpose in the BPM I need to map the message to a multiline container, so that in the next block I can loop each line of this multiline container to the required Bapi.

Now, I have this problem in the mapping of the received message into a multiline container. The transformation step in BPM is not giving any result in the output.

For your reference, I am giving below the input and result of the mapping (into a multiline container below) I need

1. Input:

<ns1:MT_scan_invoice xmlns:ns1="urn:customers:invoice">

<Invoice>

</Invoice>

:

:

<Invoice>

</Invoice>

</ns1:MT_scan_invoice>

2. Result needed:

<ns1:MT_scan_invoice xmlns:ns1="urn:customers:invoice">

<Invoice>

</Invoice>

</ns1:MT_scan_invoice>

<ns1:MT_scan_invoice xmlns:ns1="urn:customers:invoice">

<Invoice>

</Invoice>

</ns1:MT_scan_invoice>

I have done mapping where, I have mapped the "Invoice" node (which is unbounded) to the target node of "MT_scan_invoice ".

I am using the same message in the source and target side of mapping.

In the 'Messages' tab of message mapping and in the 'Design' tab of interface mapping, I have changed the occurrence of the target message to '0..unbounded'. Also in the BPM the target container is multiline.

The interface and message mapping in stand-alone mode is giving successful outputs. (as desired)

Still the transformation step in Runtime is giving an empty output. Did I miss something in the mapping?

Kindly help. For the last 2 weeks, I am stuck with this issue.

Also kindly suggest alternate methods to generate a multiline container.

Thanks,

John

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi John,

in Repository: Goto SWV: SAPBASIS. YOu will find a sample delivered by SAP. BPM: MultipleFlightBookingCoordination.

In this BPM an incoming multiline message is split into single lines. The single lines are send (async) to different receivers. (In your case it is the same receiver that is call n-times but synchronous).

At the end the responses get merged.

If you replace the async send/receive step with you BAPI call, it is very similar.

Hope this helps

regards Mario

Former Member
0 Kudos

Hi Mario,

I tested the sample BPM by creating one receiver and one interface determination.

But the 'MultipleFlightBookingCoordination' also is not giving any output in the first mapping.

I used the sample payload given below.

<?xml version="1.0" encoding="UTF-8"?>

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:MultipleBookingOrderRequest xmlns:ns1="http://sap.com/xi/XI/Demo/Agency">

<AgencyID>1</AgencyID>

<OrderNumber>2</OrderNumber>

<FlightClass>2</FlightClass>

<BookingOrderList>

<ItemNumber>3</ItemNumber>

<FlightID>

<AirlineID>4</AirlineID>

<ConnectionID>5</ConnectionID>

<FlightDate>6</FlightDate>

</FlightID>

<PassengerData>

<Surname>6</Surname>

<FirstName>7</FirstName>

<Birthdate>8</Birthdate>

</PassengerData>

</BookingOrderList>

<BookingOrderList>

<ItemNumber>3</ItemNumber>

<FlightID>

<AirlineID>4</AirlineID>

<ConnectionID>5</ConnectionID>

<FlightDate>6</FlightDate>

</FlightID>

<PassengerData>

<Surname>6</Surname>

<FirstName>7</FirstName>

<Birthdate>8</Birthdate>

</PassengerData>

</BookingOrderList>

</ns1:MultipleBookingOrderRequest>

</ns0:Message1>

</ns0:Messages>

The first transformation mapping is supposed to split the message.

But this is not happening. In the trace of BPM, the out message is empty.

Kindly do a simple test and help to see what is wrong.

Even after raising OSS call, this issue is pending.

Thanks,

John

Answers (2)

Answers (2)

former_member187339
Active Contributor
0 Kudos

Hi John,

>>I am using the same message in the source and target side of mapping.

What is the occurrence for each node and field of input?

>>I have done mapping where, I have mapped the "Invoice" node (which is unbounded) to the target node of "MT_scan_invoice

I think you should consider this as 1:n mapping and need not do this

>>In the 'Messages' tab of message mapping and in the 'Design' tab of interface mapping, I have changed the occurrence of the target message to '0..unbounded'. Also in the BPM the target container is multiline.

Instead do like this:

1. Create a MM. Go to signature, add source MT one time and target MT twice

2. Create IM in the same way and test the scenario

Regards

Suraj

Former Member
0 Kudos

Hi John,

In your multimapping, are you able to see multiple messages generated on the target side?

Do you have a asynchronous interface or is it a sync one? FYI: If its an asynch, you can achieve 1:n scenario without BPM also. Check : http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417200%29ID1316049750DB0128940172875714244...

For multimapping using BPM, check http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417200%29ID1316049750DB0128940172875714244...

Pooja