cancel
Showing results for 
Search instead for 
Did you mean: 

to create multiple files with same content but with different names

venkatasap
Participant
0 Kudos

Hi SapAll.

here i have got a tricky situation on Idoc to File Scenario.

in my interface of an Idoc to file ,there is requirement to create multiple files with different file names but with same content based on one Idoc Segment.

which means there will be one Zsegment with two fields in the idoc,where one field with (content refers to the name which file name should start with .so lets say if this segment is repeated for 3 times then PI should create 3 files in the same directory with same content but with different file names (from the filed).

so here for now iam using one reciever file communication channel.

can any body give me the quick answer.

regards.

Varma

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos

What do you mean by different names?

when i make proper setting in the Receiver Channel....on how to create the filename (what to append) like add Timestamp, counter, date, messageid.....even in this case you will ahve file with different names and that too from same File channel.

You can perform multi-mapping in XI/ PI and then your File channel will place the files in the target folder with relevant names. You cannot use Dynamic Configuration with Multi-Mapping!

If you intend to use different File channels, then do the configuration as required (normal)...even over here you can follow multi-mapping.

Do not use a BPM!

Regards,

Abhishek.

venkatasap
Participant
0 Kudos

Hi Abhisek.

wat do u mean by different names ?

as i explained earlier,there will be one zsegment Z1EDRIMEDL20 with 2 fields under sender Idoc

- The shortcode will be obtained from Z1EDRIMEDL20-TITLE in order to be used to create the file name.

- There may be more than one record in this segment type. One file should be created for each record in this segment with exactly the same data.

the file name shoule b ein the format

sapimpasnddd_<datetimestamp>.xml where ddd is the short code and the datetimestamp is in the format yyyy-mm-ddThh_mm_ss.

regards.

Varma

Former Member
0 Kudos

You need to create separate maps and then use dynamic file naming configuration

venkatasap
Participant
0 Kudos

Hi.

how can i create different maps ?

can u just explain me in brief.

regards.

Varma

justin_santhanam
Active Contributor
0 Kudos

So in your example if you have 3 segments you need to create 3 files. Are the 3 files names is going to be different? (other than date and timestamp)?

like a.txt, b.txt, c.txt or you want it like a_time.txt, a_time.txt, a_time.txt?

raj.

venkatasap
Participant
0 Kudos

Hi Abhisek.

yes they going to be different based on the number of segments and the fields in those segments.

like abc_date_time.xml,xxx_date_time.xml,yyy_date_time.xml.

so can u just guide me on how to achieve the different files with different file names but with same data.

regards.

Varma

venkatasap
Participant
0 Kudos

Hi Abhisek.

in the previous thread you mentioned the word append to communication channel,i just want to know on what the append means ,is this th option available in the communication channel.

can you please explain me in brief.

regards.

Varma.

venkatasap
Participant
0 Kudos

Hi Abhisek.

in the previous thread you mentioned the word append to communication channel,i just want to know on what the append means ,is this th option available in the communication channel.

can you please explain me in brief.

regards.

Varma.

former_member200962
Active Contributor
0 Kudos
is this th option available in the communication channel.

Yes it is the option in your receiver communication channel....but then after looking at the way you want to have your FileName the append option wont work for you.....it wont create the filename as abc_date_time.xml

Regards,

Abhishek.

Answers (0)