cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion in SAP PI

former_member257758
Participant
0 Kudos

Hello Guru's,

I have couple of questions regarding the File Adapter.

My scenarios are File to Proxy and Proxy to File.

1. File to Proxy.

I have '|'  delimited file with more than 100 fields, But I need to map and send only 10 fields to SAP. And those 10 fields are present first 20 fields only.

Now the question is Do I need to create Source Data Type with all 100 fields or First 20 fields are enough? How do the File Content Conversion if I use first 20 fields.

Pls provide the example.

2. Proxy to File.

In this scenario, Requirement is before FTP'ing the actual file, I need to send a blank file with the name abc.trg. Its like once once the proxy is triggered, I need to put trigger file first and after couple seconds I need put the actual file using Receiver File Adapter. Is this possible using receiver File Adapter?

Appreciate your inputs.

Thanks

Arun

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

1. construct source structure with those 100 fields and map only first 20 fields to the target.

2. PI neither store the file nor it can wait unless you use BPM. PI stores interms of messages but thats not reccommended. So single receiver adapter may not beable to put both the files at different intervals. But if you use dynamic configuration to set the name of the file then refer to the point 3 mentioned below.

3. your proxy will send 2 parameters , 1st to create the dummy file and the other time to create the actual file. depending on these parameters, in mapping program you have to write UDF to set the name of the file using dynamic configuration. Thus with same receiver file adapter you will be creating 2 files with defferent names.

former_member184720
Active Contributor
0 Kudos

for the second one -May be you can go for run operating system command. Place the original file in a dummy directory and then using a batch file write a script to move a blank file first and then the original file with a delay.

former_member184720
Active Contributor
0 Kudos

You can create structure only with 20 fields and configure the below parametrs in channel.

.fieldFixedLengths

.fieldNames

if there are more field than configured then theybwill be ignored.

you can refer to the sdn help for the file content conversion in file adapter.It is explained clearly.

Regards,

Hareesh