Skip to Content

Read File Name in File Content Conversion, File Sender

Hi Experts.

I'm developing an interface that reads a flat file from an FTP server, and sends it to ERP via RFC.

The problem is, that the RFC requires the read file name as a value; so the resulting XML after File Content Conversion must have the file name as a field value, like this:

FlatFileName (N Lines, just 1 column)

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

The XML should be something like this:

<Recordset>
   <FileName>FlatFileName</FileName>
   <FileContent>
      <Line>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</Line>
   </FileContent>
   <FileContent>
      <Line>YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY</Line>
   </FileContent>
   <FileContent>
      <Line>ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ</Line>
   </FileContent>
</Recordset>

I know how to map the file content to the XML, but how can I map the file name to a field value on the XML using FCC?

Thanx.

Jesus

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Nov 01, 2016 at 04:58 PM

    Hi Jesus,

    Use DynamicConfiguration to read the file in message mapping you no need to have the field in the source XML.

    Reuse FunctionLibrary for DynamicConfiguration and Message Header Attributes

    /wp-content/uploads/2016/09/get_filename_1033529.png

    Regards,
    Praveen.

    Add comment
    10|10000 characters needed characters exceeded