on 08-28-2008 2:10 PM
Hi All,
I have multiple SAP->XI-->3rdParty interfaces running in my system.
They all are IDOC to file.
Requirement is to have the file name based on a common number range for all these interfaces. Currently I was using individual number range in each comm channel of the interface.
Eaxmple:
Number range starts from 0000
When interface 1 runs, its output file name would be 00001.txt.
Then interface 2 runs, and its output file name would be 0002.txt
then the 3rd interface file name would be 0003.txt and so on
So is it possible that all these interfaces will share a common number range.
Regards
Shirin
Hi,
I think that Increment will happen to that particular Interface only
This will not applicable to all the Interfaces those runs in your Landscape or Server.
REgards
Seshagiri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
i think only the solution for your requirement for change the file name is using the
"Run Operating System Command After Message Processing".
Using operating system command or unix script to change the file.
The logic is,
Use the same command for all your receivers.
Compare the existing count and rename the new file name.
Like,
you create a file each receivers "xxx.txt","yyy.txt".
First time Non of the counter is there.
so the first file name changed to "0001.txt".
Second time it compare with existing count and rename the yyy.txt to "0002.txt".
Regards,
Prakasu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
you can add a field(number required) to the message1 passing to interface1 and hence include the number in output file name through variable substitution. You can have a glance at this concept demo at:
http://saptechnical.com/Tutorials/XI/Variable/substitution.htm
Thanks,
Durga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Durga,
Thanks for the reply. I am aware of variable substitution, but it means I need to have a new field in my IDOC and this will need to be populated in R/3 and then used in XI.
The only reason I want to avoid is because, I am trying to avoid any changes to existing IDOC and XI data structures.
So needed a way without disturbing the existing data structures.
Regards
Shirin
Hi,
You can name a file even without using the variable substution.
Use this UDF to set the FileName parameter. Just enable the option Set Adapter Specific Message Attribute and file name in the receiver file channel.
//write your code here
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String fname = "file" + a +".xml";
conf.put(key, fname);
Use the RFC call to get the sequence number and pass it as a input a to the UDF.
This UDF creates a file with a schema <file><sequence number>.xml.
Thanks
SaNv...
If it is not possible to use number range in XI, is there a way we can get it from R/3 and put this number into the file name.
I know in Message-mapping, through UDF you can do a RFC call to R/3 and get the next number, but here I am trying to get the number in my comm-channel to use it as a file name.
So any other way to do it?
Many thanks
Shirin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If all the interfaces are using the same receiver file channel you can make the File Construction Mode as Add Counter and achieve this.
Thanks
SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.