cancel
Showing results for 
Search instead for 
Did you mean: 

Filename

Former Member
0 Kudos

Hello All,

Here the scenario is Proxy to flat file. File name pattern should be: T.ORDER<YYYYMMDDHHMSS>.(In Dev and QA environments)

P.ORDER<YYYYMMDDHHMSS>.(In Prod environment).

The timestamp shoud be generated by PI as it is not coming from source.

1. If I select AddTimeStamp option in receiver file communication channle then it is adding milli seconds also which I dont want to be part of file name. So,how to achieve timestamp here?

2. And how to identify environemtn of PI and how can I add that part of file name.

please help.

Thanks,

Regards,

Moorthy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Moorthy,

Follow the steps as Praveen said.

Ref: /people/madanmohan.agrawal/blog/2009/05/20/combining-three-different-aspects-of-pi-asma-af-module-and-variable-substitution-in-one-shot

Thanks,

Answers (2)

Answers (2)

RKothari
Contributor
0 Kudos

Hello,

Please check the below blog for changing the file name:

/people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

-Rahul

former_member181985
Active Contributor
0 Kudos

use below sample along with Dynamic configuration for setting file name in the mapping

String fileName = null;

String systemTime = null;

systemTime = // logic to get PI system time stamp using standard java API.

pi_SID = System.getProperty("SAPSYSTEMNAME").toString();

if ( pi_SID.equals("DEV") ) //PI Devlopment Server

fileName = T.ORDER + systemTime

if ( pi_SID.equals("QAL") ) //PI Quality Server

fileName = T.ORDER + systemTime

if ( pi_SID.equals("PRD") ) //PI Production Server

fileName = P.ORDER + systemTime

//Dyncamic configuartion code for setting fileName