cancel
Showing results for 
Search instead for 
Did you mean: 

File adapter - Variable Substitution

Former Member
0 Kudos

Hi all,

I’m trying to use Variable Substitution functionality in my receiver file adapter. The objective is: During process message XI read the payload of an xml message and picks the value of tag <ORIGEM> coming with the File Name and do the substitution of File Name Schema of receiver file adapter.

This is what I have donned in the configuration of receiver file adapter:

File Name Schema: <b>R3%var1%.xml</b> (file construction mode: Add Time Stamp)

Variable Substitution: <b>Enable</b>

Variable name: <b>var1</b>

Reference: <b>payload:nr1:IfContabilizacao_Source_Log,1,INFO_CONTROLO,1,ORIGEM,1</b>

The XML Message:

<?xml version="1.0" encoding="utf-8"?>
  <nr1:IfContabilizacao_Source_Log 
xmlns:nr1="http://xi/XI/InterfaceContabilistico">
    <INFO_CONTROLO>
      <ORIGEM>TESTE</ORIGEM>
      <DESTINO>This is a string 2</DESTINO>
      <IDENTIFICACAO>This is a string 3</IDENTIFICACAO>
      <DATA>1999-01-24</DATA>
      <VERSAO>This is a string 4</VERSAO>
    </INFO_CONTROLO>
    <INFO_DADOS>
      <HEADER_DOCUMENTO>
        <BLDAT>1999-01-24</BLDAT>
        <BLART>C</BLART>
        <BUKRS>C</BUKRS>
        <BUDAT>1999-01-24</BUDAT>
         ...
    </INFO_DADOS>
  </nr1:IfContabilizacao_Source_Log>

When I execute the process both sxmb_moni flags are ok! But in the adapter monitoring I receive this error message:

2005-12-20 10:51:25 WET: Message processing failed: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var1

Var1 is the name that I have defined in variable name! Is wrong? Anybody see something wrong in this configuration or something in reference payload of tags hierarchy… I think that I have checked all…

Thanks in advance,

Ricardo.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

pls try this and check...

payload:IfContabilizacao_Source_Log,1,INFO_CONTROLO,1,ORIGEM,1

Former Member
0 Kudos

Renjith,

Adapter monitoring continues with this error mesage: VariableDataSourceException: The following variable was not found in the message payload: var1

This error means that the reference showed bellow have something wrong! But I can't see where is the error!!!

payload:IfContabilizacao_Source_Log,1,INFO_CONTROLO,1,ORIGEM,1

Anybody see where is the error of my reference, or any other idea?

Thanks in advance,

Ricardo.

Message was edited by: Ricardo Quintino

Former Member
0 Kudos

Hi

Sorry! My mistake is that a used the first node of my source message! The node thar I have to use is IfContabilizacao_Target_Log not IfContabilizacao_Source_Log

Thanks a lot for your greate help Renjith, 10 points

Regards,

Ricardo.

Answers (0)