cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP Variable substitution error.

former_member238007
Contributor
0 Kudos

Hi,

my scenario is file to sftp fcc.

I have successfully configured the modules and able to put the ouput fcc file inthe target sftp directory,

But when implementing variable substitution i am facing issues getting error as

Error: com.aedaptive.sftp.adapter.exception.VariableSubstitutionException : Error during variable substitution: the following variable was not found in the message payload: var1

This is the input file:

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

<ns0:M_SFTP_FCC xmlns:ns0="http://xyz.com/pisandbox/testudf">

<Detailed>

<MFG_Name>XYZ</MFG_Name>

<Model_Number>1234</Model_Number>

</Detailed>

<Header>

<Order_No>345</Order_No>

<Date_of_File>12122012</Date_of_File>

</Header>

</ns0:M_SFTP_FCC>

Variable substitution decleration was:

var1 payload:M_SFTP_FCC,1,Detailed,1,Model_Number,1

i need to use the Model_NUmber.

getting followng error in Comm channel monitoring --> Audit Log

Unable to write message into file. com.aedaptive.sftp.adapter.exception.VariableSubstitutionException: Error during variable substitution: the following variable was not found in the message payload: var1

Unable to find where the error is when i configured through file adapter its working fine.

Thanks,

--Kishore.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Kishore, how did you solve your issue? Thanks a bunch for sharing the solution, best regards, Martin

Former Member
0 Kudos

Hello,

Please note that SFTP adapter has been delivered recently by SAP and some of the file adapter functionalities are not working properly.

I would suggest to use the DynamicConfigurationBean as stated by Ganesh :

http://scn.sap.com/people/jin.shin/blog/2007/04/27/sap-netweaver-xi-variable-substitution-with-adapt...

This is how I did for file content conversion in SFTP adapter and it worked.

Best regards,

Guislain

Former Member
0 Kudos

Hi,

Make sure that there is no extra space after your "%Folio%" under the Variable Substitution.

Make sure that "Adapter Specific message Attributes" is unchecked in the CC.

You can do a change in message mapping to create a header field<occurence: 1> map to a constant and call it in var substitution.

As Mickael suggested above make sure using only lowercase on your variant name %text% instead of %Text%.

regards,

ganesh.

former_member238007
Contributor
0 Kudos

HI Ganesh,

This is the output structure i am mapping one to one the source and target structure is same.

M_SFTP_FCC -- 1--1

Detailed -- 0--Unbound

MFG_Name -- 0 - 1

Model_Number -- 0 - 1

Header -- 0 - 1

Order_No -- 0 - 1

Date_of_File -- 0 - 1

Still getting the same error.

Thanks,

--Kishore

former_member238007
Contributor
0 Kudos

HI Experts,

Can anyone throw some light on this issue.

Thanks,

--Kishore

Former Member
0 Kudos

Hi Kishore,

Check in the target message, if the value for Model_Number is coming or not?

Former Member
0 Kudos

HI,

your variable declartion is perfect, can you please check the below points,

1.To specify variables in the target directory and file name scheme, they must be enclosed by % characters.

2.variable name is case sensitive, can you give only lower case instead of giving upper case.

3. Model_Number is giving same as per the message type.

Please look below link.

http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot

regards,

ganesh.

Edited by: ganesh.nijampudi on Dec 7, 2011 4:51 AM