cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed in variable substitution

former_member192892
Active Contributor
0 Kudos

Hi guys,

I'm doing a simple file to file scenario, where i'm moving a mp3 file from one folder to another. I referred one weblog to do this any file type to anyfile type scenario, which uses only configuration in ID and nothing to be done in IR.

My doubt is that I want the source file name to be taken for the destination file name..

Since i'm not using IR at all, I cant' use coding to use Adapter Specific Message Attributes...

Please help me on this guys...

Also, if in my receiver if i want to pick up all files having .mp3 extension, how is this possible???

Thanks

Varun

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Varun,

The below line is not clear, can u please clarify bit.

<i><b>My doubt is that I want the source file name to be taken for the destination file name..</b></i>

See if my understanding is not wrong, in source u may have lot of .mp3 files, so u don't know wht could be the filename, but the same filename has to be reached while writing the destination am I right? If yes then Choose ASMA. Check both channels and give * as filename scheme. U can specify like this even if u r not using any IR objects.

Best regards,

raj.

former_member192892
Active Contributor
0 Kudos

Raj,

I want the file name in the destination folder to be same as that in source folder.

I'm sorry, I thought too much and I confused the coding to give user defined filename using coding by modifying ASMA and the actual use of ASMA...:)

Raj please can u clarify more on second part of my question???

i.e should i give *.mp3 as my source file name and same as my destination file name...

Thanks

justin_santhanam
Active Contributor
0 Kudos

Varun,

Yes u are right, u have to give *.mp3 in Sender comm. channel, In receiver comm.channel give anything.

Click checkbox on ASMA- Filename on both channels. So what happens, even though if you don't give any filename in receiver comm.channel since u selected ASMA it will write the same name as the source in destination system.

Juz give a try .

Best regards,

raj.

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

you do not need any coding.

In the sender and receiver file adapter select Adapter Specific Identifiers --> FileName.

In the receiver file adapter for the filename field give some dummy value. Now, in the runtime the source filename will be used as the target file name

Regards

Bhavesh

former_member192892
Active Contributor
0 Kudos

Hi Bhavesh,

How should i specify filename scheme in sender CC so that it picks all the mp3 files in a folder???

Thanks

bhavesh_kantilal
Active Contributor
0 Kudos

*.mp3 will do the trick

Regards

Bhavesh

former_member192892
Active Contributor
0 Kudos

Hi, Raj and Bhavesh,

My PI system with SP-14 is down currently. I'll test your suggestions tomo..

Till then I'll give 6 pts each 2 both of u n keep this issue in open status...

Hope u guys r not mad @ me

justin_santhanam
Active Contributor
0 Kudos

Varun,

Cool Buddy, points is not at all matter. Get the soln, thats enough for us.

Best regards,

raj.

moorthy
Active Contributor
0 Kudos

Hi,

Anyway solution is already in place , just

to know more about use of Adapter Specific Message Attributes:

http://help.sap.com/saphelp_nw70/helpdata/en/43/0a7d1be4e622f3e10000000a1553f7/content.htm

Rgds,

Moorthy