on 09-30-2008 6:38 AM
Hi friends,
In our scenario, receiver file name is assigned to dynamically. Example Inventory_Current date. Inventory is static, but CurrentDate is changed on runtime.
I was tried to Variable substitution method and UDF method. In this type dynamic value is mapped to target structure, so Receiver payload shows the dynamic value in output file. But we don't need that dynamic value. So, in variable substitution method and UDF method is not achived to my requirement.
Please any one help me how to change file name at runtime (receiver communication channel). If using any module program pls forward to me.
Thanks & Regards
Vijay
Hi,
if we want to get the Output file name as One of the Field value from Payload and Current dase with it means,
1) Write one UDF & map Like this
Name(giri)-----UDFCurrent Date----MT_Target
2) Check the ASMA Option in Receiver Adapter Aloneu2026..
3)No need to check the ASMA Option in the Sender side
UDF Code:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
String Outputfile = conf.put(key,a);
return Outputfile;
Regards
Seshagiri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Vijaya
using UDF you can set the Dynamic Configuration Filename and at receiver channel just use adapter specific attributes and it should pass the value.
UDF should set value of filename as Inventory_CurrentDate. pass Inventory value and current date to UDF.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String filename = Inventory_CurrentDate;
conf.put(key, filename);
If you explain me y you are not able to pass this value we can solve this.
Thanks
Gaurav Bhargava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Vijaya
1. create UDF in mapping
2. pass inventory value and current date to UDF with any data that you have to map to the receiver side
UDF return the other mapping value.
ex- you pass a, inventory, currentdate
Aim is to do conf.put(key, Filename) and return a.
this will set the Filename to Dynamic and you can pass the value a to the required field in mapping.
3. Use Adapter attributes in receiver as well
Thanks
Gaurav
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.