Skip to Content
avatar image
Former Member

File Content Conversion Sender. Enclosured info

Hi experts,

I have to read a plain file like this:

x

x

x

x

x

<START-OF-FILE>

a;b;c;d;

a;b;c;d;

a;b;c;d;

<END-OF-FILE>

x

x

x

x

x

Where 'x' means unuseful and unformatted lines, and 'a','b','c','d' are the fields to be parsed to xml.

I wonder whether there is a way, using FCC in the file sender adapter, to gather only the lines enclosured between '<START-OF-FILE>' and '<END-OF-FILE>'. There is no key field I can use.

Many thanks in advance,

Paco

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Sep 10, 2010 at 12:18 PM

    Hi Francisco,

    I think u need to write a UDF to achieve the requirement.

    And, I think there is a possibility to do it using content conversion.

    Use set NameA.fieldFixedLengths for the unused data in the file.

    use NameA.fieldContentFormatting - Enter trim to remove all the leading and subsequent blanks for a value found. This is the default.

    If there is any field length restriction use NameA.fieldFixedLengths.

    NameA.fieldSeparator & NameA.endSeparator shoulf be used.

    NameA.additionalLastFields

    If the inbound structure has more fields than specified in the configuration then the XML outbound structure is created as follows:

    ○ ignore

    Outbound structure only contains the fields in the inbound structure

    ○ error

    Conversion is terminated due to the incomplete inbound structure. An error message is displayed.

    The default value is ignore. If you have defined the NameA.fieldFixedLengths parameter, the default value is error.

    I hope this info will help you.

    Refer the below link:

    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

    Regards,

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 10, 2010 at 01:22 PM

    hi, do you have in the file the value: <START-OF-FILE>. if not dont worry about the blanks lines.

    define you data type and later configure the sender file adapter:

    <row>.fieldSeparator ;

    <row>. endSeparator 'nl'

    for keyfiledname you can define any value for example a.

    a;b;c;d;

    a;b;c;d;

    a;b;c;d;

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 21, 2010 at 02:01 PM

    Thank you all, finally I took out the data by means of the message mapping.

    Add comment
    10|10000 characters needed characters exceeded