Sender file adapter conversion Error!!

Hello every one....
I am stuck with a problem...in my scenario,, there are possiblities that file may contain more than required paramters... in such case,,, paramters defined in conversion should go ahead and others should be ignored...
for this very purpose i added the paramter:
row.fieldSeparator                 ,
row.fieldNames                     orderno,authcode,status
row.endSeparator                  'nl'
row.additionalLastFields      ignore
the scenario works fine if the file contains thrree comma separated values but it raises an error if no of paramters increase as :
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: ERROR in configuration: more
elements in file csv structure than field names specified!
we are using PI 7.... does it require some more configuration in additoin to paramter row.additionalLastFields
any help in this regard would be highly appreciated...
thanx

this parameter is already set, and this is the exact behavior i want from adapter engine...  but the problem
here is different... the exception is raised at communication channel's conversion routine level,,, the retry
interval is not the one defined in visual admin but infact the interval (polling) time defined in communication
channel.... the system does'nt stop after 3 attempts,, but infact keep on trying to read it....
one peice of information i  have found is in sap note:821267 , which states:
*Q35:*
Q: I have configured a File Sender channel with File Content
Conversion or a custom-developed module, which may throw an
exception. When the File Adapter encounters an invalid file, which
triggers a conversion error or an exception in a module, the
adapter will enter a retry interval and upon each following
processing attempt try to process the faulty file. This basically
prevents the File Adapter from picking up files that are located
after the fauilty file according to the configured sort order. How
can I change this behavior?
o A: This is by design. When the File Adapter encounters an invalid
file, manually remove this file from the configured source
directory. You can configure an alerting rule to get notified each
time this occurs.
We are currently evaluating possible solutions that could be used
to skip this manual interaction.
now can there be a way around to make communication channel read the file only 3 times (value defined in adapter engine profile in visual admin)
I have thaught of writing of module.... but the error is raised even before calling module !!
any further clue ???

Similar Messages

  • Sender File Adapter - No error, but not generating any message

    I am working on a file to RFC scenario.  The sender file adapter is using content conversion to read a comma delimited file.  The file is being picked up and archived correctly, and the adapter monitor does not show any errors.  However, the process disappears at this point.  I don't see any messages in SXMB_MONI, and there is no sign that the process is reaching the RFC adapter.  Has anyone ever had this happen before?
    I have four line types for Buildings, Additions, Floors, and Rooms.
    I list all four in the recordset structure, and I identify a key for each with the keyFieldValue parameter.  I list a fieldSeparator of ',' and an endSeparator of 'nl' for each row.  And i have a list of the fieldnames in the fieldnames parameter.
    The only thing i'm not sure about is the keyFieldinStructure parameter.  I have specified ignore there, because I don't want that field in my XML.  Do I still need that field in my sender datatype, even if I'm ignoring it, or can I leave it out?
    Thanks for any help.  Please don't just list blogs unless they have something you think is helpful with my specific problem.  I have already read all of the blogs that deal generally with the sender file adapter and file content conversion, and I need more specific help at this point.

    I made one error before, it IS showing up in the Recovered Adapter Audit Log (it took that log about 10 minutes to open that particular tab so I didn't notice them there).
    Here is what it says there:
    2006-06-12 11:22:59 Success Channel CC_S_File_FIPM_Buildings: Entire file content converted to XML format
    2006-06-12 11:22:59 Warning Channel CC_S_File_FIPM_Buildings: Empty document found. Proceed without sending message
    2006-06-12 11:22:59 Success File "/interfaces/one line building.txt" archived after processing
    Here are my parameters in the file content conversion:
    Buildings.fieldNames     RecordType,PLTXT,STORT,STREET,POST_CODE1,CITY1,REGION,PARNR,X_COORD,Y_COORD,ASSIGN_SQ_FT,BLDG_NUM,CAMPUS,GR_SQ_FT,NET_SQ_FT
    Buildings.keyFieldValue     'B'
    Buildings.fieldSeparator     ','
    Buildings.endSeparator     'nl'
    Buildings.keyFieldInStructure     ignore
    Additions.fieldNames     RecordType,ASSIGN_SQ_FT,BLDG_ABBR,CAMPUS,ADDITION,BLDG_USE,BLDG__NUMBER
    Additions.keyFieldValue     'A'
    Additions.fieldSeparator     ','
    Additions.endSeparator     'nl'
    Additions.keyFieldInStructure     ignore
    Floors.fieldNames     RecordType,BLDG_ABBR,CAMPUS,ADDITION,FLOOR,ASSIGNABLE_SQUARE_FOOT,BLDG_NUMBER
    Floors.keyFieldValue     'F'
    Floors.fieldSeparator     ','
    Floors.endSeparator     'nl'
    Floors.keyFieldInStrucutre     ignore
    Rooms.fieldNames     RecordType,SHTXT,MSGRP,ADDITION,ASSIGNED_DEPT,BLDG_ABBV,FLOOR_CAMPUS,AREA,RCD_CODE,DEPT_CODE,BUILDING_NUMBER,ROOM_COMMON_KEY
    Rooms.keyFieldValue     'R'
    Rooms.fieldSeparator     ','
    Rooms.endSeparator     'nl'
    Rooms.keyFieldInStructure     ignore
    And here is my data type:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_FIPM_BuildingUpdate xmlns:ns0="urn:XXXXXX:FIPM:Buildings:SYS">
       <Buildings>
          <PLTXT/>
          <STORT/>
          <STREET/>
          <POST_CODE1/>
          <CITY1/>
          <REGION/>
          <PARNR/>
          <X_COORD/>
          <Y_COORD/>
          <ASSIGN_SQ_FT/>
          <BLDG_NUM/>
          <CAMPUS/>
          <GR_SQ_FT/>
          <NET_SQ_FT/>
       </Buildings>
       <Additions>
          <ASSIGN_SQ_FT/>
          <BLDG_ABBR/>
          <CAMPUS/>
          <ADDITION/>
          <BLDG_USE/>
          <BLDG_NUMBER/>
       </Additions>
       <Floors>
          <BLDG_ABBR/>
          <CAMPUS/>
          <ADDITION/>
          <FLOOR/>
          <ASSIGNABLE_SQUARE_FOOT/>
          <BLDG_NUMBER/>
       </Floors>
       <Rooms>
          <SHTXT/>
          <MSGRP/>
          <ADDITION/>
          <ASSIGNED_DEPT/>
          <BLDG_ABBV/>
          <FLOOR/>
          <CAMPUS/>
          <AREA/>
          <RCD_CODE/>
          <DEPT_CODE/>
          <BUILDING_NUMBER/>
          <ROOM_COMMON_KEY/>
       </Rooms>
    </ns0:MT_FIPM_BuildingUpdate>
    I'm going to recheck everything again, but maybe you guys will see something?  I don't.
    Vanda

  • SENDER FILE ADAPTER (FTP) ERROR

    Hi,
    Iam getting the following error in sender file adapter:
    Could not process due to error: com.sap.aii.adapter.file.ftp.FTPEx: 550 *** ERROR *** NO BATCHES FOR TRANSMISSION
    Could anyone help me in this.
    Thanks &Regards,
    Kiran

    Hi Kiran,
    This problem is not related to PI but rather related to FTP server settings.
    Try changing the name of the file in your adapter settings to a string without any dots and ".
    Try this and let me know if its successful.
    Regards,
    Divya

  • Sender File Adapter Conversion problem - how to start new recordset?

    Hi guys!
    I have a source file like following:
    aaaakkkkkk
    uuuupppppp
    &&hhhhffffff
    6666uuuuuu
    3333rrrrrrrr
    &&kkkkoooooo
    which means - fixed length 4,6 and && starts new recordset.
    I need to get structure like:
    <recordset>
      <item>
        <a>aaaa</a>
        <b>kkkkkk</b>
      </item>
      <item>
        <a>uuuu</a>
        <b>pppppp</b>
      </item>
    </recordset>
    <recordset> ... with h,f and 6,u </recordset>
    <recordset>
      <item>
        <a>kkkk</a>
        <b>oooooo</b>
      </item>
    </recordset>
    Any ideas?
    Let's say, I can add && on the beginning of the file and other "lite" changes... but structure stays the same...
    so, how to start new recordset? with which conversion parameter? for items it is clear...
    Thanx a lot!
    Olian
    Message was edited by:
            Olian Saludew

    aaaakkkkkk<end_of_line>&&uuuuwwwwww<end_of_line>...
    then normal parameters should work fine,
    item.fieldFixedLengths==4,6
    Item.fieldNames=field1,field2
    item.endSeparator=<end_of_line>

  • System error when send file with Sender File Adapter

    Hi all,
    I have configured a "File To ABAP Proxy" scenario. After configuring, i executed a "Test Configuration" in Integration Directory and it's all OK. But this file unable to reach into ABAP Proxy Target. In the Runtime WorkBench\Message Monitoring,  I get an error message in below:
    Engine: Adapter Engine     
    Status: *System Error     *
    Start: 15.08.2008 14:04:01     
    End: 15.08.2008 14:19:01           
    Sender Service: BS_XI_SERVER     
    Interface Servic: urn://FILE_TO_PROXY
    MI_EMPLOYEE_OB
    In this case, I don't know why my Sender File Adapter is error and why status is "System Error" and why it can't reach into Target System. Can it concern a role user?
    ( For more clearly: I configured the source file and the path correctly. And i used the xml file with the content and the document name correctly. In general, the Sender Adapter File don't convert the sender file and its content is same as the Payload in the "Test Configuration", i think it is all OK.)
    Could anyone please help me to resolve this problem, anyone can explain this error, how can i resolve this error?
    Thanks a lot in advance,
    Vinh Vo

    Hi Chirag,
    1.I source structure is very simple as below:
    <ns0:MT_MATERIAL xmlns:ns0="urn://FILE_TO_PROXY">
       <MATERIAL>
          <WERKS>1000</WERKS>
          <MATNR>MAT00001</MATNR>
          <MAKTX>Chemical Material</MAKTX>
       </MATERIAL>
    </ns0:MT_MATERIAL>
    2. the Communication Channel Monitoring in Runtim WorkBench\Adapter Engine is OK for my Sender File Communication Channel, it's in Blue Light.
    However, i don't know what's FCC?
    Thanks and best regards,
    Vinh Vo

  • Sender file adapter - filename containing  *  does not work

    Hi All,
    I am doing simple file-file scenario wherein my filename is something like
    MATMAS05_XI20070911-150159-088.xml 
    there are many files having similar kind of  name which are supposed to be picked
    so simply I can go on writing <b>MATMAS05_XI*.xml</b> in filename
    it is not working.. communication monitoring gives error <i>Error occurred while connecting to the FTP server "10.25.117.237:21": java.lang.NullPointerException</i>
    But  when I use character '?' then it works fine - '?'  placeholder for each extra character
    I am on SP 20.My adapter is configured properly. FTP server working fine with '?' or simple filename. So bit confused why it is not working with *
    Are there some BASIS settings which have to be in place to work it out with * ?
    All your inputs are welcome !!
    Thank You,
    Mugdha kulkarni

    Hi
    this error is not related to multimple files or sending with the * char.. you can use it
    see the below link
    /people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter
    The error related to the server connection.. also check the ip address is correct or not you configured correctly or not..
    also clarfity the correct error description ..
    Chilla

  • Error sender file content conversion

    HI all,
    when an error occurs during the conversion of the file content in sender adapter the others files put in dicrectory is not processed.
    I know that exists one parameter in Sender File Adapter that is possible to specify the directory to archive the file with error, but in what SP it is possible?
    I have the XI SP15 and this feature is not present.
    How I do to instruct the XI to process the nexts files?
    thanks.

    From the Support Package Stack 10 of XI 70
    http://help.sap.com/saphelp_nw2004s/helpdata/en/44/f565854b7341e6e10000000a1553f6/frameset.htm
    From the Support Package Stack 19 of XI 30
    http://help.sap.com/saphelp_nw04/helpdata/en/44/f565854b7341e6e10000000a1553f6/frameset.htm
    Good reason to upgrade.
    Hope this help,
    Regards
    Sandro

  • Consistency check error in sender file content conversion

    Dear Experts,
    I am trying one simple File to File scenario in which i have only fields 1>salesorder_number 2>Description
    I created a txt file with line items "100,crudeoil" with file name as salesorder.txt
    In the sender file adapter i have configured the file convertion paramenters as follows:
    Document name : mt_salesorder_sender  
    Document namespace : http://se.com.sa/sec-sa-qax          "Namespace of message type
    Recordset Structure : document,*
    document.endSeparator : 'nl'
    document.fieldSeparator: ,
    document.fieldNames : salesorder_number,Description
    So after this if i run the scenario In file adapter i am getting the error like "Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'document.fieldFixedLengths' or 'document.fieldSeparator' is missing Consistency check: no. of arguments in 'document.fieldFixedLength' does not match 'document.fieldNames' (0 <> 2) "
    Please let me know where i am going wrong.
    Regards,
    Santhosh

    Hi,
    please maintain the order as
    Recordset Structure : document,*
    document.fieldNames : salesorder_number,Description
    document.fieldSeparator: ,
    document.endSeparator : 'nl'
    Rgds
    joel

  • File Content Conversion Problem: Sender File Adapter

    Hi All,
    In Sender File Adapter, how to spilt the single line into different lines using + as a separator. Plz see below my source file.
    #SMESS=IV01:672633SAP:676968:::NL51:02:11+
    COPS=678713:676968:070416:IV01'3:11IVFR=678713:PDA and'IND 2'9206 AD'Dtn'INIVDA=070416IVNR=6264008195:676968add1
    #EMESS=0+
    In above txt file there are 3 lines.
    1st line starts with #SMESS
    2nd line starts with COPS 
    3rd line starts with #EMESS.
    In 2nd line, if u observe there are 3 lines separating by +. My task is, I have to spilt the 2nd line into 3 lines using + separator.
    I already used the xx.endSeparator as '+' to spilt the line but it is not working....
    Could anyone help me how to do this. This is very urgent
    Thnx,
    Kumar.

    Hi Shankar,
    1) My Expected XML Structure:
      <?xml version="1.0" encoding="utf-8" ?>
    - <ns:MT_IV01 xmlns:ns="http://ms.com/dev/ms">
    - <Recordset>
    - <DT_SMESS>
      <D_9901>IV01</D_9901>
      <D_9902>672633SAP</D_9902>
      <D_9903>676968</D_9903>
      <D_9904 />
      <D_9905 />
      <D_9906>NL51</D_9906>
      <D_9907>02</D_9907>
      <D_9908>11</D_9908>
      </DT_SMESS>
    - <DT_COPS_2>
      <D_C022>678713</D_C022>
      <D_C023>676968</D_C023>
      <D_C008>070416</D_C008>
      <D_C111>IV01'3</D_C111>
      <D_H559>11</D_H559>
      </DT_COPS_2>
    - <DT_IVFR_2>
      <D_C024>678714</D_C024>
      <D_D333>PDA and'IND 2'9206 AD'Dtn'IN+</D_D333>
      </DT_IVFR_2>
    - <DT_IVDA_2>
      <D_D365>070416</D_D365>
      </DT_IVDA_2>
    - <DT_IVNR_2>
      <D_D189>6264008195</D_D189>
      <D_H364>676968add1</D_H364>
      </DT_IVNR_2>
    - <DT_EMESS>
      <D_D9901_1>0</D_D9901_1>
      </DT_EMESS>
      </Recordset>
      </ns:MT_IV01>
    2) I am not getting any error even if I use key Fields or Not becoz in the RecordSet Structure I mentioned DataType, 1 instead of DataType, *.
    3) FCC Parameters:
    Document Name: MT_IV01
    Document Namespace: http://ms.com/dev/ms
    Recordset Structure: DT_SMESS,1,DT_COPS_2,1,DT_IVFR_2,1,DT_IVDA_2,1,DT_IVNR_2,1,DT_EMESS,1
    Recordset Sequence: Ascending
    Key Field-type : String (Case-sensitive)
    4) Error:
    Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 2 according to structure 'DT_COPS_2':java.lang.Exception: ERROR in configuration: more elements in file csv structure than field names specified!

  • Archive file with errors in sender file adapter not working! please help!

    Hi Experts,
       I have a file to RFC scenario. the input is a XML file. I have setup the flag in sender file adapter channel for archiving the input files with errors. But it is not working.
    For testing I have used an invalid xML file for example without the main XML tag. I have also tested with a MSWORD file saved with.xml extension. But in both the cases the files are not getting archived.
    My archive location permissions are fine and in fact normal archive operation is happening. That is, if I select the processing mode as "Archive" and gave the Archive directory then files are getting archived. The problem is only with the "Archive faulty source files" option.
    What am I missing? DO I need to do some more configurations?
    What are the prerequisites if any for this option?
    How to test this?
    Please help me! I will be greatfull to you all!
    Thanks & Regards
    Gopal

    and go thru this links
    Creating a Single Archive of the Version Files
    http://help.sap.com/saphelp_nw04/helpdata/en/79/1e7aecc315004fb4966d1548447675/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/31/8aed3ea86d3d67e10000000a114084/frameset.htm
    Note: reward points if solution found helpfull
    Regards
    Chandrakanth.k

  • Error in sender file adapter: source directory does not exist

    Hi,
    The PI system is 7.11
    I've created sender file adapter with following details:
    Transport Protocol : File System
    Source directory: /interfaces/In
    I checked in AL11 that this path really exists and it does. (I can even see the .txt file that should be processed.)
    But still i get in Communication Channel Monitoring the following error:
    "Configured Source directory "/interfaces/In" does not exist.
    (i also tried to give the source directory as "interfaces/In" and as "//interfaces/In" but still the same error.
    Any suggestions as to what is wrong?
    kr
    Robert

    Actually, Need to use forward slash (/) to separate directory names in accordance with the Java specification.
    But wanted to try if that works..
    Also check directory name , path again as this is case sensitive...
    --Divyesh

  • File to SOAP,error in sender file adapter

    Hi,
    I am doing a scenario FILE to SOAP where In file adapter I am using Quality od service as Exactly once in order.I am getting the below error.It works fine when I use QOS=Exactly once.Not sure why,can you guys please help me.Can we really use QOS-EOIO for sender file adapter,where exacly do we use it.
    Thanks
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter  -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Edited by: guest xi on Apr 16, 2008 11:55 AM

    Hi,
    Thanks for your replies guys.I diid give the queue name ,I dont know what is causing the error.Now even QOS=EO which was working fine before is throwing an error.I am using the same file name for both
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter   -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>

  • Is Sender File Adapter always throws error when there is no file?

    Hi,
    I have a simple question but can't find a straight answer to it. I have a Sender File adapter that configured to pick up file XXX* from FTP server every 1 hour. But a file can come every 2, 3, or 7 hours- no certain time.When there is no file I got "File not found " error. As we use alerts, this behaviour is not acceptable.
    Does this error comes always if there is no file? Any possible way to avoid this error ?
    Thanks for help.
    Nataliya

    Hi Ravi,
    I can see the error in Runtime Workbench under CC monitoring. To be precise it says:
    An error occurred while connecting to the FTP server '1X.1XX.XX.XX:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 552 RMS-E-FNF, file not found, ES4_SAP*'. For details, contact your FTP server vendor.
    My ftp server has the following set up:
    Server: xx.xxx.xx.xx
    Port:21
    Dataconnection:Active
    Timeout:120
    Connection secuirity: None
    User name .... etc set up.
    Connect mode: Per file transfer
    Transfer mode:Text
    QoS:EO
    Pollinterval: 120 (for test purposes)
    Processing Mode: delete
    Can it be that its a ftp server generates error and sends back to XI?
    Thanks,
    Nataliya

  • Sender File Adapter - Content Conversion

    HI Friends,
    I got a scenario where I need to convert the File to XML document through Sender file adapter..
    My file looks like below.
    BATCH1234........
    12DASER123142JMM
    237DSAFDLKC839890
    45SDFLASJ90011
    BATCH3455...
    132FGAR
    SD21352525
    BATCH998898...
    123145DSRTW
    12FSTS
    So there is a Header and Body for each record set..
    My XML Structure is as follows.
    <TimeStructure>
      <TimeRecord>
         <ControlRec>
             <Field1>BATCH </Field1>   
             <Field2> ...</Field2>
         </ControlRec>
         <DataRec>
             <F1> ...... </F1>
             <F2> ...... </F2>
         </DataRec>
      </TimeRecord>
      <TimeRecord>
         <ControlRec>
             <Field1> BATCH  </Field1>   
             <Field2> ADFAS  </Field2>
         </ControlRec>
         <DataRec>
             <F1> ...... </F1>
             <F2> ...... </F2>
         </DataRec>
       </TimeRecord>
    </TimeStructure>
    The blog <a href="/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem:///people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    is somewhat relevant to my requirement.
    But the problem is I have the keyfield "BATCH" for my header file but don't have any <b>key field in the data record</b> of the input file.
    Please help me out how to mention the configuration parameters.
    Regards,
    Kumar

    Hi,
    If you don't have constant key value for your detail records, then you can not directly get the required xml.
    So in this case, you can read all the records in a common Row model, i.e each record will be considered as a one row with all the values, and then split this row with Substring or java functions in the mapping.
    Even you can do this in the Adapter module .
    If you have key value for each record to identify then you can try with content conversion.
    Regards,
    Moorthy

  • Sender file adapter error

    Hi,
    The sender file adapter is reading a fixed width file . The file is not to be seen in the sxmb_moni. In the adapter monitoring is showing processed and green in color.
    How do i resolve this issue.
    In my recordset contains multiple substructures
    <Recordset>
            <Header>
                 type
                 code
                 id
            </Header>
            <Item>
                        type
                        qty
                        price  
            </Item>
    </Recordset>
    Header.fieldFixedLengths = 1,5,10
    Header.endSeparator = 'nl'
    Header.fieldNames = TYPE,CODE,ID
    Header.keyFieldValue = 01
    Item.fieldFixedLengths = 4,5
    Item.endSeparator = 'nl'
    Item.fieldNames = QTY,PRICE
    Item.keyFieldValue = 02
    What should i give in keyFieldValue . Is the above configuration correct.
    Kindly suggest
    Thanks
    Varghese

    Hi,
    The key field value is normally a record type identifier. For example, a header record may always start with '1' or 'HD', and an item record may always start with '2' or 'IT' in your file. The 'type' field, which appears in both header and item records in your example, fits in as the identifier.
    So, your parameters should be:
    Header.fieldFixedLengths = 1,5,10 (or maybe 2,5,10)
    Header.endSeparator = 'nl'
    Header.fieldNames = TYPE,CODE,ID
    Header.keyFieldValue = 1 (or maybe HD)
    Item.fieldFixedLengths = 1,4,5 (or maybe 2,4,5)
    Item.endSeparator = 'nl'
    Item.fieldNames = TYPE,QTY,PRICE
    Item.keyFieldValue = 2 (or maybe IT)
    If your file has varying values of TYPE instead of 1,2 (or HD or IT), the File Adapter will not be able to handle the structured file. You may have to choose the option 'File without content conversion'.
    Hope this helps,
    Bhanu

Maybe you are looking for