Skip to Content

SFTP - PGP encryption - Dynamic file naming not working

Dec 21, 2016 at 05:53 AM


avatar image
Former Member

Dear Experts,

Interface Flow: IDOC to SFTP (Using PGP encryption) PI version is 7.5 AEX (Java Only)

Problem Facing:

PO number is coming in IDOC, where in we need to send this PO number appended with date & time as a file name to the target server. Output file will be in PGP encrypted way.

Having option of variable substitution & Dynamic UDF code, I tried with dynamic UDF with below code:


public String DynamicUDF(String variablePart, Container container) throws StreamTransformationException{

String filename = new String(""); DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http:/"+"/","FileName"); filename = "Vendor" + variablePart + ".xml"; conf1.put(key1,filename);

return variablePart;


In SFTP receiver adapter below ASMA is made active:

But when I see the output directory the file naming's are appearing as: %FileName%

Can you please throw some light on where I am wrong.



asma.png (4.7 kB)
filename.png (4.6 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Manoj K Dec 21, 2016 at 06:35 AM


The namespace mentioned in UDF and channel is different it should be same :

in Channel make the namespace as :



10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Dec 21, 2016 at 06:04 AM

Hi Sai!

Try to use any file name in adapter settings without "%" sign since this sign is used for Variable substitution.

Also check if your ASMA attribute was successfully set by observing Dynamic Configuration section in message monitoring.

Regards, Evgeniy.

10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Dec 21, 2016 at 11:15 AM

Thanks Manoj! its resolved after correcting namespace

10 |10000 characters needed characters left characters exceeded