cancel
Showing results for 
Search instead for 
Did you mean: 

Pick a file based on date after certain time.

Former Member
0 Kudos

Hi,
I have this requirements: this is SFTP(External system)-->PI-->FTP(within the network)

1. Schedule a job nightly, Monday thru Friday, to SFTP the delta file from XYZ company (some time after 5:00pm PST as that is the latest time XYZ would update their web site) connects to XYZ company FTP site.

2. Search for the current XYZ_delta*.xml file by date and if a new delta exists, select it and move it to a designated folder(within the network).

3. Rename the new file to a specific static name.


how can I approach this? is UNIX script is the solution? do i have anything in PI to achieve this? I'm using PI 7.11


Thanks.
Prema

Accepted Solutions (1)

Accepted Solutions (1)

nabendu_sen
Active Contributor
0 Kudos

Hi Prema,

I think Point 1. you could be able to achieve through 'Availability Time Planning' in RWB->Comm Channel Monitoring.

Point 2 and 3 would be easier with UNIX script.

Regards,

Nabendu.

Former Member
0 Kudos

Thanks Nabendu.

nabendu_sen
Active Contributor
0 Kudos

Hi Prema,

If you want to go with SAP SFTP Adapter for Point 2 & 3, you can check the below documents to archive files in SFTP Server / PI server. But always perform regression testing with the large file or huge number of files.

http://scn.sap.com/docs/DOC-35572

Regards,

Nabendu.

Former Member
0 Kudos

Nabendu,

I think this for 7.3, which has its own SFTP adapter. I'm using 7.11 and have external adapter.

nabendu_sen
Active Contributor
0 Kudos

Hi Prema,

Though it is mentioned as 7.3x in the document but it is actually same as 7.1 External SFTP adapter.

Regards,

Nabendu.

Former Member
0 Kudos

Thanks Nabendu.

Answers (2)

Answers (2)

venkatasasidhargupta_gada
Active Participant
0 Kudos

Hi Prema

You can do this with standard adapters.

1. Read files from SFTP location with some file name criteria for example as you mentioned XYZ_delta* or whatever the criteria with which you can select the files in folder.

2. Read them into PI and either archive them to another location or delete them. You can select these options in adapter. By doing so you will not read same file again and again.

3. Now, file content is in PI and when you send this content to your FTP, set file name criteria in FTP adapter as you preferred. for example: XYZ_delta<timestamp>.xml.

4. Files should be stored with given file naming convention.

Thanks

Sasidhar Gupta

Former Member
0 Kudos

Thanks Sasidhar; this solution will not help me to pick delta file. i have to pick only one file among many and do not delete it. Thanks.

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

You can cover it with the standar solution.

to schedule the channel go to RWB-->comunication channel monitorin and it the rigth top corner you will se an option (I dont remenber exactly the name) Manage Channel or Schedule channels. In there you wil schedule the channel to pick the files in the time and date you need.

in the Communication channel configuration you will set the value for the file name XYZ_delta*, in case many files,the sistem will process the oldest one and so on. BUT you can change it in the Processing tab of the channel.

in the Processing tab, you need to configure the processing mode ans select ARCHIVE, a new input field will appear to set where you want to archive the file.

take a look to this:

http://help.sap.com/saphelp_nwpi711/helpdata/en/44/655453b48a4ddfe10000000a1553f7/content.htm?frames...

Regards


Former Member
0 Kudos

Thanks Rodrigo. let me try this.

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Hi, Prema,

couldyou solve your issue?

Former Member
0 Kudos

Thanks Rodrigo for asking;

point 1 worked using RWB- "Availability Time Planning"

but point 2 did not work using standard file parameters; for example if i have two  files:

XYZ_delta1111.xml  and XYZ_delta2222.xml  adapter will pick both files and process it; i dont want both files to be processed; i want only the delta file(latest file with change in data) to be processed not all files which falls in XYZ_delta*.xml

is this possible using standard file adapter?

Thanks!

anupam_ghosh2
Active Contributor
0 Kudos

Hi Prema,"

"

i want only the delta file(latest file with change in data) to be processed not all files which falls in XYZ_delta*.xml

is this possible using standard file adapter?"

Answer:This is not possible using standard adapter. You need java mapping or adapter module for this.

Regards

Anupam