cancel
Showing results for 
Search instead for 
Did you mean: 

how to create file

Former Member
0 Kudos

Hi Experts,

my scenario is file to file , i need to create 3 files in target directory like filename1.txt , filename2.txt, filename3.txt,.

when the one file is palced in the source directory i need to create 3 files with same data in the target directory like the above. the mapping is same.

it is possible through batch file programming. i am using windows. OR any other solution.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Pratima,

Using the OS script this can be achived.

Thanks,

Former Member
0 Kudos

Hi,

Solution 1: with mapping, source occurence = 0.1 and target occurence = 0.N.

In target message, put three times your MT_target, do the mapping with the "magic" button ("Map select fields and substructure if names are identicals) with your three entries of MT_Target.

Note: use DynamicConfiguration in mapping and ASMA in receiver CC to maange dynamically the filename, or use variable substitution (always in receiver CC).

Solution 2: without mapping

Create a flow "1 file -> PI -> 1 file", without mapping, and iIn receiver CC, use an OS command to copy twice your target filen, by this way you will have three target files.

Note: I don't know if we can have a dynamical filename with this solution, and I'm not sure that you will be able to manage different server, if files have to be created in different server files.

regards.

Mickael

Former Member
0 Kudos

Hi Mickael,

Thanks for your reply,

Solution 2: without mapping

Create a flow "1 file -> PI -> 1 file", without mapping, and iIn receiver CC, use an OS command to copy twice your target filen, by this way you will have three target files.

Note: I don't know if we can have a dynamical filename with this solution, and I'm not sure that you will be able to manage different server, if files have to be created in different server files.

Can u explain me how to write the OS command to copy twice your target file, i gone through the some posts but i am not clear how to write the os commands i am using windows server 2003

Former Member
0 Kudos

Hi Prathima,

by using SDN search button... ;-)... in less 2 min, you have your answer about [OS command in a FILE adapter|http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature]. And there are other...

is it help you?

regards.

Mickael

Former Member
0 Kudos

Hi prathima ,

I agree with Mickael.

As per the second type by using File Adapter OS Command you will just do File to File scenario.Then that the result file will be copied to appropriate location.

For File Adapter OS Command search for sdn and google.

Thanks

Rabi

Edited by: RabiPanda on Nov 15, 2011 6:37 PM