on 08-20-2007 12:17 PM
Hi All,
I need to give the filename from the field in the source idoc. the field value need to be picked up as below
ZSSV_GENERIC_IDOC
-IDOC
--Z1SSV_ITEMS_SUMMARY
---HOST_FILENAME
Note: - represent the level in the datastructure.
here the value of HOST_FILENAME need to be given as filename. I check the Variable Substitution but I hope we can give only the values from message: and payload:
Please let me know how to give this valueas filename.
my filename need to be as
HOST_FILENAMEmatmastimestap.dat
Regards,
Dhill
Dhil,
Check the below code if its feasible to you rather than going for variable substitution.
input --->UDF -
>Root node of target.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(
"http://sap.com/xi/XI/System/File",
"FileName");
String fname =input+"MATMAS";
conf.put(key,fname);
return "";
In receiver comm.channel check the checkbox for ASMA -Filename.
Creation mode - AddTimestamp.
Hope it helps!!!
Best regards,
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
Thank you very much, I am able to generate filename successfully but only issue is... as I am having 2 receiver file the timestamp is getting differ by milliseconds and hence my target system is not processing....
<b>Example:
CHANGE matmas20070820-073135-197.dat
CHANGEackmatmas20070820-073137-896.dat</b>
Can you please help me on this.
Regards,
Dhill
Dhil,
In this case, like Host file name assign current date-time to one of the field using Date function and you can refer this payload field while creating file name.
So file name would be something like this <HostFileName>+ %varDateTime%
where varDateTime ---> Payload -->DateTime.
Hope this will help.
Nilesh
Hi Raj,
The actual scenario is idoc to 2 file. One with idoc details and other is acknowledgement file with content value as "1".
I used 2 message mapping, 2 interface mapping. I doubt whether I can perform this with single mapping itself. because the content of the file is different.
let me know if any more details required.
Regards,
Dhill
Ohh...Got it...you have two different mappings...
Your file is generated in sequence..means idoc detail file first and then acknowledgement file?
If so I think you can declare one global variable in message mapping, read date time ( in first file mapping where you are assigning to target) and assign to delcare global variable and then try to use same variable in your secong mapping...
Hope this will help.
Nilesh
Hi,
Go thru this blog...
<a href="/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i File Name using XI 3.0 SP12 Part - I</a>
<a href="/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii File Name using XI 3.0 SP12 Part - II</a>
Regards
Santhosh
[url=; Use a Good Subject Line, One Question Per Posting - Award Points[/url]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.