Skip to Content

Map structure against single value - SAP Cloud Platform Integration

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.

untitled.png (58.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Dec 21, 2018 at 08:56 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 21, 2018 at 11:54 AM

    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

    Add comment
    10|10000 characters needed characters exceeded