cancel
Showing results for 
Search instead for 
Did you mean: 

multiple mapping and variable substitution - error

dichaudhuri
Explorer
0 Kudos

how to use varaible substitution with multiple mapping ?

My structure is :

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

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

   <ns0:Message1>

      <ns1:ABC xmlns:ns1="http://abc.xyz.com">

         <ABC>

            <Field1>2015-01-23</Field1>

            <Field2_ID>1111</Field2_ID>

            <Field3>hello</Field3>

            <Field4>Car</Field4>

         </ABC>

<ABC>

            <Field1>2015-01-23</Field1>

            <Field2_ID>2222</Field2_ID>

            <Field3>hello</Field3>

            <Field4>Car</Field4>

         </ABC>

<ABC>

            <Field1>2015-01-23</Field1>

           <Field2_ID>3333</Field2_ID>

            <Field3>hello</Field3>

            <Field4>Car</Field4>

         </ABC>

      </ns1:ABC>

   </ns0:Message1>

</ns0:Messages>

my variable substitution i am putting in the channel is : - var1    payload:ABC,1,ABC,1,Field2_ID,1

Error :-

MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var1

Accepted Solutions (1)

Accepted Solutions (1)

dichaudhuri
Explorer
0 Kudos

this is done. - issue was setting up the context in message mapping and the variable had a capital letter in it.

Answers (7)

Answers (7)

Former Member
0 Kudos

Glad to hear that Diptendu:)

Former Member
0 Kudos

Hey Diptendtu,

I am fine as well:)

Please help with the screen shots from the test mapping tab..Seems like an issue with the variable declaration.

Regards,

Sriram

Former Member
0 Kudos

Hi Diptendu,

How are you doing? Is the occurence of the node ABC 1..unbounded?

Please try var1    payload:ABC,1,Field2_ID,1

Regards,

Sriram

dichaudhuri
Explorer
0 Kudos

good buddy - howdy?

yes - 1..unbounded - tried that

Former Member
0 Kudos

Hi Diptendu

Please make sure that you haven't use file content conversion in the receiver adapter where you have used variable substitution. Variable substitution only work for xml payload.

Secondly try to use a different name for message type and it's child root node. In your case you have used ABC in both case.

Try to use message type name 'XYZ'.

var1    payload:XYZ,1,ABC,1,Field2_ID,1


Thanks,

Indrajit

Former Member
0 Kudos

Hello Diptendu,

Pease send the screenshot of Message mapping from Test Tab with some test data executed and 'ABC' node expanded till field 'field2_ID'.

Regards,

Pradeep

Former Member
0 Kudos

Hi Diptendu,

Did you put var1 within %% in file name schema or directory wherever applicable?

Regards,

Soumyadip

dichaudhuri
Explorer
0 Kudos

yes

Former Member
0 Kudos

Hi Diptendu,

If you are using this variable to substitute any directory name from runtime value. Then can you check if that particular directory is exist or not.

Regards,

Soumyadip

sendhil_kumar
Active Participant
0 Kudos

Hi Diptendu,

Can you please provide your MT screenshot.

--

Sendhil

dichaudhuri
Explorer
0 Kudos

using XSD - no message type.

Former Member
0 Kudos

Hi,

share your communication channel screen shot and message mapping screenshot also.

Try this

var1    payload:Messagetypename,occurance,rootnode,occurance,field,occurance.

sahithi_moparthi
Contributor
0 Kudos

Hi,

Please try as below:

variable substitutio : - var1    payload:ABC,1,ABC,1,ABC,Field2_ID

dichaudhuri
Explorer
0 Kudos

var1    payload:ABC,1,ABC,1,ABC,Field2_ID - why the third ABC ?