on 10-20-2014 1:00 PM
Hi,
i want to display the company code in the output file name and company code is dynamic.
output file----.CSV
following is my MT and can anyone tell how to display the company-code for each output triggered.
i tried giving payload:MT_ECC_CORE_MASTERDATA,1,CUSTOMERDATA,1,BUKRS,1 where BUKRS is company code which i was trying to use as variable substitution but it is failing is RWB "Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var1."
i have done the following configuration in communication channel
required output:LFBSCSER_Companycode(ex:002,001 etc).CSV
Hi Guru,
I believe you have defined the File name as :
LFBSCSER_%var1%.CSV
Also can you confirm if there exists a value in payload for the field that you are trying to pass to the variable. Please check in Moni if value exists.
Regards,
Azhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guru,
And I believe this is the Receiver / Output payload?
Can you try to use ASMA instead. Please check the following link:
Adapter-Specific Message Attributes and Dynamic Configuration
Regards,
Azhar
Hi Guru,
It should work with the variable substitution, check if you have configured correctly ex:below link.
Thanks,
Naveen
Hi Praveen,
Thanks a lot for the information.i was using source message type structure so it was not working.
i did it with target type and it is working fine.
@all -Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guru,
Please use Below Correct syntax in place of what you have used it will work.
Correct One :xmlpayload:MT_ECC_CORE_MASTERDATA,1,CUSTOMERDATA,1,BUKRS,1
Wrong One :payload:MT_ECC_CORE_MASTERDATA,1,CUSTOMERDATA,1,BUKRS,1
If it works please award some points
Thanks & Regards
Uday Suvvada.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
one More Option:
Use the below code and map the udf with two inputs first with Param Name and second input will be the Company code value what you want to populate.
public String SetParamValue(String paramName, String paramValue, Container container) throws StreamTransformationException{
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key =DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","paramName");
conf.put(key, paramValue);
return paramValue;
}
In Comm Channel Under advanced Tab under variable substitution.
VarName == message:http:/"+"/sap.com/xi/XI/System/File,FileName
Map paramName with Constant"FileName"
This will also work,Please award some points if it works.Same worked for my development also.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.