cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use a variable in Additional Parameters

Former Member
0 Kudos

Hello,

In my receiver File/FTP adapter I am using the Additional Parameters to execute an FTP site command. Name and value look like this:

The command works except for the fact that the file is placed on the target destination with the literal file name "test.xml". I would like to use a variable here, so I can pick up the file name used in the sender adapter, like when using the command line with %f.

Is it at all possible to use a variable in the Additional Parameters?

Best regards,

Suzanne

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

Why do you need to use additional parameter for this? Simply go to Advanced tab, and in ASMA settings, check file name for the case of receiver channel. The file will come unaltered.

Note : in the file name of Target tab maintain it as "*".

Regards,

Souvik

Former Member
0 Kudos

Hello Souvik,

We are connecting to an XFB server. The file name in the Target tab will have to be used for the XFB flow name which is static. The site command is meant to 'announce' the file name and place the file with the correct name on the correct flow. This is working apart from the dynamic part.

Currently the whole process is running in a script on the server. The idea is to get rid of the script and do it purely by PI config.

Regards,

Suzanne

Former Member
0 Kudos

Then what do you have at the sender side? I mean how is the file name at the sender side getting generated?

Former Member
0 Kudos

The file is simply picked up by *.xml in the Source file name also via FTP. Basically, if I go back to my original question, I would like to know if it is possible to use a dynamic value for an Additional Parameter.

Former Member
0 Kudos

Sorry for the late reply!!

In the sender channel in MTB, please mention:

CallSAPAdapter      Local Enterprise Bean     0

This will effectively call the SAP Adapter from the sender side, and as you said, we have in Source for the File name as *.xml, hence it will call the file name of sender adapter.

Now, in the receiver channel, if you mention for file name *.xml, this should also work. However, if you want to use additional parameters, then you can use a variable as %f in file name, and in additional parameters you can mention its value as *.xml.

This should work then.

Regards,

Souvik