How to handle errors in a file at sender side?

Hi
I have done a file to proxy scenario.
I know how to handle errors on proxy.
But on sender side when picking the file if one the record have worng fomat its throwing mapping error and its not processing any record..
I wanted to process the records which have right format and data and  all remaining recrods which have wromg format should be send back to the sender as file.
How to do this.
How to handle error in sender file.
Regards
Sowmya

Hello Sowmya,
In your scenario Three ways you can validate the data.
1) Before the data reaches into SAP system ie in XI system during Mapping or before mapping i,e in Adapter Module in the Sender side
2) this option, is in the receiver applications side. ie. Validations will be taken care in the SAP system i.e in ABAP server proxy code.
3)Through BPM, If Mapping Exception Occures then through exception Branch you can send bad formate file to sender again.
Generally, it is prefer to more business critical validations in the Application System ie Receiver Application System (ABAP Server Proxy)
In this, you can have more flexibility of the validations as you are validating some of the SAP payroll informations as Personal ID etc.
Based on the complexity and flexibility of the requirement, you can either do this in the XI (if XI, ie Sender Adapter Module or Mapping) or in the ABAP proxy
Thanks'
Sunil Singh

Similar Messages

  • How to handle error for a file to file transform in ODI

    I am doing a lab for file to file transformation where source = CSV file and target = Flat file.
    1) When I am changing the datatype in source two files are getting created where one having the errored out data and the other having the errored message, how how to handle the errored data?
    2) If the target path is changed the session in ODI is showing as completed, it should error out. Here no files are created in source as earlier. Hoe to handle this type of error?

    Hi,
    I have used the following KMs in my transformation with the following options:
    IKM SQL Incremental Update
    INSERT    <Default>:true
    UPDATE    <Default>:true
    COMMIT    <Default>:true
    SYNC_JRN_DELETE    <Default>:true
    FLOW_CONTROL    <Default>:true
    RECYCLE_ERRORS    <Default>:false
    STATIC_CONTROL    <Default>:false
    TRUNCATE    <Default>:false
    DELETE_ALL    <Default>:false
    CREATE_TARG_TABLE    <Default>:false
    DELETE_TEMPORARY_OBJECTS     <Default>:true
    LKM SQL to SQL
    DELETE_TEMPORARY_OBJECTS    <Default>:true
    CKM Oracle
    DROP_ERROR_TABLE    <Default>:false
    DROP_CHECK_TABLE    <Default>:false
    CREATE_ERROR_INDEX    <Default>:true
    COMPATIBLE    <Default>:9
    VALIDATE    <Default>:false
    ENABLE_EDITION_SUPPORT    <Default>:false
    UPGRADE_ERROR_TABLE    true

  • How to handle the java.policy file ?

    Can somebody tell me how to handle the java.policy file?
    I always get java.net.SocketExceptions and java.security.AccessControlExceptions while connecting to an appserver from an applet.
    What do I have to write in the java.policy file, where do I have to place it and do I have to call it in some way form my applet?
    Thanks in advance.
    don call

    The java.policy file goes in your jre installation directory in .../jre/lib/security (there should be one there already).
    I used it to allow otherwise restricted permissions for an applet using javax.comm. Add something like the following to the file:
    grant codeBase "URL:http://yourDomainName/rootDirectoryOfYourApp/*" {
         permission java.security.AllPermission;
    This will give the applet downloaded from your site all permissions. You might want to give only certain permissions, I don't know.
    Teri

  • How do I record a sound file and send it as an attachment using my 4s?

    How do I record a sound file and send it as an attachment using my 4s?

    Hi,
    The following is the program[Click Here| http://saptechnical .com/Tips/ABAP/email/EmailProgram.txt] which will send any format file. Actual Creator of the program is Amit Bisht.
    Thanks & Regards,
    Rock.

  • Multiple Files at sender side

    Hi Friends,
    Im working with a scenario which gives me two different files for a single sender file.
    My sender structure is having a filed "Position" which takes 2 values ( One and Two).
    When i give these values, my target structure will be of two messages, one with  "Position = one" and the other with "Position = two".
    Im getting two files at sender side...which includes both the messages in it.
    Can anyone tell me how to get the two files which consists of ONE message each.
    Thanks In Advance,
    Divya

    hi divya,
    please have alook of following links,
    for enhanced interface determination,
    https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3115. [original link is broken] [original link is broken] [original link is broken]
    some other links..
    Re: split messag. configuration
    Re: Multi Mapping 1 to n. SP15
    regards,
    navneet

  • Synchronous file adapter sender side configuration in sap pi

    Hi Experts
    synchronous file adapter sender side configuration in sap pi
    can you explain any one tell me step by step procedure?
    Regards
    Sagar

    Hi,
    You can use RequestResponseBean in the sender file adapter module .
    RequestResponseBean (SAP Library - SAP Exchange Infrastructure)
    Request/Response Bean for IDOC_AAE adapter
    Instead of IDOC_AAE adapter you can use FILE adapter.
    Regards,

  • How to handle errors in data templates

    Hi
    What is the recommended way to handle errors for example if one of your SQL statement in a data template returned no data how and where would you be able to create an error message for the user to find and read.
    Thanks,
    Mark

    The closest I have come to doing this is to put conditional statements into the format template. If a value matches an expected (ex. is null) you can return a message (in the report) via the format template (ex. "No Data Found").
    I am not sure this really answers your question as this is in the format template, but I generally view them as a matched pair that work together. I try to stick with data extraction in the data define, and do all my conditional stuff in the format templates.
    Scott

  • How To Handle Error Message In TCD Recording?

    Hi All,
      I tried recording a transaction (my own transaction) by not enterring value in an obligatory field. the error message came. but when i executed the script, it showed an error. but actualy, the error message was expected right? how to handle this situation? i tried with tcd and sapgui recording. both gave almot the same result.
      i am including the script which i have written.
    MESSAGE ( MSG_1 ).
    *TCD ( ZCUST , ZCUST_1 , ECC ).
    SAPGUI ( SAP_1 , ECC ).
    ENDMESSAGE ( E_MSG_1 ).
    v_mno = &tfill.
    v_msg = E_MSG_1[v_mno]-msgtext.
    v_mtp = E_MSG_1[v_mno]-msgtyp.
    If Msg Type is E *** **** It Has To Be E ****
    IF ( v_mtp = 'E' and v_msg = 'Account no AC02 does not exist EXIT = X').
    logtext(0,'Passed').
    ELSE.
    log(v_mtp).
    log(v_msg).
    logtext(1,'Failed').
    ENDIF.
    End Of The Condition For Message Type E ******

    I have recording messages using the TCD command.
    My script (very simple):
    MESSAGE ( MSG_2 ).
    TCD ( ME21 , ME21_1 , R3 ).
    ENDMESSAGE ( E_MSG_2 ).
    In the MESSAGE command interface, I defined rules to allow several kind of messages.
    Execution: 3 mesages found:
          * transform PR into PO
           MESSAGE     MSG_2 [1,009 sec]
             RULES  MSG_2 = XML-DATA-01
            Message  MODE  EXIT  TYPE  ID    NR
            [1]      'A'         'I'   06    456
            [2]      'A'         'W'   'ME'  080
            [3]      'A'         'E'   'ZE'  029
             TCD    ME21                 [0,545 sec N] Target sys R3 -> ZDA010A219
            S06017 Standard PO created under the number 8201075606
               Tgt System Z_A219->R3->ZDA010A219 (ZDA 010 ... HP-UX ORACLE)
               CALL TRANSACTION ME21 ME21_1 XML-DATA-01
               03 MESSAGES FROM ME21 ME21_1 XML-DATA-01
               I  06 456 Release effected with release code 00001
               W  ME  080 Delivery date: next workday is 02.05.2007
               S  06 017 Standard PO created under the number 8201075606
           ENDMESSAGE  E_MSG_2 (&TFILL = 0)
    As you can see, 3 messages are found but the &TFILL variable is still 0.
    I guess (but cannot test yet) I would manage to record those messages using SAPGUI command.
    Is there anything wrong with my script?
    My SAP_BASIS component is in version 620. I'm not using the ultimate version of eCATT (no WEBDYNPRO command, etc.). Could it be an explanation?
    Thank you in advance,
    Olivier

  • How to handle error message during PAI?

    Hi Experts,
    Need help here.
    In my dialog screen, I have a field which is typed 'QUAN'.
    In entering different format , e.g. with non numeric value or a negative value, an error message appear and it does not process the MODULES inside the chain or FIELD MODULE ON REQUEST.
    Does anyone knows how to handle this kind of error. I need to display into a separate screen the errors I encountered coz I'm creating a new RF transaction.
    Points will be rewarded.
    Thanks in advance.

    Hai
    in your case(RF case) it is other way...
    yes you can use
    field x_currency module check_currency.
    in module check_currency.
    you have to display errors in another screen say 200.
    in that there will be 4 fields, all are display only fields.
    X_MESSAGE-MSGV1  of type sy-msgv1
    X_MESSAGE-MSGV2  of type sy-msgv2
    X_MESSAGE-MSGV3 of type sy-msgv3
    X_MESSAGE-MSGV4 of type sy-msgv4
    you populate the messages with these fields and then display it in the screen.
      method check_currency.
    *--do all your checks here....
           if error
             clear x_message.
            x_message-msgv1 = 'Enter Valid Employee Number'(004).
            leave to screen 0200.
          endif.
        endif.
    ENDMODULE.                 " VALIDATE_Currency
    in screen 200 PBO you need to format the message
    using the below logic.
           Method for formatting the message
      method message_format.
        data : lt_text type table of tline,         "text table
               lx_text type tline.                  "work area
        refresh lt_text.
        clear lx_text.
        concatenate x_message-msgv1 x_message-msgv2 into lx_text-tdline
          separated by space.
        append lx_text to lt_text.
        clear lx_text.
        concatenate x_message-msgv3 x_message-msgv4 into lx_text-tdline
          separated by space.
        append lx_text to lt_text.
    *- formatting the message
        call function 'FORMAT_TEXTLINES'
          exporting
            formatwidth = 20
          tables
            lines       = lt_text
          exceptions
            bound_error = 1
            others      = 2.
        clear: x_message.
    *- transfer the message data to screen fields
        loop at lt_text into lx_text.
          if sy-tabix = 1.
            x_message-msgv1 = lx_text-tdline.
          elseif sy-tabix = 2.
            x_message-msgv2 = lx_text-tdline.
          elseif sy-tabix = 3.
            x_message-msgv3 = lx_text-tdline.
          elseif sy-tabix = 4.
            x_message-msgv4 = lx_text-tdline.
          else.
            exit.
          endif.
        endloop.
      endmethod.                    "message_format
    Regards
    Vijay

  • In BAPI PO CREATION How to handled errors datas

    Hi friends ,
    In BAPI PO CREATION upload the datas How to handle/capture errors datas.?
    arun

    Hi,
    After completion of the program IT_RETURN table will have all the messages in it.
    Loop the IT_RETURN internal table and display the data.
    Regards
    Sudheer

  • How to handle error messages in BDC background mode

    Hi experts,
      I got one problem in BDC, We are uploading data throgh BDC program,that program is calling Standard Batch Input programs,
    Now we got one requirement, i.e., In some special cases we have to send one message as a error message.I handled this in foreground but, how to handle this in background.

    Hi,
    if session is being used
    automatically the log will begenereated in the sm35 transaction
    but if call transaction is used
    put all the error messages in the applicationserver using
    open data set
    and after the exectionof the program in the background
    you have to run another progam which reads the data stroed inthe application server
    that also with open data set only...
    thanks & regards,
    Venkatesh

  • How to handle error while using dbms_sql.execute

    Hi,
    I am inserting some records by using the following piece of code.
    stmt := 'insert into SSI_KPI_GOAL_VALUE_H (KPI_VAL_KPI_ID, KPI_VAL_RM_CDE,'|| v_day_value ||',KPI_VAL_ACT_DLY,'||v_month_val||',KPI_VAL_BIZ_UNIT_CDE) values (:kpi_array,:rm_array,:day1_array,:day1_array,:day1_array,:busnunit_array)';
    l := dbms_sql.open_cursor;
         dbms_sql.parse(l, stmt, dbms_sql.native);
         dbms_sql.bind_array(l, ':kpi_array', col1_ins,1,ins_cnt-1);
         dbms_sql.bind_array(l, ':rm_array', col2_ins,1,ins_cnt-1);
         dbms_sql.bind_array(l, ':day1_array', col3_ins,1,ins_cnt-1);
         dbms_sql.bind_array(l, ':busnunit_array', col4_ins,1,ins_cnt-1);     
         dummy := dbms_sql.execute(l);
         dbms_sql.close_cursor(l);
    I am getting an error since any one of the row contains value larger than the column.
    How to handle exception handling for those rows which is having errors. I would like insert the records which is having
    no errors. Like SAVE EXCEPTIONS for 'forall' is there any option is available to handle exceptional records.
    Please help.
    Thanks & Regards,
    Hari.

    Hari,
    What's oracle version? Are you looking for something similar to this? see following example
    DECLARE
       TYPE array
       IS
          TABLE OF my_objects%ROWTYPE
             INDEX BY BINARY_INTEGER;
       data          array;
       errors        NUMBER;
       dml_errors exception;
       error_count   NUMBER := 0;
       PRAGMA EXCEPTION_INIT (dml_errors, -24381);
       CURSOR mycur
       IS
          SELECT *
          FROM t;
    BEGIN
       OPEN mycur;
       LOOP
          FETCH mycur BULK COLLECT INTO data LIMIT 100;
          BEGIN
             FORALL i IN 1 .. data.COUNT
             SAVE EXCEPTIONS
                INSERT INTO my_new_objects
                VALUES data (i);
          EXCEPTION
             WHEN dml_errors
             THEN
                errors        := sql%BULK_EXCEPTIONS.COUNT;
                error_count   := error_count + errors;
                FOR i IN 1 .. errors
                LOOP
                   DBMS_OUTPUT.put_line(   'Error occurred during iteration '
                                        || sql%BULK_EXCEPTIONS(i).ERROR_INDEX
                                        || ' Oracle error is '
                                        || sql%BULK_EXCEPTIONS(i).ERROR_CODE);
                END LOOP;
          END;
          EXIT WHEN c%NOTFOUND;
       END LOOP;
       CLOSE mycur;
       DBMS_OUTPUT.put_line (error_count || ' total errors');
    END;Regards
    OrionNet

  • How to handle a fixed length file without newline?

    Hi Experts,
    I'd like to handle a fixed length file without newline by sender file adapter.
    A file like following.
    It contains three recores."AAXBBBXCCCCX" is one record.
    AA1BBB1CCCC1AA2BBB2CCCC2AA3BBB3CCCC3
    I tried that following two parameters set. But only first recored was read.
    fieldFixedLengths
    fieldFixedLengthType
    Please tell me how to handle.
    Thanks
    Shinya Kawagoe.

    For this case we wrote a simple Adapter Module inserting an end of line character after an offset.
    This way it can be reused in many interfaces.
    And reading the whole file may not be an option in case of large source files. May cause performance / memory issues.
    eolbean.offset = <recordLlen>
    XMLPayload xmlpayload = msg.getDocument();
    byte[] content = xmlpayload.getContent();
    byte crlf = 0x0A;
    int current = 0;
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    int lines = content.length / recordLen;
    do
         lines--;
         baos.write(content, current, recordLen);
         if (lines > 0) // if other lines, eol required
              baos.write(crlf);
              current += recordLen;
    } while (lines > 0);
    xmlpayload.setContent(baos.toByteArray());
    baos.close();
    Audit.addAuditLogEntry(key, AuditLogStatus.SUCCESS,     MODULE + " Done EOLing.");

  • How to handle blank line in File adapter

    Hi,
    I am using a file adapter with CSV as input file. If I have a blank line in CSV file, BPEL is failing read it, no instance is created and file is archieved.
    Please let me know how to handle this issue.
    Thanks

    Hi Yatan,
    I am already using rejectedMessageHandlers, I am on 10.1.3.3.
    Here's my bpel.xml
    ============
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <BPELSuitcase>
    <BPELProcess id="EmpAddressUpdABCSImpl" src="EmpAddressUpdABCSImpl.bpel">
    <partnerLinkBindings>
    <partnerLinkBinding name="ReadFile">
    <property name="wsdlLocation">ReadFile.wsdl</property>
    <property name="rejectedMessageHandlers">file://E:/HRARCHIVE/BadData</property>
    </partnerLinkBinding>
    <partnerLinkBinding name="InsertAddressUpd">
    <property name="wsdlLocation">InsertAddressUpd.wsdl</property>
    <property name="retryInterval">60</property>
    </partnerLinkBinding>
    </partnerLinkBindings>
    <configurations>
    <property name="sensorLocation">sensor.xml</property>
    <property name="sensorActionLocation">sensorAction.xml</property>
    </configurations>
    <activationAgents>
    <activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent" partnerLink="ReadFile">
    <property name="portType">Read_ptt</property>
    <property name="rejectedMessageHandlers">file://E:/HRARCHIVE/BadData</property>
    </activationAgent>
    </activationAgents>
    </BPELProcess>
    </BPELSuitcase>
    Someone told me that this can be achieved by changing the native schema, I tried many options but no result. Please suggest me.
    -- Shirish

  • How to handle the layout of file in OWB?

    Hi all,
    I am facing one problem..that is
    If my file is coming monthly
    i need to load into datamart.
    But the problem is the layout is not same.
    At the end of the file one field may add or one field may delete..
    The procedure I am following to load data into datamart is "First I am creating External table and then from Eaternal table to Table."
    How can I handle this type of file in OWB
    Pls give me some inputs
    Thanks in advance
    Srinivas

    hi,
    Define the extenal table in the followin way,
    CREATE TABLE sample_extbl
    2 ( col1 NUMBER
    3 , col2 NUMBER
    4 , col3 NUMBER
    5 )
    6 ORGANIZATION EXTERNAL
    7 (
    8 TYPE ORACLE_LOADER
    9 DEFAULT DIRECTORY LOG_DIR
    10 ACCESS PARAMETERS
    11 (
    12 RECORDS DELIMITED BY NEWLINE
    13 nobadfile
    14 nologfile
    15 FIELDS TERMINATED BY ',' LDRTRIM
    16 MISSING FIELD VALUES ARE NULL
    17 )
    18 LOCATION (LOG_DIR:'a.csv')
    19 )
    20 REJECT LIMIT UNLIMITED;
    case 1:
    Now, for example if the file a.csv contains the data as follows.
    col1,col2,col3,col4,col5
    abc,28,xyz,mno,1000
    abc2,38,xyz,mno,2000
    abc3,28,xyz,mno,3000
    Then, if we query the external table "sample_extbl"
    select * from sample_extbl
    Then you get the data as follows
    col1 col2 col3
    abc 28 xyz
    abc2 38 xyz
    abc3 28 xyz
    Case 2:
    Now, for example if the file a.csv contains the data as follows.
    col1,col2,col3,col4,col5
    abc,28,xyz,mno,1000
    abc2,38
    abc3,28,xyz,mno
    Then, if we query the external table "sample_extbl"
    select * from sample_extbl
    Then you get the data as follows
    col1 col2 col3
    abc 28 xyz
    abc2 38
    abc3 28 xyz
    Regards,
    Gowtham Sen.

Maybe you are looking for

  • HT1451 No longer able to add itunes library from external hard drive.

    Its been about a year since I used itunes because my old pc burned out. I was using an external hard drive to store my itunes libraryand my preferences were set to advanced preferences / itunes media folder location / F:\itunes data, and was working

  • Sales Order quantity Must not exceed Purchase order quantity

    Dear Experts, My requirement is when i am creating a Purchase order giving referenece as Sales Order .. system must not allow the user to enter  more than Sales order quantity. Ex : Sales Order 1234         Material : AAAA         Quantity : 100 whil

  • Customize back button in alv

    Hi, I created a custom refresh button in alv. However when user clicks on this, it opens the refreshed data in a new window. When i click on back, it takes me to the previous window having my original data. I want that it should take me to the main s

  • Crystal off a Universe

    I create 2 seperate queries from a Universe and join them in Crystal.  Yet Crystal is returning 2 seperate select statements.  Causing really bad performance.  Anyone have any idea on what to do?  Same thing happens in XI R2 and 2008

  • GT80 Titan SLI unboxing

    We love to rave on about the GT80 Titan SLI, and today, we're doing it for you in video format. Enjoy our 12-minute video guide into what you hopefully want to know about the 18.4" leviathan. Link: