cancel
Showing results for 
Search instead for 
Did you mean: 

Issue regarding SAP PI mapping

Former Member
0 Kudos

Hi Experts,

   I am facing a mapping issue. Please find the attached screenshot of the XML node/subnode and the mapping fields.

In Capture 2, Vendorcode ( attribute) is mapped to carrier vendor code. There are 500 records in 1 file. This gets converted into CSV at the receiver side.

All the other fields are coming as expected except the "CarrierVendorCode" This particular field is coming as expected for the first 5 records and after that it takes the value from the field value ( carriervendorcode) of previous record. and it goes on till the nth record.

Please help me with the same.

Regards

Accepted Solutions (1)

Accepted Solutions (1)

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Veer,

As it is a simple one to one mapping, there should not be any issue.

As pradeep said, can you please share us the Display queue values of VendorCode attribute, and also the receiver element carriervendorcode for better understanding of the issue.

Regards

Vishnu

Former Member
0 Kudos

Hi Pradeep/Vishnu/Santhi,

   I have tried changing the context before also but it did not work.

integration flow is Third party --> PI --> SAP BW

Please see the output screenshot.

Here TDLNR is the Carrier Vendor Code.

, TDLNR for the LOAD_ID i.e. 45050627 is 600020 but it is showing as 625006 ( taken from the other adjacent record)

similarly, TDLNR i.e. 625006 is for the LOAD_ID i.e. 45077014 but it is showing some other value.

Initail, TDLNR value for the first 9 records came correctly after that it got jumbled up.

Pls help.

Former Member
0 Kudos

Please find the Display queue values of VendorCode attribute, and also the receiver element carriervendorcode

Capture 1 : Display queue values of VendorCode attribute

Capture 2: Display queue values of  receiver element carriervendorcode



Former Member
0 Kudos

Hi Vishnu,

   As I have already mentioned, in test tab, it's working fine once I change the context but the final output which is the .CSV file, all values of CarrierVendorCode gets jumbled up.

Former Member
0 Kudos

Hello Veer,

One Question:

For the payload that you are executing for any data is there a case where occurence of vendorCode is multiple for a single RoutingPlan?

Regards,

Pradeep

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Veer,

If I understand correctly, after making changes to the context level, at mapping level, you are getting the required values, but to the final output at the receiver end, the sequence issue is coming.

Did you find any pattern of the inconsistent sequence that exists for the carriervendor code field values in the output.

Also, can you share us the FCC parameters that you are using at the receiver channel level.

Regards

Vishnu

Former Member
0 Kudos

Hi Pradeep,

   Vendorcode is the attribute of the Node  "Carrier" ( 0 to 1).

Here is the XML part right from the main node which is "RoutingPlans". RoutingPlans is one of the subnode of the root node i.e. LoadExtractRecords

Former Member
0 Kudos

Hi Vishnu,

  You are right. after making changes to the context level, at mapping level, I am  getting the required values, but to the final output at the receiver end, the sequence issue is coming only for one field i.e. "CarrierVendorCode".



Just to mention that inconsistent pattern is only coming for one field i.e. "CarrierVendorCode". The values are getting jumbled up...

There is no FCC written at PI. I am generating the output XML file and ABAP proxy code is written to convert XML file to .CSV file and placing at AL11 location.

Regards

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Veer,

Do you mean the scenario is xml-file to proxy scenario?

If yes, then can you check with the abap person on the code written for validating this carriervendorcode while converting this xml file to flat file.

You can check this from your end, by testing the same payload in non-production environment but replace the proxy channel with some file channel which could just places the file in PI AL11 directory.

From this, you can come to know whether the issue is there in the mapping level or in the proxy code.

Regards

Vishnu

Former Member
0 Kudos

Hi Vishnu,

    Yes the scenario is xml-file to proxy scenario.

The xml FILE which PI is generating that also has inconsistent sequence. I have checked in SXMB_MONI ( In BW) .The ABAP program is just converting XML file to .CSV.

Regards

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Veer,

Then, we can narrow down the issue to the mapping level.

Can you check and let us know the mapping done to the target node Record.

The issue might with the right vendor code value is not passing it on to the corresponding occurrence of carriervendorcode element of the Record node.

If we can check on this, then we might get to the remedy part.

Regards

Vishnu

Former Member
0 Kudos

My apologies Vishnu.

Here is the mapping of top nodes. It's just one to one mapping..

Former Member
0 Kudos

Hi Veer,

Have you tried this combination in Message Mapping:

Change the Queue context of RoutingPlan and vendorCode to "LoadExtractRecords" and remove the RoutingPlan exist logic as vendorCode comes only into picture if RoutingPlan exist.

Do try this and let me know if it resolve your problem or not?

Regards,

Pradeep

Former Member
0 Kudos

Hey Pradeep,

  Thanks a lot. Thanks a lot . It worked.

As per your suggestion : I have Changed the Queue context of RoutingPlan and vendorCode to "LoadExtractRecord"  but I did not remove the RoutingPlan exist logic . It worked.

Now ALL THE RECORDS ARE COMING IN SEQUENCE in .CSV file.

I should have changed the context to root node instead of sub node.

Your suggestion worked.   Thanks again.

Former Member
0 Kudos

Your Welcome...

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Veer,

This issue may be arising because of Queue mismatch.

You can resolve it by adding 'mapwithdefault'  while mapping CarrierVendorCode.

This field will be mapped like:

VendorCode--->"mapwithdefault"--->CarrierVendorCode

Regards,

Pradeep

Former Member
0 Kudos

Hi Pradeep,

  I have already done this but still same issue. Is there any other suggestion, would be very greatful.

Regards

Former Member
0 Kudos

Hello,

Can you please put the screenshot of the Queue along with the payload so that we can have better understanding of the issue.

Regards,

Pradeep

Former Member
0 Kudos

Hi Pradeep,

  Please find the attached screenshot

1) Capture3 : screenshot of queue.

2) Capture4 : Vendor code is mapped to Carrier vendor code at receiver for Record 3. It's coming properly.

3) Capture 5 : Vendor code value is 613164 but is not there at receiver side.

One more info : The Vendorcode attribute comes under Routing plans. If node "RoutingPlans" occurs then only pass the vendor code value to receiver else pass NULL.

Mapping screenshot for the same : Capture 6.

Please do let me know, if you require anything else

Former Member
0 Kudos

Hi Veer,

This problem is because you are comparing value from two different context(Vendorcode and Routing plans).

You can change the Queue Context of Vendor code with the same as that of the Routing plans and I guess this will resolve the issue.

Can you please put the screenshot of the source Data Type for better understanding.

Regards,

Pradeep

Former Member
0 Kudos

Hi Veer,

I think it is happening because of the contexts.  Try to change  context of Vendorid to RoutingPlan.

Regards,

Santhi.

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Veer,

The issue is coming because of context difference in between RoutingPIan one and Vendorcode.

Try changing context of Vendorcode attribute to RoutingPlan and do the test.

Let us know if you still having issues.

Regards

Vishnu

RaghuVamseedhar
Active Contributor
0 Kudos

Veer,

Target node filed 'Records' should be mapped properly. You are converting nested XML to flat XML. Deepest node (like 'Carrier' or 'Status') should be mapped to target 'Records'. Then use 'useOneAsMany' if header elements needs to be repeated.