on 09-17-2009 3:48 PM
Hi,
My Scenario is Proxy to File.
I must create filename dynamically in the receiver file adapter by taking the sales order number and divison from the source.
How can i create a dynamic filename? i searched the forum, but i could not get the correct answer,
Please help me out.
Regards
Srinivas
Hi Srinivas,
Refer to this blog,
/people/jin.shin/blog/2007/04/27/sap-netweaver-xi-variable-substitution-with-adapter-specific-message-attributes-via-dynamicconfigurationbean
Regards,
Juan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for all the answers
For the target filename i need to concatenate the SO Number_Divison.xml
I had an issue here
SO Number exists in the target
so in the variable substution i had written as
var1 -
payload:Transaction,1,Receipts,1,Receipt,1,OrderID,1 -
and it is working
but the division does not exists in the target,
then my question is how can i get the division in the filename.
Thanks for your help
Srinivas
Hi Srinivas,
If you want SO Number and Divison in the file name create two variables var1 and var2. Let var1 be for SO Number and you create one more for Division as var2 and in filename give %var1%_%var2%
Here if division is not there then it will fail. So you should always have a division in your target payload. If you dont have division how does the filename to be. Do you want only SOnumber as filename. If yes then in mapping you can put a space for division using an if else. So if division exists it will send else a space will send. I think it will fail now also, but give a try.
So when using variable substituion, the variables should always present is a highly recommended approach.
Regards,
---Satish
Hi,
If division value coming from Source message then its very easy buddy,pass division as argument,and append it.
public String targetFileName(String Sono, String Div, Container container) throws StreamTransformationException
{
DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String MyFileName = sono + div + "<filename>"+".xml";
conf.put(key, MyFileName);
return MyFileName;
}
above code should work.
Regards,
Raj
Thnaks for your answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas,
> My Scenario is Proxy to File.
> I must create filename dynamically in the receiver file adapter by taking the sales order number and divison from the source.
public String targetFileName(String Sono, String Div, Container container) throws StreamTransformationException
{
DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String MyFileName = sono + div + "<filename>"+".xml";
conf.put(key, MyFileName);
return MyFileName;
}
File name you can format according to your requirement.
And one more thing for this you have to specify the ASMA properties. For this check the below link step-1 and step-2.
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Regards
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas,
How can i create a dynamic filename?
Use Dynamic Configuration in the mapping and ASMA settings in the CC. Refer to the blog provided by Juan.
i searched the forum, but i could not get the correct answer,
There are tons of blogs / forum postings on this topic
regards,
Neetesh
Edited by: Neetesh Raj on Sep 17, 2009 9:25 AM
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.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.