How to isolate error with a record/segment in IDOC with multiple records

I have an IDOC with multiple records/segments (typically 1000 records/segments). Sometime XI can not process the IDOC because of some control characters in data.
1. How can I pre-processed the IDOC to remove those control characters?
Can I use XPATH expression/Java class to do it? How can I configure the XPATH expression/Java class in XI to pre-process the file?
2. Until I have answer to 1st question. I would like to find out the error is exactly for which record? What configuration can I do in XI to isolate the error is with which record/segment in IDOC?
Thanks in advance.

Split the IDoc.
with in the UDF, after the validations if every thing fine, pass as successful records to success_MT and pass it to target system using Branching in BPM.
if errors found in the record, then store the error records in Hash table with in UDF, get the IDoc number, frame as a string and raise alert.
U have to do this in the context of IDoc.
If U wanna get the IDoc Number, Segment Name and field name for every failure, U can pass the expected error field name as constant to UDF, frame the sentence in the UDF like -> <b>IDoc 1234321 segment – SEG001 – field – FLD03 has a special character ‘*’</b>.
If U wanna pass this string to source/target, U can do in error messages branch in BPM.
U must use BPM for splitting the IDoc, since it is multi-mapping.
reg.,
Yallabandi.

Similar Messages

  • How to generate a new segment in IDoc for multiple occurance of Control Num

    Hi Experts,
    In my scenario, i need to generate a new segment in IDoc(Target Structure) based on  Control Number Field in the Source Structure.
    The segment need to be created for multiple occurance of the Control Number.
    Ex:
    Control Number - 100 appears 5 times in Source Structure.This control Number is mapped to one of the Field in the Segment of  IDoc.
    Now my requirement is to generate the Segment 5 times with respective to this Control Number.
    please help me out to resolve this issue.
    Thanks,
    Kish.

    Hi,
    Here is the XML Structure of my Source:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:GoodsReceipt_MT xmlns:ns0="urn:WOL-com:XI:data:HJ:10">
       <row>
          <CONTROL_NUMBER>111</CONTROL_NUMBER>
          <LINE_NUMBER>1111</LINE_NUMBER>
          <CONTROL_NUMBER_2/>
          <OUTSIDE_ID/>
          <WH_ID>111111</WH_ID>
          <LOCATION_ID/>
          <HU_ID>11111</HU_ID>
          <NUM_ITEMS/>
          <ITEM_NUMBER>111111</ITEM_NUMBER>
          <CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>
          <LOT_NUMBER>11111</LOT_NUMBER>
          <UOM>11111</UOM>
       </row>
       <row>
          <CONTROL_NUMBER>111</CONTROL_NUMBER>
          <LINE_NUMBER>12222</LINE_NUMBER>
          <CONTROL_NUMBER_2/>
          <OUTSIDE_ID/>
          <WH_ID>12222</WH_ID>
          <LOCATION_ID/>
          <HU_ID>1222</HU_ID>
          <NUM_ITEMS/>
          <ITEM_NUMBER>112222</ITEM_NUMBER>
          <TRAN_QTY>112222</TRAN_QTY>
          <CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>
          <LOT_NUMBER>12222</LOT_NUMBER>
          <UOM>1122222</UOM>
       </row>
       <row>
          <CONTROL_NUMBER>222</CONTROL_NUMBER>
          <LINE_NUMBER>2222</LINE_NUMBER>
          <CONTROL_NUMBER_2/>
          <OUTSIDE_ID/>
          <WH_ID>22222</WH_ID>
          <LOCATION_ID/>
          <HU_ID>222222</HU_ID>
          <NUM_ITEMS/>
          <ITEM_NUMBER>2222222</ITEM_NUMBER>
          <TRAN_QTY>22222222</TRAN_QTY>
          <LOCATION_ID_2>33333333</LOCATION_ID_2>
          <CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>
          <LOT_NUMBER>22222</LOT_NUMBER>
          <UOM>22222</UOM>
       </row>
       <row>
          <CONTROL_NUMBER>333</CONTROL_NUMBER>
          <LINE_NUMBER>3333</LINE_NUMBER>
          <CONTROL_NUMBER_2/>
          <OUTSIDE_ID/>
          <WH_ID>33333</WH_ID>
          <LOCATION_ID/>
          <HU_ID>33333</HU_ID>
          <NUM_ITEMS/>
          <ITEM_NUMBER>333333</ITEM_NUMBER>
          <TRAN_QTY>33333333</TRAN_QTY>
          <CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>
          <LOT_NUMBER>33333</LOT_NUMBER>
          <UOM>333333</UOM>
       </row>
    </ns0:GoodsReceipt_MT>
    Now Control_Number 111 occurs 2 times, 222 & 333 occurs 1 time.
    Now one IDoc for 111,222 & 333 should be generated.
    But Control_number 111 appears 2 times.
    Now the data in the 2 rows should be passed to Single IDoc by repeating the segments inside the IDoc.
    As u said i changed the Occurance of IDoc to 0...unbound and imported as External Definition. I have done upto Generating IDoc for each unique Control_Number.
    I stuck up at repeating the Segments in the IDoc.
    So please help me out.
    Thanks,
    Kish.

  • How to retrive one table records into another table by multiple records

    how to retrive table X records into another table Y by multiple records (means at once i want display 10 records) in form 6i .
    when i am written cursor it is ftching only one record.But i want to display all records at once.
    Declare
    Cursor cur_name is
    select PROTOCOL_NO,DOCNUM,SUBSETSN,REPEATSN,AESEQ,AETERM from coding_ae WHERE PROTOCOL_NO='KP229';
    Begin
    open cur_name;
    loop
    fetch cur_name into :PROTOCOL_NO,:DOCNUM,:SUBSETSN,:REPEATSN,:AESEQ,:AETERM;
    exit when cur_name%notfound;
    next_record;
    end loop;
    close cur_name;
    End;

    Hi,
    Make sure the cursor is in the detailed block. For that use 8GO_BLOCK* built-in. So the code will be
    Declare
    Cursor cur_name is
    select PROTOCOL_NO,DOCNUM,SUBSETSN,REPEATSN,AESEQ,AETERM from coding_ae;
    Begin
    GO_BLOCK('<detailed_block_name>');
    open cur_name;
    loop
    fetch cur_name into :PROTOCOL_NO,:DOCNUM,:SUBSETSN,:REPEATSN,:AESEQ,:AETERM;
    exit when cur_name%notfound;
    next_record;
    end loop;
    close cur_name;
    End;Regards,
    Manu.
    If my response or the response of another was helpful or Correct, please mark it accordingly

  • "Error during application input" while processing IDOC with status 51

    Hi ,
    I tried to post an error IDOC with status "51" of message type FIDCC2 using program RBDINPUT, it just creates a message "Error during application input" . It is not calling the application dialog . Does anyone have answer for this?
    Thanks,
    Hemant.

    HI,
    Kindly check the RFC entries in t-code SM58.
    If any entries are their please release them manually selecting each one and press "F6".
    Regards,
    Anil.

  • IDocs and Multiple Records

    Ignorant newbie here.  In migrating legacy data to an R/3 system, one approach seems to be to massage the data into IDoc format and ship it to R/3 for processing by some BAPI_xxx_CREATEFROMDATA BAPI.
    I have a tool that can be changed to write IDoc formated data out to a disk file. 
    I am unclear on whether an IDoc can contain the data for only one record or a whole bunch of records.  Or maybe I should be asking whether the disk file I produce can contain multiple IDocs (header, segments, header, segments,...).
    Also, once I've produced the file containing the IDoc(s), what do I do with it; does DX Workbench handle such things?

    Hi,
    1) Each IDoc# contains data to process single transaction. But it contains with mutiple rows with segments data that to process necessary application data that required to create like Sales order creation/change , Material master creation/change.
    2) your disk file can have any no# of idocs.
    Your DX workbench(data migration tool) will process all the IDocs from file by considering one idoc# at a time.
    It is as simple as like how your BDC program works inorder to post your orders that reading from file.
    For understading about DX requirements click on given below link:
    http://www.sapgenie.com/sapgenie/docs/PROCESSING_LSMW_DXWB.doc
    Naga

  • How to read the current value of hyperlink java bean in multiple record,

    I have used a java bean for a multi-record block item. On When-new form-instance I m using fbean package as follows
    FBean.Register_Bean(hHyperlink,1,'oracle.forms.demos.beans.Hyperlink');
    FBean.Invoke(hHyperlink,1,'setURL','Abc_Entry');
    FBean.Invoke(hHyperlink,1,'setLabel','Abc Document');
    FBean.Enable_Event(hHyperlink,1,'actionListener',true);
    You can see that I am using the number 1 which is hardcoded,for which I will replace with a incremental loop and remove it. Now when I m using the When-Custom-Item-Event, I want to read the URL for the current instance.
    I m using
    vcEventData := Fbean.Invoke_Char('CONTROL.HYPERLINK',2,'getURL');
    to get the second record value , where in I want to avoid the hardcoded 2 or 1
    Thank you

    I recommend you these forums for your question:
    Forums Home » Oracle Technology Network (OTN) » Products » Database » JVM
    Java in the Oracle Database
    Forums Home » Oracle Technology Network (OTN) » Technologies » Java » Java Server Pages (JSP)
    Java Server Pages (JSP)
    Forums Home » Oracle Technology Network (OTN) » Technologies » Java
    http://forums.oracle.com/forums/index.jsp?cat=24
    Joel Pérez

  • Generate mutiple datarecord if source segment of idoc occur multiple times

    Hi all,
            I am doing an idoc to file scenario .In that an idoc segment E!FSEG is occuring five times totally and  3 time with two fields "eibeln"and sgtxt.I have to generate data record 3 times when the field eibelen and sgtxt both are persent in the segment.
                            I mapped my target datarecord with segment E!FSEG with if conditon that if both field r persent then map E!FSEG wtih data record but data record is getting created 5 times instead of 3.Plz guide me as its very urgent
    Regards
    Neha

    Neha,
    Try the below option and let us know.
    eibeln[change context to one level upper]  --->Exist
                                                                               >  AND->  Createif Target
    sgtxt[change context to one level upper] -
    >Exist
    Best regards,
    raj.

  • File to IDOC for multiple records

    hi friends
       my requirement is to design a scenario for FILE to IDOC (for customers) say i have 120 customers. i have changed the XSD file for IDOC and strucked at Integration Process. can anyone guide me in BPM.
    thanks and regards
    suman.

    hi,
    you can search sdn for it.
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    Single File to multiple IDoc
    regards,
    ujjwal kumar

  • IDOC / Integration Builder  -- contains errors (unable to read segments)

    HELLO,
    I have a problem. I have created a new IDOC. but when I imported to the KIntegration Builder it says:
    Import started...
    ZHRMD_IT.ZHRMD_IT: Error
      + Error: IDoc type ZHRMD_IT contains errors (unable to read segments)
    Import failed with 1 error.
    The rare thing is that the idoc is a copy of another idoc of SAP (HRMD_A06) but I have taken out some E1Pxxxxx.
    Its like a reduced Idoc but as a new idoc.
    Can Someone help me, please.
    How can I see what segment is wrong in the new idoc (ZHRMD_IT)?
    Thank you
    Pablo Mortera.

    Hi,
    As per the error , you are importing some custom idocs.
    Go to WE30 and check that, all the segments in the idoc has got released or not ..
    <i>All the segments are the sap stardard segments.</i>
    >>You may be using standrad segments, but in custom idocs right.Anyway check, idoc and its segments are released or not..
    Then start importing the idoc into IR..
    Regards,
    Moorthy

  • HT1551 how to correct error 400-1

    how to correct error 400-1

    Have you had any luck with this Error 4450 problem? I have just started having the problem today.

  • How to get multiple records using fn-bea:execute-sql()

    Hi,
    I created Proxy service(ALSB3.0) to get records from DB table. I have used Xquery function(fn-bea:execute-sql()). Using simple SQL query I got single record, but my table having multiple records. Please suggest how to get multiple records using fn-bea:execute-sql() and how to assign them in ALSB variable.
    Regards,
    Nagaraju
    Edited by: user10373980 on Sep 29, 2008 6:11 AM

    Hi,
    Am facing the same issue stated above that I couldnt get all the records in the table that am querying in the Proxyservice.
    For example:
    fn-bea:execute-sql('EsbDataSource', 'student', 'select Name from StudentList' ) is the query that am using to fetch the records from the table called StudentList which contains more than one records like
    Id Name
    01 XXX
    02 YYY
    03 ZZZ
    I tried to assign the result of the above query in a variable and while trying to log the variable, I can see the below
    <student>
    <Name>XXX</Name>
    </student>
    I want to have all the records from my table in xml format but it's not coming up. I get the value only from the first row of my table.
    Please suggest.
    regards,
    Venkat

  • ABAP Mapping with multiple records

    Hi All,
    I am doing an ABAP mapping and I am new to this.
    I have a following record structure:
    <record>
       <field1>
       <field2>
       <fieldn>
    </record>
    I will receive the multiple records with the above structure in single file.
    I have following the Blog from SDN but it is saying only for single record.
    Can please someone post the code for handing multiple records (ie. loop structure).
    or else please mail me at [email protected]
    Regards,
    Shylesh

    Hi Thanks for the reply.
    But actually these threads do not sufficient for my requriement.
    I written the following code and it is working fine for one single record.  But I want to change this code to work for multiple records which I am not able to do as I am new to Object Oriented.
    method IF_MAPPING~EXECUTE.
    initialize iXML
      type-pools: ixml.
      class cl_ixml definition load.
    create main factory
      data: ixmlfactory type ref to if_ixml.
      ixmlfactory = cl_ixml=>create( ).
    create stream factory
      data: streamfactory type ref to if_ixml_stream_factory.
      streamfactory = ixmlfactory->create_stream_factory( ).
    create input stream
      data: istream type ref to if_ixml_istream.
      istream = streamfactory->create_istream_xstring( source ).
    parse input document =================================================
    initialize input document
      data: idocument type ref to if_ixml_document.
      idocument = ixmlfactory->create_document( ).
    parse input document
      data: iparser type ref to if_ixml_parser.
      iparser = ixmlfactory->create_parser( stream_factory = streamfactory
                                                     istream = istream
                                                    document = idocument ).
      iparser->parse( ).
    get message content of tag <empno>
      data: incode type ref to if_ixml_node_collection.
      data: incode1 type ref to if_ixml_node_collection.
      data: incode2 type ref to if_ixml_node_collection.
      data: incode3 type ref to if_ixml_node_collection.
      data: incode4 type ref to if_ixml_node_collection.
      data: incode5 type ref to if_ixml_node_collection.
      data: incode6 type ref to if_ixml_node_collection.
      data: incode7 type ref to if_ixml_node_collection.
      data: incode8 type ref to if_ixml_node_collection.
      data: incode9 type ref to if_ixml_node_collection.
      incode = idocument->get_elements_by_tag_name( 'empno' ).
      incode1 = idocument->get_elements_by_tag_name( 'empname' ).
      incode2 = idocument->get_elements_by_tag_name( 'address1' ).
      incode3 = idocument->get_elements_by_tag_name( 'address2' ).
      incode4 = idocument->get_elements_by_tag_name( 'address3' ).
      incode5 = idocument->get_elements_by_tag_name( 'zipcode' ).
      incode6 = idocument->get_elements_by_tag_name( 'mailid' ).
      incode7 = idocument->get_elements_by_tag_name( 'phoneno' ).
      incode8 = idocument->get_elements_by_tag_name( 'country' ).
      incode9 = idocument->get_elements_by_tag_name( 'city' ).
    get XI header data (here: "Sender Service")
      data: l_sender_service type string.
      l_sender_service = param->get( if_mapping_param=>sender_service ).
    add trace (appears in message monitoring)
      data: l_trace type string.
      concatenate 'Sender Service = ' l_sender_service into l_trace.
      trace->trace( level = '1'
      message = l_trace ).
    build up output document =============================================
    create output document
      data: odocument type ref to if_ixml_document.
      odocument = ixmlfactory->create_document( ).
    create element 'SenderService' and add it to the document
      data: msgtype type ref to if_ixml_element.
      msgtype = odocument->create_simple_element( name = 'record'
                                                parent = odocument ).
    create element 'SenderService' and add it to the output document
      data: elementsender type ref to if_ixml_element.
      elementsender = odocument->create_simple_element( name = 'SenderService'
                                                       value = l_sender_service
                                                      parent = msgtype ).
    add node to the output document
      data: outcode type ref to if_ixml_node.
      data: outcode1 type ref to if_ixml_node.
      data: outcode2 type ref to if_ixml_node.
      data: outcode3 type ref to if_ixml_node.
      data: outcode4 type ref to if_ixml_node.
      data: outcode5 type ref to if_ixml_node.
      data: outcode6 type ref to if_ixml_node.
      data: outcode7 type ref to if_ixml_node.
      data: outcode8 type ref to if_ixml_node.
      data: outcode9 type ref to if_ixml_node.
      outcode = incode->get_item( index = 0 ).
      outcode1 = incode1->get_item( index = 0 ).
      outcode2 = incode2->get_item( index = 0 ).
      outcode3 = incode3->get_item( index = 0 ).
      outcode4 = incode4->get_item( index = 0 ).
      outcode5 = incode5->get_item( index = 0 ).
      outcode6 = incode6->get_item( index = 0 ).
      outcode7 = incode7->get_item( index = 0 ).
      outcode8 = incode8->get_item( index = 0 ).
      outcode9 = incode9->get_item( index = 0 ).
      data irc type i.
      irc = msgtype->append_child( outcode ).
      irc = msgtype->append_child( outcode1 ).
      irc = msgtype->append_child( outcode2 ).
      irc = msgtype->append_child( outcode3 ).
      irc = msgtype->append_child( outcode4 ).
      irc = msgtype->append_child( outcode5 ).
      irc = msgtype->append_child( outcode6 ).
      irc = msgtype->append_child( outcode7 ).
      irc = msgtype->append_child( outcode8 ).
      irc = msgtype->append_child( outcode9 ).
    render document ======================================================
    create output stream
      data: ostream type ref to if_ixml_ostream.
      ostream = streamfactory->create_ostream_xstring( result ).
    create renderer
      data: renderer type ref to if_ixml_renderer.
      renderer = ixmlfactory->create_renderer( ostream = ostream
                                              document = odocument ).
      irc = renderer->render( ).
    endmethod.
    Can anybody help me making these changes.
    Thanks in advance.
    Shylesh

  • 5 IDOC with status 29 Error in ALE service

    hi there,
    im looking at this similar problem with less information on me the only info i got is this can anyone help me out pls
    IDOC Status Outbox:
    IDOC failure between 13/07/2008 to 14/07/2009
    1 IDOC with status 02 Error passing data to port
    5 IDOC with status 29 Error in ALE service
    IDOC Status InBox:
    88 IDOC with status 51 Application document not posted
    regards
    raju

    Hi,
    Check this thread.
    DB13-DBCHECK by saving log-throwing DUMP:TSV_TNEW_BLOCKS_NO_ROLL_MEMORY
    Regards.

  • Line separator to get multiple records in one variable

    Hi Experts,
    I have a requirement where i need to get data in the below form , in exactly one variable.
    Invoice No.       Inv. Date      Voucher   Gross Amount    TDS Amount     Discount    Paid Amount  
    986013092,17   04/08/2010    00091217   32415.00            .00                 .00          32415.00
    Bharti Infot      27/07/2010     00091230   19600.00            .00                 .00          19600.00
    9860442689    04/08/2010       001247     47374.00            .00                  .00         47374.00
    2031565000,2031565000Total Amount     99389.00             .00                  .00         99389.00
    As of now, I have written the following,
    loop at lt_merge into ls_merge.
      lv_skfbt  = ls_MERGE-SKFBT.
      lv_budat  = Ls_MERGE-budat.
      lv_wskto  = Ls_MERGE-wskto.
      lv_wrbtr  = Ls_MERGE-wrbtr.
      lv_WT_QBSHB = ls_merge-WT_QBSHB.
    concatenate invoice_id
                ls_merge-BELNR
                lv_BUDAT
                ls_merge-XBLNR
                lv_skfbt
                lv_wt_qbshb
                lv_WSKTO
                lv_wrbtr
    into invoice_id separated by space.
    endloop.
    which gives me one row of the table where, invoice_id stores my entire one record as a string. My question is how do I proceed with separating the lines if I have multiple records?
    Thanks in advance..
    Regards,
    Trishna

    HI
    choose some character that will be not use in your data for example '|' vertical separator. You will get string:
    invoice_id  = line1 | line2 | line3 |.....
    loop at lt_merge into ls_merge.
    lv_skfbt = ls_MERGE-SKFBT.
    lv_budat = Ls_MERGE-budat.
    lv_wskto = Ls_MERGE-wskto.
    lv_wrbtr = Ls_MERGE-wrbtr.
    lv_WT_QBSHB = ls_merge-WT_QBSHB.
    concatenate invoice_id
    ls_merge-BELNR
    lv_BUDAT
    ls_merge-XBLNR
    lv_skfbt
    lv_wt_qbshb
    lv_WSKTO
    lv_wrbtr
    into invoice_id separated by space.
    new code
    concatenate  invoice_id '|' into invoice_id
    endloop.

  • IDocs with incorrect status

    Hi !
    When i tried to upload data from R3 to BW based on generic DataSource
    ( function module ) , in the monitor i  get the following error :
    Status code : 56. Description: "Idoc with error added" .
    How can i get more details about the error? How To correct the Error ?
    Thanks
    Moshe

    Hi,
    it's IDoc with errors added
    check if you have any errors in other stauses
    and display 56 (double click) in WE02
    you should see some more descriptions .
    for 51 or 56 Errors do the following steps
    goto WE19 > give the IDOC Number and Execute>
    Press on Inbound function Module
    Refer
    https://forums.sdn.sap.com/click.jspa?searchID=4344391&messageID=3662902
    Foe more information, please check this links.
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    rEGARDS

Maybe you are looking for

  • Tools.jar Source Code

    Hello I am working on Multi Rebinding and Component mobility in a component programming framework.I need the source code of Tools.jar from where i can download the code of tools.jar. I have download the the Java SE 6 source code but i need the code o

  • Rollback of JDBC Statement on error - Stored Procedure

    Hi All, We are using the JBDC receiver adapter for inserting the record and for that we are using the Strored Procedure and we have N number of the records for insertion in a single mapping so, we have given the occurence of the Statement 1 : unbound

  • How do I get my game to work in Parallels?

    I purchased parallels to run programes in Windows XP and I upgraded to Parallels 3.0 to have the ability to play DirectX games. I loaded Empire Earth II Platimun Edition. When I put the disc in to play I get a popup message to insert the original dis

  • Tax configuration

    hai everybody when ever i m trying to maintain record for tax type mwst it is giving an error called "tax code in taxinj is invalid" can anybody guide where i have to search to fix this and maintain taxes for my docs thank you so much

  • Database Storage Shifting

    Dear All, Our Production Database files are hosted in SAN Storage. Right now we want to movieto a new storage provided by a different storage company I would like to know what are things/procedures to be done from the database side and any links that