cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically deciding the target directory without ESR objects

gops249
Explorer
0 Kudos

Hi Experts,

I have come across File to File scenario(NFS) where I have to serve 2 purpose in one scenario using single receiver communication channel as the client have more than 40 plants.

1.     I need to copy the file from source directory to target directory without creating the mapping objects.

2.     based on source file name the target directory path will be the 'target directory + First 4 character of source file name i.e.(Plant name)'.

I am able to achieve the First requirement, can any one tell me how to achieve Second requirement.

Thanks in advance.

Ragards,

Gopi

Accepted Solutions (1)

Accepted Solutions (1)

gops249
Explorer

Thanks Inaki Villa/ Anupam Ghosh,

I have seen these threads but as I am new to SAP PI and from ABAP Background I was hoping to have standard module to achieve this.

I will try both the ways mentioned in the threads that you have provided.

Regards,

Gopi

anupam_ghosh2
Active Contributor
0 Kudos

Hi GopiChand,

                           There is no standard module to do so.

you can try java mapping with dummy ESR objects.

Regards

Anupam

gops249
Explorer
0 Kudos

Hi Inaki Villa/ Anupam Ghosh,

Thanks for your previous reply. I was busy with some other WS related task.

I have gone through the thread which uses java code to dynamically set the Target Directory.

'Dynamic file name for pass-through scenario - Process Integration - SCN Wiki'.

But the mentioned JAR files are not available on our clients PI System (PI 7.0) I tried by importing the required JAR files from other system but it was giving some error. So I decided to go with ABAP Mapping and I am quite successful in setting the target directory. I am able to view the Target Directory and Target File name in 'DynamicConfiguration' in SXMB_MONI.

But it is not over writing the 'Target Directory' path mentioned in Receiver Communication Channel.

Could you please help me in this? Do I need to set anything else?

Regards,

Gopi

former_member181985
Active Contributor
0 Kudos

Hi,

Hope you have enabled ASMA FileName and Directory in receiver file channel

Regards,

Praveen Gujjeti

gops249
Explorer
0 Kudos

Hi Praveen,

Thanks for the quick reply.

Yes I have not selected the Directory in the ASMA Configuration. Now It's working fine.

Ragards,

Gopi

Answers (2)

Answers (2)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Gopichand,

                           Please check my response to this thread

Regards

Anupam

iaki_vila
Active Contributor
0 Kudos

Hi Gopichand,

I usually use the dynamic configuration but you would need a ESR development. You can try with the Nabendu suggestion in this thread

Regards.