Skip to Content

How to read text file and convert into XML in HCI

Hi Experts,

There is a text file on SFTP, i want to read text file and convert into xml and pass the data to entities in ECC system.

But there is no option or feature similar to FCC of SAP PI/PO in HCI.

Kindly help me any groovy script or XSLT mapping would be helpful to convert txt to xml.

Thanks and Regrads,

Md.Thouheed


Add comment
10|10000 characters needed characters exceeded

  • Hi Morten,

    Please find the below text file:

    000451000206    INR0004    C              32000000024100017#SUCCESS
    000451000206    INR0004    C              22000000024100017#SUCCESS
    000451000206    INR0004    C              12000000024100017#SUCCESS

    Expected XML Output: Max Length is Field 1: 16, Field 2: 3, Field 3: 8, Field 4: 1, Field 5: 15

    <Root>
        <Field1>000451000206    </Field1>
        <Field2>INR</Field2>
        <Field3>0004    </Field3>
        <Field4>C</Field4>
        <Field5>              3</Field5>
        <Field6>2000000024100017</Field6>
        <Field7>SUCCESS</Field7>
    </Root>
  • Hi Mohammad

    There is no generic solution to the problem you're describing. If you were to show an example of the contents of the file, we would be able to offer some advice on how to code the translation in Groovy.

    Regards,

    Morten

  • Get RSS Feed

1 Answer