Skip to Content

Unable to process Textfile Sender FCC adapter

Hi Experts,

I am doing FCC to ABAP Proxy Interface. Where I have to pick an text file and process and send to through ABAP Proxy to R3.

My data is in text file .txt , the data is like this :

HEMAHPOD019##012621 30018 09022012600308 48 09022012d019 3110

HEMAHPOD019##012622 30018 09022012600317 120 09022012d019 3110

HEMAHPOD019##012623 30018 09022012603023 24 09022012d019 3110

HEMAHPOD019##012624 30018 09022012600921 30 09022012d019 3110

HEMAHPOD019##012624 --> Here 3 fields are clubbed together and filed separator is tab.

Please tell me how to process this kind of file.

Thanks and regards,

Ahmed.

Edited by: Ayubsajjid on Feb 29, 2012 8:51 AM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Feb 29, 2012 at 08:00 AM

    How come tab delimiter file first three fields are coming with out space.

    first check with your vendor, if they come in that way only.

    then here is the solution, pick the three fields into one variable and in mapping divide it into three parts based on the field length and pass it to target three fields.

    assume that remaining fields are coming with tab delimiter only.

    Add comment
    10|10000 characters needed characters exceeded

    • for the third field mapping u can use a small udf:

      input : a

      execution type: single value

      (tweak this udf as per ur design)

      //write your code here
      int len = a.length();
      String output="";
      if(len>18)
      {
      output =a.substring(18,len);
      }
      else
      {
      output= "third input does not exist";
      }
      return output;
      

      mapping:

      input udf -field3

  • Mar 01, 2012 at 02:07 PM

    Hi Friends,

    I have done this....

    By using below in Content Conversion Parameters: for given text data

    HEMADPOD015##008171 30003 16082011600600 2 16082011d015 3110

    HEMADPOD015##008172 30003 16082011600603 48 16082011d015 3110

    Row.fieldName Zabc,Zabc,Zabc,ZabcE,INVDT,Zabc,Zabc,abc,Zabc,abc,abc

    Row.processConfiguration : FromConfiguration

    Row.keyFieldValue : H*

    Row.endSeparator : Tab( from notepad i paste the tab here)

    Row.fieldFixedLengths : 4,14,4,6,8,24,9,1,8,30,4

    Row.comlumnSeparator : tab ( Notepad tab)

    Row.lastFieldsOptional : true

    I got some input from this link also for given below error :

    File Content Conversion in PI 7.1 Error

    Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 1 according

    to structure 'Row':java.lang.Exception: Consistency error: field(s) missing - specify 'lastFieldsOptional' parameter to

    allow this

    Thanks a lot for the help to all for providing inputs from your valuable time.

    Cheers 😊

    Ahmed.

    Add comment
    10|10000 characters needed characters exceeded