cancel
Showing results for 
Search instead for 
Did you mean: 

One file into two different directories using one communication channel

Former Member
0 Kudos

HI Experts,

Can we able to place one file into two different directories using one communication channel except using OS level command and java mapping...? can any one please  help me on this...?

Thanks in Advance.

Regards,

Varma.

Accepted Solutions (0)

Answers (4)

Answers (4)

zameerf
Contributor
0 Kudos

Yes we can send same file to two different directories using one communication channel.

You can use multimapping and variable substitution together to achieve this.

Check my reply here,

http://scn.sap.com/message/13409338#13409338

In your case, you have to add the target message type twice in the messages tab of message mapping.

Also, add the target/inbound message interface twice in interface mapping.

No need to change occurrence of message type and message interface here.

Just do the same mapping for both the Message Types in mapping.

You can set the directory path in one of the target field and refer that using variable substitution in receiver channel.

Again,

The point to note here is if your output is XML file and the directory value cannot be in the output payload, then this will not help. However for flat files you can remove that content using FCC parameters.

former_member197445
Contributor
0 Kudos

You cannot place the file into two directories with one communication channel.  You would need one of the following:

  • an additional communication channel
  • an external program to copy the file to the second location
  • another flat file interface that polls one directory and copies to the other.
baskar_gopalakrishnan2
Active Contributor
0 Kudos

This is not cool approach, but it will work.  Design straight scenario to place file in one directory using one communication channel. Run some batch job on the os level to copy that file into your second directory outside PI.

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>>one file into two different directories using one communication channel except using OS level command and java mapping...?

a) no

b) java mapping cannot be used anyway - as we should never create output from the mapping

(that's what adapters are for)

c) proper way to do this is to do that in the receiver determination (and have two receivers)

Regards,

Michal Krawczyk