on 05-16-2011 8:08 AM
Hi Experts,
We are passing the file name as P160511_0001.txt within input field (input field name is File_Name)itself. the same output we want as P160511_0001.txt using variable substitution.please find the pay load message given below.
<?xml version="1.0" encoding="utf-8" ?>
- <n0:MT_PositivePaycheque xmlns:n0="urn:logica.com/pi/positivepaycheque" xmlns:prx="urn:sap.com:proxy:ERD:/1SAI/TAS920370786C5BED94B7F7:701:2010/02/19">
- <RecordSet>
- <Header>
<Header_Description>UHL</Header_Description>
<Description>PositivePay</Description>
<Reference>R11NOT</Reference>
<Issued_date>15JUN10</Issued_date>
<File_Name>P160511_0001.txt</File_Name>
</Header>
- <Line>
<KeyHouseBank>089074</KeyHouseBank>
<IDAccount>61140019</IDAccount>
Kindly give the step by step proceedure for creating variable substitution.
regards
elton
please correct the below steps.
In receiver communication channel,
file name schema: %var1%
file construction mode: create
variable substitution:
variable name: var1
reference: payload:Header,1,File_Name,5
header is the segement
1 is the first segment
File_Name is the 5 th field name which carries the real file name as P280411_0001.txt.
below details are selected
adapter specific message attribute
file name
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
reference: payload:Header,1,File_Name,5
File_Name is the 5 th field name
it should not be treated as position of the field in your XML....it is the number of occrence...as per your setting the file name should be taked from 5th occurence of File_Name....however this wont be the case....you need it from the only occurence present
So it should be Header,1,File_Name,1
below details are selected
adapter specific message attribute
file name
You dont need to set the above as you are using Variable Substitution and not ASMA....these are two different things
Why not implement Dynamic Configuration? Dont you have mapping in your scenario?
customer asked as to go for varaiable substitution
mapping is also there
i am getting the like
Message processing failed. 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
Edited by: eltonsaranya on May 16, 2011 10:10 AM
Hi
Go to Reveiver file adapter --> under Advanced Tab
click on Enable to enable Variable Substitution.
Under Variable Name write -
FileName
Under Reference write -
payload:MT_PositivePaycheque,1,RecordSet,1,Header,1,File_Name,1
Now go to Target tab
In File Name Scheme give = %FileName%.xml
Regards
Dheeraj Kumar
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.