How to Handle Error Check in a BADI

Hi all,
I have implemented a BADI "IWO1_ORDER_BADI" with method CHANGE_COSTRELEVNCY.
I have put a check , which raises a error on some condition.
But my problem is that after getting the error the transaction stop in non-editable mode and doesn't allow the user to modify the error and also this method was in PAI.
Pls let me know how to handle this error.
Thanks in advance

Hello Vivek
Since you do not really tell us on which condition you need to send an error message it is difficult to address your question.
However, since method CHANGE_COSTRELEVNCY contains the IMPORTING parameter IS_CAUFVD I could imagine that you might successful by implementing ORDER_SCHEDULE as well.
Perhpas the following scenario might work:
Check condition in method CHANGE_COSTRELEVNCY and set (e.g.) instance attribute MD_FAILED = 'X' (which you have to define in your implementing class)
Check error attribute in method ORDER_SCHEDULE
IF ( me->md_failed = 'X' ).
  do_not_schedule = 'X'.
ENDIF.
This logic assumes that your failure condition is due to values in CAUFVD and that the error message should suppress scheduling of the order (both of which might be wrong because we do not know what you want exactly...).
Regards
  Uwe

Similar Messages

  • 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

  • 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

  • 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

  • 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 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 error for a Db Table to Db table transform in ODI

    Hi,
    I have created two table in two different schema source and target, where there is a field for e.g.- place where the datatype is varchar2 and data inserted is string.
    In designer model of ODI i have put the type of place as number in both source and target and accordingly done the mapping.
    When it is executed it should give an error, but it got completed but no data is inserted neither in target table nor in error table in the target schema(E$_TARGET_TEST which is created automatically).
    Why the error is not given and how to handle such type of error..
    Please help.
    The codes for source and target tables are as follows:
    source table code:
    CREATE TABLE "DEF"."SOURCE_TEST"
        "EMP_ID"   NUMBER(9,0),
        "EMP_NAME" VARCHAR2(20 BYTE),
        "SAL"      NUMBER(9,0),
        "PLACE"    VARCHAR2(10 BYTE),
        PRIMARY KEY ("EMP_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ENABLE
    inserted data:
    INSERT INTO "DEF"."SOURCE_TEST" (EMP_ID, EMP_NAME, SAL, PLACE) VALUES ('1', 'ani', '12000', 'kol')
    INSERT INTO "DEF"."SOURCE_TEST" (EMP_ID, EMP_NAME, SAL, PLACE) VALUES ('2', 'priya', '15000', 'jad')
    target table code:
    CREATE TABLE "ABC"."TARGET_TEST"
        "EMP_ID"     NUMBER(9,0),
        "EMP_NAME"   VARCHAR2(20 BYTE),
        "YEARLY_SAL" NUMBER(9,0),
        "BONUS"      NUMBER(9,0),
        "PLACE"      VARCHAR2(10 BYTE),
        PRIMARY KEY ("EMP_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ENABLE

    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 error msgs in one system which are available only in another?

    Hi Experts,
        I have two SAP systems A and B. An ABAP program in system A calls Function module in System B.
        System B returns any error with message id, class and variables in the event of any invalid data.
        How to handle this returned error message in system A when the message class exists only in system B.
        One way is to create a copy of this message class along with all the messages in system A.
        But the function module in system B calls many BAPIs which in turn may return messages from many different message classes. So making a copy of so many message classes in System A means creating so many custom objects.
       Is there any better way to handle this without creating the message classes in System A?
    Thanks & Regards
    Gopal
    Edited by: gopalkrishna baliga on Apr 27, 2010 6:28 AM

    Hi Gopal,
        As per my understanding your function module can retrun any number of error messages and it may have varied descriptions.It would be difficult to handle each of these error individually.
    One of the methods can be..use the raise exception otion whenever any error is encountered if you want to do in the shortedt way.
    you can catch all th set of error in soem exceptions and then use the same.
    Handling each error individually in the source system would be difficult if these errors do not exisit in the source system at all.

  • How to handle Error 56 in Idoc

    Hi all,
         How to handle the Error no 56 in Idoc ?? Can anybody explain bit detailed ..
    Thanx and Regards
    Sreedhar Rusuma

    Hello sreedhar;
       The best way I have found to deal with those errors is by using the test tool (transaction WE19).  You can modify the control record in that transaction to match the control record in that transaction, and you will know you have it right when the green traffic light comes on when you select it for inbound processing.  That is, of course, dependent on the partner profile being set up correctly in WE20.
    Cheers,
    John

  • How to put error checking on a code

    hi im creating a daily dairy prototype i have almost finished the code it works but there no error checking and i dont know how to write a code to help me validate my prototype here is the code:
    import java.applet.Applet;
    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import java.awt.Label;
    import java.awt.Panel;
    import java.awt.TextField;
    import java.awt.Component;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.text.ParseException;
    import java.awt.List;
    import javax.swing.JButton;
    import javax.swing.JComboBox;
    import javax.swing.JTextField;
         public class DailyDairy extends Applet implements ActionListener {
              DailyDairy panel1, panel2, panel3, panel4;
              Component[][] rowData;
              private JComboBox[] jcboxShapeCombo = new JComboBox[7];     
              private String [] shapeName={"Meeting", "Lunch", "Holiday", "Sickness", "Preparing report", "Administrative work", "Emails", "Query"};
              public void init(){
                   setLayout(new BorderLayout());
                   setBounds (20, 30, 300, 180);
                   Panel headerPanel = new Panel();
                   headerPanel.setLayout(new GridLayout(1,4));
                   //JButton button1 = new JButton("SUBMIT");
                   //add(button1);
                   Label lblHeader = new Label("Start Time");
                   headerPanel.add(lblHeader);
                   lblHeader = new Label();
                   headerPanel.add(lblHeader);
                   add(headerPanel, BorderLayout.NORTH);
                   Label lblHeader1 = new Label("End Time");
                   headerPanel.add(lblHeader1);
                   lblHeader1 = new Label();
                   headerPanel.add(lblHeader1);
                   add(headerPanel, BorderLayout.NORTH);
                   Label lblHeader2 = new Label("Category of Task");
                   headerPanel.add(lblHeader2);
                   lblHeader2 = new Label();
                   headerPanel.add(lblHeader2);
                   add(headerPanel, BorderLayout.WEST);
                   Label lblHeader3 = new Label("Comment");
                   headerPanel.add(lblHeader3);
                   lblHeader3 = new Label();
                   headerPanel.add(lblHeader3);
                   add(headerPanel, BorderLayout.NORTH);
                   Label lblHeader4 = new Label("Total Time(Minutes)");
                   headerPanel.add(lblHeader4);
                   lblHeader4 = new Label();
                   headerPanel.add(lblHeader4);
                   add(headerPanel, BorderLayout.NORTH);
                   Panel data = new Panel();
                   data.setLayout(new GridLayout(7, 4));
                   rowData = new Component[ 7 ][];
                   // One row
                   for(int row = 0; row < 7; row++) {
                        rowData[ row ] = new Component[ 5 ];
                             rowData[ row ][ 0 ] = new TextField(10);
                             rowData[ row ][ 1 ] = new TextField(10);
                             ((TextField)rowData[ row ][ 1 ]).addActionListener(this);
                             rowData[ row ][ 2 ]= new JComboBox (shapeName);
                             ((JComboBox)rowData[ row ][ 2 ]).addActionListener(this);
                             //((TextField)rowData[ row ][ 2 ]).addActionListener(this);
                             rowData[ row ][ 3 ] = new TextField(10) ;
                             ((TextField)rowData[ row ][ 3 ]).addActionListener(this);
                             //JComboBox jcboxShapeCombo;
                             //System.out.println(rowData[row][2]);                    
                             //jcboxShapeCombo[2] = new JComboBox (shapeName);
                             //rowData[ row ][ 3 ] = new TextField(10);
                             rowData[ row ][ 4 ] = new TextField(10);
                             ((TextField)rowData[ row ][ 4 ]).addActionListener(this);
                             java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("h:mm");
                             ((TextField) rowData[ row ][ 0 ]).setText(sdf.format(new java.util.Date()));
                             data.add(rowData[ row ][ 0 ]);
                             data.add(rowData[ row ][ 1 ]);
                             data.add(rowData[ row ][ 2 ]);
                             data.add(rowData[ row ][ 3 ]);
                             data.add(rowData[ row ][ 4 ]);
                   add(data, BorderLayout.CENTER);
              public void actionPerformed(ActionEvent event) {
                   java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("h:mm");
                   java.util.Date start = new java.util.Date();
                   try {
                        start = sdf.parse(((TextField)rowData[ 0 ][ 0 ]).getText());
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   java.util.Date end = new java.util.Date();
                   try {
                        end = sdf.parse(((TextField)rowData[ 0 ][ 1 ]).getText());
                        //System.out.println("end" +end.getTime());
                        //System.out.println("start" +start.getTime());
                        if (end.getTime() > 0) {
                             long difference = (end.getTime() - start.getTime()) / 60000L;
                             ((TextField)rowData[ 0 ][ 4 ]).setText(Long.toString(difference));
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   //long difference = (end.getTime() - start.getTime()) / 60000;
                   //java.util.Date difference = new java.util.Date();
                   java.util.Date start1 = new java.util.Date();
                   try {
                        start1 = sdf.parse(((TextField)rowData[ 1 ][ 0 ]).getText());
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   java.util.Date end1 = new java.util.Date();
                   try {
                        end1 = sdf.parse(((TextField)rowData[ 1 ][ 1 ]).getText());
                        if (end1.getTime() > 0) {
                             long difference1 = (end1.getTime() - start1.getTime()) / 60000;
                             //java.util.Date difference = new java.util.Date();
                             ((TextField)rowData[ 1 ][ 4 ]).setText(Long.toString(difference1));
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   java.util.Date start2 = new java.util.Date();
                   try {
                        start2 = sdf.parse(((TextField)rowData[ 2 ][ 0 ]).getText());
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   java.util.Date end2 = new java.util.Date();
                   try {
                        end2 = sdf.parse(((TextField)rowData[ 2 ][ 1 ]).getText());
                        if (end2.getTime() > 0) {
                             long difference2 = (end2.getTime() - start2.getTime()) / 60000;
                             //java.util.Date difference = new java.util.Date();
                             ((TextField)rowData[ 2 ][ 4 ]).setText(Long.toString(difference2));
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   //long difference2 = (end2.getTime() - start2.getTime()) / 60000;
                   //java.util.Date difference = new java.util.Date();
                   //((TextField)rowData[ 2 ][ 4 ]).setText(Long.toString(difference2));
                   java.util.Date start3 = new java.util.Date();
                   try {
                        start3 = sdf.parse(((TextField)rowData[ 3 ][ 0 ]).getText());
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   java.util.Date end3 = new java.util.Date();
                   try {
                        end3 = sdf.parse(((TextField)rowData[ 3 ][ 1 ]).getText());
                        if (end3.getTime() > 0) {
                             long difference3 = (end3.getTime() - start3.getTime()) / 60000;
                             ((TextField)rowData[ 3 ][ 4 ]).setText(Long.toString(difference3));
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   //long difference3 = (end3.getTime() - start3.getTime()) / 60000;
                   //java.util.Date difference = new java.util.Date();
                   java.util.Date start4 = new java.util.Date();
                   try {
                        start4 = sdf.parse(((TextField)rowData[ 4 ][ 0 ]).getText());
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   java.util.Date end4 = new java.util.Date();
                   try {
                        end4 = sdf.parse(((TextField)rowData[ 4 ][ 1 ]).getText());
                        if (end4.getTime() > 0) {
                             long difference4 = (end4.getTime() - start4.getTime()) / 60000;
                             ((TextField)rowData[ 4 ][ 4 ]).setText(Long.toString(difference4));
                   } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   //long difference4 = (end4.getTime() - start4.getTime()) / 60000;
                   //java.util.Date difference = new java.util.Date();
                   //JTextField aField= (JTextField)event.getSource();
                   //if (aField)== rowData[ 0 ][ 1 ])calc row(0, 4);
                   //if (aField)== rowData[ 1 ][ 1 ])calc row(1, 4);
    }

    edit your post to have [ c o d e ] tags around your code,
    then maybe someone will have a look.
    And try to better explain your goals and your problem. Let us know what you have tried, what did you expect and what have you got.
    What is a "prototype" and on what specs should it be validaded?

  • How to handle the check box in the alv tree display

    Hello,
    in my ALV Tree Report i have a check box in the output.
    I have one check box in the selection screen as select all .
    if this is selected then all the check boxes in the output must be selected that is (X).
    am using CL_GUI_ALV_TREE  for this.
    Please give me some input how to make that check boxes 'X' in the above mentioned case.
    With Regards,
    Sumodh.P

    Sumodh,
    check this
    Re: Select all checkbox in ALV tree
    please search before posting
    Thanks
    Bala Duvvuri

  • How to handle error or exceptions in jsf

    Hi
    i have a code using DTO and DAO.I want to handle errors in jsf automatically(ie without return parameter in java code .).Hoe i can handlethose errors in faces.config.

    Declaratevly You can't do this.
    I use two event handler for state remembering:
    public static EventResult goToPage(BajaContext context,
    Page page,
    PageEvent pageEvent) {
    Page newPage = new Page(page.getProperty("nextPageName"));
    page.setProperty(NEXT_PAGE_NAME, null);
    newPage.setPropertyAsPage("returnPage", page, context.getPageEncoder());
    return new EventResult(newPage);
    public EventResult returnToPage(BajaContext context,
    Page page,
    PageEvent pageEvent) {
    Page oldPage = page.getPropertyAsPage("returnPage", context.getPageDecoder());
    return new EventResult(oldPage);
    StartPage.uix
    <handlers>
    <event name="nextPage">
    <bc4j:chaining>
    <bc4j:setPageProperty name="nextPageName" value="NextPage"/>
    <method class="..." method="goToPage"/>
    </bc4j:chaining>
    </event>
    </handlers>
    NextPage.uix
    <handlers>
    <event name="nextPage">
    <bc4j:chaining>
    <method class="..." method="returnToPage"/>
    </bc4j:chaining>
    </event>
    </handlers>
    method setPropertyAsPage save all page properties and state informations for page.
    On every page I use ctrl:page or ctrl:pageState DataObjectLists.
    On pages with search criteria I use ctrl:httpSession DataObjectList to save all criteria in one session. You must write event handler when you make search or trigger FIND event. In this event handler you must put every search form parameter in session.
    That's all from me! I hope this help You to resolve problems!

Maybe you are looking for