cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding SAP PI mapping

Former Member
0 Kudos

Hi Experts,

  I have a following situation. Please help.

Sender structure:                                                                                  

Records                                                                                                    

    Record                                 0.. unbounded

         ShipmentLegs                  0.. unbounded

                   ShipmentLeg          0.. unbounded

                              Name        0..1

                   ShipmentLeg          0.. unbounded

                              Name        0..1

                   ShipmentLeg          0.. unbounded

                              Name        0..1

                                          

so on.....


FYI: ( ShipmentLeg node has the same hierarchy. It might get disturb after posting the query, In case)


Receiver Structure:

Records                                                                                                    

    Record                                 0.. unbounded

         name1                             0.. unbounded

      

Name of sender structure is mapped to name1 of Receiver structure       

I need to get all the Name field values of sender structure in my receiver in one stretch. I tried with many options but it did not work.

Could anyone please help.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

>>>I need to get all the Name field values of sender structure in my receiver in one stretch.


Please elaborate.  Else provide sample input and expected output


Aren't you getting the desired output by mapping the Shipment leg -> Record and Name to Name1

Former Member
0 Kudos

Hi Hareesh,

   I am not getting the desired result.by mapping Shipment leg -> Record and Name to Name1, only first value is being transformed to Target.

Here is the complete sender structure

Sender structure:                                                                                

Records                                                                                                  

    Record                                 0.. unbounded

         ShipmentLegs                  0.. unbounded

                         ShipmentLeg              0.. unbounded

                                        81065             0..1

                   ShipmentLeg          0.. unbounded

                              81066         0..1

                   ShipmentLeg          0.. unbounded

                              81067        0..1

After mapping, only the first value i.e. "81065" is showing at the receiver. I want all the values i.e. 81065, 81066 and 81067 at the receiver.

Expected Target:

                                                                            

Records                                                                                                   

    Record                                 0.. unbounded

         81065

         81066

         81067

                  

Let me know, If I need to provide some other info.

rcsegovia
Active Participant
0 Kudos

Hi Veer Kumar,

I guess your problem is that value-field is 0..1, so you will get only one value per record.

Change the cardinality 0.. unbounded in you value-field.


cheers,

Roberto.

former_member184720
Active Contributor
0 Kudos

Constant(blank) -> Record

Change the occurrence of name1(target field) to 0..unbounded

mapping :

Name-> remove context -> Target Filed

Former Member
0 Kudos

Hi Veer,

Do like below.

Record to Record

Name to Name

and also change the context of Name to Record.

Check the screen shot attached.

Regards,

Santhi

Former Member
0 Kudos

I have already made it to 0..unbounded.

But all the values are coming in 1st record.

former_member184720
Active Contributor
0 Kudos

This is what your expected structure shows right?

Former Member
0 Kudos

Hi,

  Please see the mapping screenshot.

If, there are two occurences of ShipmentLegs under main node ShipmentLeg. Then I want the values of ShipmentLegs two times at receiver. If 3 then 3 times at receiver.

But When I mapped

Field (source) ==> Remove context ==> Field (receiver) then, it is giving all the ShipmentLegs value of all the records ( say 50).

Hope I am clear to all.

Former Member
0 Kudos

Hi Veer,

Don't need to map the root node.

Map like below.

ShipmentExtractRecord   ---->  Records

ShipmentLegId   ---->  ShipmentLeg  (Don't do remove context , instead change the context of ShipmentLegId to ShipmentExtractRecord.)

Regards,

Santhi

Answers (0)