Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Variable Substitution Error

Hi I am Using Variable Substitution for Receiver Filename

I am Getting the Following Error

Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: FileName:

I have Given these values in the Adapter

Variable:FileName

Refernce:payload:ZLOGOS_SOACITY_MESSAGE,1,FileName,1,Source,1

Note: But In the data type I have defined Filename and Source Occurence as 0 to unbounded

I am doing Multi Mapping also

This is my source structure, for Muti-Mpping I will remove the additional Tags.<ns0:Messages>....

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

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
   <ns0:Message1>
      <ns1:ZLOGOS_SOACITY_MESSAGE xmlns:ns1="http://soacity.net/CopyFile">
         <ID/>
         <CORRELATIONID/>
         <TRANSACTIONID/>
         <SERVICE/>
         <AGENT/>
         <ROUTES/>
         <TASKNAME/>
         <DEPRECATIONDATE/>
         <COMMENTS/>
         <HEADER/>
         <TITLE/>
         <XMSDESTINATION/>
         <XMSDELIVERYMODE/>
         <XMSPRIORITY/>
         <XMSEXPIRATION/>
         <XMSREPLYTO/>
         <XMSTYPE/>
         <XMSREDELIVERED/>
         <XMSPROPERTIES/>
         <XMSUSERID/>
         <XMSAPPID/>
         <XMSDELIVERYCOUNT/>
         <XMSGROUPID/>
         <XMSGROUPSEQ/>
         <XMSPRODUCERTXID/>
         <XMSCONSUMERTXID/>
         <XMSRECEIVETIMESTAMP/>
         <XMSSTATE/>
         <BODY/>
         <FileName>
            <Source>TestFile</Source>
            <Struct>
               <Message>
                  <Id/>
                  <Head>
                     <Id/>
                     <Filename/>
                  </Head>
                  <Body/>
               </Message>
            </Struct>
            <Target>TestFile</Target>
            <Structure>
               <Message>
                  <Id/>
                  <Head>
                     <Id/>
                     <Filename/>
                  </Head>
                  <Body/>
               </Message>
            </Structure>
         </FileName>
      </ns1:ZLOGOS_SOACITY_MESSAGE>
   </ns0:Message1>
</ns0:Messages>

How should I define Variable Substitution for the Source field

Regards,

Varun

Edited by: Varun on Oct 16, 2008 11:01 AM

Former Member
Former Member replied

>>Is this xpath correct

No, You need to use it as

MT_Source,1,Message,1,Head,1,Filename,1

Thanks

SaNv...

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question