Skip to Content

Problems in fileContentConversion

Hi experts,

in a sender communication channel I receive a flat file like this:

UNA:+.? 'UNB+UNOC:2+I20114T:01'DTM+137:20150206:102'RFF+ON:5100001679'....

Segment are UNA, UNB, DTM, RFF....

They comes in a single line separated by ' (apostrophe).

If I use UNA.endSeparator= '

            UNB.endSeparator= '

             ......

it throws me an error, it seems that system doesn't recognize the ' as endSeparator,

How to convert this?

Thanks

Fabio

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    Jan 07, 2016 at 03:10 PM

    Problem not solvable.

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 17, 2015 at 04:00 PM
    11

    Hi Raghu,

    thank you for helping me.

    A strange things happens:

    Every separator that I use is not recognized by the system as endseparator.

    It seems that system needs always a new line to separate segments.

    Fabio

    Add comment
    10|10000 characters needed characters exceeded

    • Fabio Boni Raghu Vamseedhar Reddy KadipiReddy

      Hi Raghu,

      thanks.

      For me is not clear how to map field DataString that comes in unbounded Detail Record to for example IDOC header segment EDI_DC40 that comes with occurrence 1.

      For example:

      I have to map a field of UNH segment (that comes in the third occurrence of DetailRecord) with EDI_DC40, but if I try PI reads always the first occurrence of DetailRecord.

      Any hints?

      Thanks

      Fabio

  • avatar image
    Former Member
    Feb 17, 2015 at 11:49 AM

    Hi Fabio,

    Use key field as UNA, UNB, DTM, RFF....

    and endSeparator as '0x27'(including the quotation marks).

    Regards,

    Soumyadip

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 19, 2015 at 10:23 AM

    Hi Fabio

    The file you have posted looks like a EDI file or an eancom file.

    Normally those files are converted to xml using see burger adapter in SAP PI.

    Using FCC , it is almost impossible to generate the xml because this will have more than 4 levels of hierarchy in the structure.

    Thanks,

    Indrajit

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 17, 2015 at 03:43 PM

    Fabio,

    First let's be sure that all FCC parameters are set correctly.

    1)

    As shown in attached screenshots, create an input file, FCC and let us know, you got same output as shown in attachments.

    2)

    Then,

    change the input file. Replace all , with '.

    change FCC. NameA.fieldSeparator     '     OR     '0x27'

    Let us know, the output.

    3)

    If above solution does not work. Then read entire line into an element of XML and the write a UDF in message mapping to split string. I can guide you with splitting logic.

    NameA.fieldSeparator     'nl'

    NameA.fieldNames     eachLine

    NameA.endSeparator     'nl'

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 17, 2015 at 11:29 AM

    Hi boni,

      Which version of PI you are using?  If it is older version then please use hexadecimal value of ' for separator.

    thanks

    Add comment
    10|10000 characters needed characters exceeded