on 12-15-2018 3:55 PM
My Scenario: Proxy-to-SFTP(Flat File+PGP Encryp)
We need to create target file with extension .txt.pgp with PI Timestamp.
Expected Target FileName = <abc>_<YYYYMMDDHHMMSS>.txt.pgp
Now challenge is how to change PI timestamp format from YYYYMMDD-HHMMSS-SSS to YYYYMMDDHHMMSS
SFTP Receiver adapter is adding Timestamp between .txt.pgp (i.e <abc>.txt<YYYYMMDD-HHMMSS-SSS>.pgp)
Hi Kiran!
No, I didn't do that and not going to.
You should understand how "OS command" functionality works: PI runs script on its OS and on its file system and that script should perform all necessary actions. So, if your file is placed on FTP/SFTP server - that means that your script have to establish connection to that server and perform all the actions using ftp client functionality.
I guess you should use other functionality like UDF in message mapping to compose required file name.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran!
Did you implement the logic to connect to SFTP server and rename the file on that server in your script?
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I've wrote a Batch Script file and placed .bat file in SAP Server.(My SAP Server is on Windows Env)
In SFTP Receiver adapter "OS Command After Message Processing" is executing. but it seems, Batch Script file not executing.
My Batch Script is working fine when I execute in my local machine.
Followed below blog.
https://wiki.scn.sap.com/wiki/display/XI/SAP+XI+File+Adapter+OS+Command+Line+Feature
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
it should not be like that i have used the same in on of my requirements i.e IDOC-File scenario it worked as expected.
Regards,
Bhaskar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kiran,
yes it is possible -write down a simple dynamic configuration udf below and do not pass any attributes or variables in it then it works.
String filename = new String("");
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
filename = "ABC" + "_" + ABCD + "_" + EFGH + "-"+".pgptxt";
conf1.put(key1,filename);
return filename;
Please let me know if its helpful..
Regards,
Bhaskar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Evgeniy,
Yes you are correct. I have missed it.
@Kiran,
You can achieve this writing an UDF in ESR I guess. Use Simple date formatter to change the date format.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you were using CamelFileName, did you use below for date -
${date:now:YYYYMMDDHHMMSS}
If you are not using current timestamp, then you can use groovy script to change the date format and store the same in a header field and user the header field value at the time of file name construction in CamelFileName.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Apu!
Are you sure that Cloud Platform Integration is used?
According to question tags, Kiran is talking about PI/PO.
Regards, Evgeniy.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.