3 Replies Latest reply: May 14, 2013 8:14 AM by Vishal Kharat RSS

File Content Conversion in SAP PI

Arun devalapalli
Currently Being Moderated

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.




  • Re: File Content Conversion in SAP PI
    Hareesh Gampa
    Currently Being Moderated

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




    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.




  • Re: File Content Conversion in SAP PI
    Hareesh Gampa
    Currently Being Moderated

    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.

  • Re: File Content Conversion in SAP PI
    Vishal Kharat
    Currently Being Moderated

    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.