cancel
Showing results for 
Search instead for 
Did you mean: 

Map structure against single value - SAP Cloud Platform Integration

former_member197479
Active Participant
0 Kudos

Hello Experts,

I'm currently experiencing some issues with a message mapping in SAP Cloud Platform Integration, basically I have an XML that looks like this:

        <javascript_variables>
            <name>name</name>
            <value>Juan</value>
        </javascript_variables>
        <javascript_variables>
            <name>NumSuscriptor</name>
            <value>8000000</value>
        </javascript_variables>
        <javascript_variables>
            <name>email</name>
            <value>correo@correo.com</value>
        </javascript_variables>
        <javascript_variables>
            <name>description</name>
            <value>alsoValue</value>
        </javascript_variables>


As you can see, those javascript_variables contain both name and value underneath, what I am trying to accomplish is the following: My target message has, let's say a BuyerID where I want to assign the value of the tag, where the name is equals to 'NumSuscriptor', that's the condition that makes the difference between assign it to the BuyerID, or to the Email target tag, for instance.

Within the Message Mapping I'm trying to do the following, validate if name == 'NumSuscriptor' then assign the Value, but it just doesn't work.

Accepted Solutions (1)

Accepted Solutions (1)

Sriprasadsbhat
Active Contributor

Hello Melvin,

Can you check the context of name and value fields.You can use simulate and display queue function to check whether this field is resulting in proper output you are expected.

Below blog will help you to do the same.

https://blogs.sap.com/2018/06/22/sap-cloud-platform-integration-message-mapping-display-queue/

Regards,

Sriprasad Shivaram Bhat

former_member197479
Active Participant
0 Kudos

Thanks for the feedback on that functionality Sriprasad, here a screen capture of how it looks like:

I believe it looks good, it is suppressing the data I don't need (some of the fields appear repeated, once normal once in italic, I don't think that really matters)

So the value 800000 should be reaching the BuyerPartyID, however when I run the simulate, I get an error saying that nothing is reaching there:

Do you have any more insights?

Answers (1)

Answers (1)

apu_das2
Active Contributor
0 Kudos

As Sriprasad said, Check the context once.

I guess, current context of name is element . You can use remove context just after name and before equals. It should work.

Thanks,

Apu Das