on 05-30-2012 6:21 PM
Hi all,
I'm developing an interface where a single source structure generates multiple message types and, each of the message types generates a text file in the target FTP directory. Before defining the 1:N cardinality, the interface was operating as 1:1, therefore generating only 1 text file in the FTP.
With 1 file being generated in the FTP, I was naming the text file dynamically through the following UDF:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
conf.put(key,[parameter]);
The above mentioned UDF was being mapped to the Message Type target node.
Now, my question is, I have multiple MT being generated on target side. How can I do to keep generating multiple files and naming them dynamically?
Tks,
Rafael.
Hi,
Multimapping does not support DC..u have to use variable substitution.
However, below blogs talks abt the multimapping using adapter module...u can chk the same (personally i would have opted for Variable Substitution):
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Using ASMA + UDF is not mandatory in my interface. So how can I achieve it by using variable substitution?
Say that I could create an additional field in the target field specific for file naming purposes and always use the variable subst.
I'm just not totally sure how to define it in the adapter, Advanced tab.
Target structure sample:
<Messages>
<Message1>
<MT_File>
<fieldA>1</fieldA>
<fieldB>1</fieldB>
<fieldC>name11</fieldC>
</MT_File>
<MT_File>
<fieldA>2</fieldA>
<fieldB>2</fieldB>
<fieldC>name22</fieldC>
</MT_File>
</Message1>
</Messages>
Is it enough if I use Variable Name = %file_name% and reference payload:Messages,1,Message1,1,MT_File,1,fieldC,1
??
Will the configuration assume that each MT has to generate a different file with name corresponding to fieldC field from target structure and indeed generate 2 files with dynamic name?
Tks.
Hi All,
can any one tell if we can use Variable substitution with File content conversion in SAP SFTP adapter. It is working fine with File Adapter but throwing error for SFTP.
Regards,
Vinod Mishra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can check the below wiki as well which explains the exact requirement as yours using Variable Substitution and a single file channel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In addition to Praveen's reply, if you need screenshot for the variable substitution against payload structure, You can view this link
http://www.saptechnical.com/Tutorials/XI/Variable/substitution.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rafael,
Are the target messages all the same? Also, is the number of target files fixed or dynamic?
Regards,
Ryan Crosby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, the structure of target files are always the same.
And no, source message might send 2 documents, so we would have 2 output files, or source message could send 10 documents so we would see 10 files being generated. Each of the files with its corresponding name based on a field from target structure.
You should use the normal one for Variable substitution: payload:MT_File,1,fieldC,1
Reason: The message will be according to orginal target schema once splitting happens at Adapter engine level
This message is in reply to "Rafael Da Silva"
Message was edited by: Praveen Gujjeti This message is in reply to "Rafael Da Silva"
As Amit already mentioned Dyncamic configuration wont work with Multi mapping.
How you are genarating mutiple files?using multi mapping?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As per his answer "Multimapping does not support DC..u have to use variable substitution."
What I just said is that I'm using variable substitution.
Now, please read my previous message again to see the questions I have.
Multi mapping to generate multiple files - yes.
1 source structure generates N target structures (just like the MT target structure in my previous post).
Tks.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.