Is my statement correct???

Im having a problem with regards to data object. I have a queuer program that sends data to program1. the program1 has a listener class that parse the data from queuer and assign it to a designated variables using StringTokenizer. (Theres no problem with listener class.)
Another class is saveBatch class that save and send the data back to the queuer. In some part of savebatch class, the data that supposed to be in variable A is lost. Since I'ts not my program and im trying to fix the bug but the coding is very very confusing(especially the variable names)
What i wanna do right now is to have a condition that will catch the variable A when it is null. But if the variable A != null it will just go on thru the usual stuff. I need an opinion if my logic statement is correct. since i did not use the if then else statement. Correction and critics would be much appreciated.
public boolean saveBatch(int state){
this.state = state;
boolean allow = false;
allow = allowSave(); //it validates all requirement needed b4 saving.
if (allow){
try{ 
if (transo == null)
throw new EmptyStackException();
} catch(Exception e){
e.printStackTrace();
sm = new SendEmail(); // this will send the exception to my email.
sm.preSend(...........); // i did not complete this. coz its 100%workn.
return false;
int intSave;
String msgSave = ""; // strings that hold and to be send to queuer
if (state == 0 || state == 2){
...... this is the usual stuff.
}

Additional info:
In some part of savebatch class, the data that supposed to be in variable A is lost. It happens not very frequent that why its hard to catch.

Similar Messages

  • Is this statement correct?------------QNo.101

    Is this statement correct?
    "You can use a resource plan instead of a consumer group to implement a priority within the plan."

    To enable flashback database mode, the db needs to be in archivelog mode first.
    The other part of this is when you actually use this functionality, both flashback logs and archive/redo logs are used. As always the basics are spelled out in the docu set:
    "When a database is restored to its state at some past target time using Flashback Database, each block changed since that time is restored from the copy of the block in the flashback logs most immediately prior to the desired target time. The redo log is then used to re-apply changes since the time that block was copied to the flashback logs."
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/rpfbdb001.htm

  • Is this statement correct?----QNo.125

    Is this statement correct?Why?
    "During flashback database recovery, archive logs are applied to database."
    If no aechive log, Can flashback database work?
    Thank you!
    Message was edited by:
    frank.qian

    To enable flashback database mode, the db needs to be in archivelog mode first.
    The other part of this is when you actually use this functionality, both flashback logs and archive/redo logs are used. As always the basics are spelled out in the docu set:
    "When a database is restored to its state at some past target time using Flashback Database, each block changed since that time is restored from the copy of the block in the flashback logs most immediately prior to the desired target time. The redo log is then used to re-apply changes since the time that block was copied to the flashback logs."
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/rpfbdb001.htm

  • SELECT STATEMENT (Correct answers will be given full points.)

    HI Gurus
                  I am new abap help me with the select statement for these please
      Get BKPF-AWKEY where BKPF-BELNR = VBRK-VBELN + prefix “00”.
    this is the reference number for printing in script(SD)
    i need to write in the text elements
    Get KNA1- STCEG where VBRK-KUNRG =  KNA1-KUNNR  This is the GST REG
    how to write in the text elements.
    Correct answers will be given full points.
    thanks & regards
    sirish.

    Hi sirish,
       First of all to add the prefix to vbrk-vbeln u can write the syntax like this-
      CONCATENATE '00' VBRK-VBELN INTO VBRK-VBELN.
    if  00 is suffix then write like this--
      CONCATENATE  VBRK-VBELN '00' INTO VBRK-VBELN.
    Now u can write ur first select query like this-
    SELECT awkey FROM    bkpf
                            WHERE belnr = vbrk-vbeln.
    Syntax for second select query-
    SELECT stceg FROM    kna1
                           WHERE kunnr = vbrk-kunrg.
    Reward if useful.
    Regards,
    Rajesh Akarte

  • Is this SQL DELETE statement correct ?

    Hi Guys
    Is the following code correct:
    String strUpdate = "DELETE * FROM table_name";
    Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/newdb?user=root&password=123" ) ;
    Statement stmt = conn.createStatement() ;
    stmt.executeUpdate(strUpdate) ;If I was doing a SELECT then I'd need something like this:
    String strQuery = "SELECT * FROM table_name";
    Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/newdb?user=root&password=123" ) ;
    Statement stmt = conn.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY ) ;
    ResultSet rs = stmt.executeQuery( strQuery ) ;

    shaolinf wrote:
    Hi Guys
    Is the following code correct:
    String strUpdate = "DELETE * FROM table_name";Wrong. It's
    DELETE FROM table_name;This might help you:
    http://www.w3schools.com/sql/default.asp

  • Inner join statement correction

    For three different tables we can write select statement like below?if any correction pleas correct it.
    select *
        from ekko as a
        inner join ekpo as b
          on  aebeln = bebeln
          inner join ekkn as c
           on  bebeln = cebeln
        into corresponding fields of table gt_data
        where a~zvoyn in s_zvoyn
          and a~ekgrp in s_ekgrp
          and a~ebeln in s_ebeln
          and a~zbookref2 in s_bookr
          and a~lifnr in s_lifnr
          and a~waers in s_waers
          and b~matnr in s_matnr
          and c~kostl in s_kostl..

    HI Venkee,
    Yes this query will work but to improve the performance
    use the required field names in the order as they are in the table instead of ' * '
    declare an internal table with this fields. assume gt_data
    and
    avoid using into corresponding.
    Regards,
    Md Ziauddin.

  • UWL doesn't process SAPscript conditional statements correctly

    Hi,
    We have an interesting problem with a LS course approval workflow item. The work item in question is specified to display the following text (note the SAPscript conditionals):
    IF &DELIVERYMETHOD.SCHEDULE_DEP& = 'X'
    IF &STATUS& = 'REQUESTED'
    &LEARNER.LEARNERNAME& requests participation in the course:
    "&TRAINING.COURSEABBREVIATION& - &TRAINING.TRAININGNAME&".
    <H>Course Details:</>
    <H>Schedule:</>
    &TRAINING.SCHEDULELINESFORMATTED##&
    <H>Location:</>&TRAINING.LOCATIONNAME&
    ELSEIF &STATUS& = 'CANCELLED'
    &LEARNER.LEARNERNAME& requests cancellation of participation in course:
    "&TRAINING.COURSEABBREVIATION& - &TRAINING.TRAININGNAME&".
    <H>Course Details:</>
    <H>Schedule:</>
    &TRAINING.SCHEDULELINESFORMATTED##&
    <H>Location:</>&TRAINING.LOCATIONNAME&
    ENDIF
    ELSE
    IF &STATUS& = 'REQUESTED'
    &LEARNER.LEARNERNAME& requests participation in the web-based course:
    "&TRAINING.COURSEABBREVIATION& - &TRAINING.TRAININGNAME&".
    ELSEIF &STATUS& = 'CANCELLED'
    &LEARNER.LEARNERNAME& requests cancellation of participation in the
    web-based course: "&TRAINING.COURSEABBREVIATION& -
    &TRAINING.TRAININGNAME&".
    ENDIF
    ENDIF
    Please process this request.
    This text displays correctly when the work item is viewed in SBWP (that is, the conditionals are evaluated and only the appropriate portions of the text are displayed). However, in some instances, when the work item is displayed in the Universal Work List, none of the conditional statements are evaluated and all portions of the text are displayed.
    Has anyone else come across this problem? I have searched the notes system and the SDN forums extensively and found nothing.
    Regards,
    Gareth.

    Hi  Gareth  ,
                      yes , I have also experienced issue.
    I have used HTML and I am getting desired results in SBWP .
    But UWL doesn't understands that .
                                                       I am yet to find solution for the same.
    Let me know if you able to find any alternative for the same.
    Thanks,
    sahiba

  • Is this statement correctly Deleting row-by-row

    Before i delete a parent table, i want to delete the child table. The parent table's primary key is a composite key having 3 columns.
    So i need a DELETE like the following
    DELETE FROM Child_Table1
    where
        pkCol1,pkCol2,pkCol3=(SELECT pkCol1, pkCol2,pkCol3 FROM Parent_table WHERE curr_trk_code=40);Since the above Statement is not valid I am thinking of changing it to
    DELETE FROM Child_Table1
    where
        pkCol1 in (SELECT pkCol1 FROM Parent_table WHERE curr_trk_code=40)
        and
            pkCol2 in (SELECT pkCol2 FROM Parent_table WHERE curr_trk_code=40)
            and
            pkCol3 in   ((SELECT pkCol3 FROM Parent_table WHERE curr_trk_code=40);Is this DELETE correctly deleting each row in Child_Table1 based on the Composite Primary key of the parent table?
    This post is related to
    Purging records from table with Child tables
    Edited by: M.Everett on Nov 14, 2008 1:10 AM
    Edited by: M.Everett on Nov 14, 2008 1:14 AM

    Does it not work like this...
    DELETE FROM Child_Table1
    where
        (pkCol1,pkCol2,pkCol3)=(SELECT pkCol1, pkCol2,pkCol3 FROM Parent_table WHERE curr_trk_code=40);i.e. include brackets around your first 3 comparison columns

  • Toplink generate the SQL statement correctly but it does not return any row

    Hi
    I faced an strange problem when using Toplink as JPA provider. Following snippet shows how I create and execute a query using Toplink JPA:
    q = em.createQuery("SELECT B FROM Branch B WHERE B.street LIKE :street");
    q.setParameter("street", "'%a%'");
       List<Branch> l = q.getResultList();
      System.out.println("List Size: " + l.size());The SQL statement resulted by this query is as follow (according to the generated log file)
    SELECT ID, STREET FROM BRANCH WHERE (STREET LIKE CAST (? AS VARCHAR(32672) ))
      bind => [%a%]Problem is that List size is always 0, independent of what I provide as parameter. I tried and executed the generated SQL statement in the SQL manager and I got some tens of record as the result. The SQL statement i tested in the SQL manager is like:
    SELECT ID, STREET FROM BRANCH WHERE (STREET LIKE CAST ('%a%' AS VARCHAR(32672) ))Can someone please let me know what I am missing and how I can fix this problem?
    Thanks.

    Hi,
    Thank you for reply.
    All data are stored in lower case so, the case sensitivity is not a problem. I am wondering how the generated query works fine when I execute it in the sql manager but it return no result when it is executed by the JPA.
    Thanks for looking into my problem.

  • Urgent is the statement correct

    i want to check if gv_ec is blank and wrks not equal to 5en or 5in or 5su or 5c3
    ELSEIF gv_ec = ' ' AND ( WERKS <> 5EN or
                        WERKS <> 5IN or TVBDPR-WERKS <> 5SU
                         WERKS <> 5C3 ) .
    perfoem .....
    endif
    i am changin value of plant in debugging as any of above value and it is going inside the perform statement as
    is the logic for above statement wrong if not why the next statment is executing even if i am making value of werks to 5en during runtime
    Arora

    her eis  the whole loop
    if zprint_qty = 'X'.   " it is plant billing related
    perform get_conversion_usd_cost changing....
    below is my code?
    ELSEIF ( gv_ec = '' AND ( TVBDPR-WERKS <> nc_5PEN
    or TVBDPR-WERKS <> nc_5SIN or TVBDPR-WERKS <> nc_5SUZ
    or TVBDPR-WERKS <> nc_5SC3 ) ) .
        if tvbdpr-fkimg ne 0 .
           perform .......
        endif. "tvbdpr-fkimg
       *end my changes below is else statement which shuld execute when the above is not satisfied
    ELSE.
    perform some statement
    endif     " first  ie zprint_qty = 'X'

  • Is this statement correct?

    hi guys
    String employee_name=request.getParameter("employee_name");
    String queryText = "insert into sshl_account_application (employee_name)values('" + request.getParameter('employee_name')");

    hi guys
    String
    employee_name=request.getParameter("employee_name");
    String queryText = "insert into
    sshl_account_application (employee_name)values('" +
    request.getParameter('employee_name')");Please format your code for better reading. Take a look at Formatting Help when you post something.
    String queryText = "insert into
    sshl_account_application (employee_name)values('" +
    request.getParameter('employee_name')"); That is some kinda wrong.
    try this.
    String queryText = "insert into
    sshl_account_application (employee_name)values( ' " +
    request.getParameter(\"employee_name\") + " ')";you just have messed up with the "'s...
    good luck
    ...

  • Index not used on view when table stats exist

    Hello,
    I would be grateful if someone comes with ideas on the following problem I'm currently facing.
    I have a table with XMLTYPE data type column:
    sql-->desc ACFBNK_STMT008
    RECID     NOT NULL     VARCHAR2(200)
    XMLRECORD XMLTYPE
    I have a view V_ACFBNK_STMT008 on that table, in which the view columns are defined as extracted tags values from the XMLTYPE field, e.g. for the view field N_BOOKING_DATE:
    numcast(extractValue(xmlrecord,'/row/c25')) "N_BOOKING_DATE"
    (note: numcast is just a simple function that returns TO_NUMBER of its input argument)
    I have also a function-based index on this field of the table:
    CREATE INDEX train4.NIX_ACFBNK_STMT008_C25
    ON train4.ACFBNK_STMT008("TRAIN4"."NUMCAST"(extractValue(xmlrecord,'/row/c25')))
    And so, I'm executing on the view the following SQL statement:
    SELECT RECID FROM V_ACFBNK_STMT008 WHERE (N_BOOKING_DATE > TO_NUMBER('20070725'));
    Now, the problem comes: when statistics exist on the view base table (that is ACFBNK_STMT008) then the above statement is not using the index and is making a "table access full". When I delete the statistics for the table then the SQL runs fast with an "index range scan".
    Which is further strange - when I change the ">" operand with a "=" the SQL statement correctly captures the index regardless of whether or not statistics exist.
    I've tried to manually rewrite the SQL and include the "numcast" function in it:
    SELECT RECID FROM TRAIN4.V_ACFBNK_STMT008 WHERE ( N_BOOKING_DATE>train4.numcast(TO_NUMBER( '20010725' ) ));
    And in this way the index is used OK even with statistics existing!
    But regretfully I don't have a way to change the application and the SQL, so the only things I can change is the view and/or the index.
    Thank you in advance,
    Evgeni
    P.S.
    I've tried gathering statistics in both the following ways but still the problem persists:
    sql-->analyze table train4.ACFBNK_STMT008 compute statistics;
    sql-->exec dbms_stats.gather_table_stats(ownname=>'TRAIN4', tabname=>'ACFBNK_STMT008', CASCADE=>TRUE, partname=>NULL);

    Oh, and I forgot to mention: I cannot change the view definition as well (for example, to remove the "numcast"), since every now and then the application would recreate it automatically with the same code. :(

  • Need help to write a query for Update statement with  join

    Hi there,
    The following update statement gives me error as the given table in set statement is invalid. But its the right table .
    Is the statement correct? Please help .
    update (
           select distinct(vpproadside.VEHICLE_CRED_OVERRIDE.vin)            
             from vpproadside.VEHICLE_CRED_OVERRIDE
             join vpproadside.vpp_vehicle
               on vpproadside.vpp_vehicle.vin = vpproadside.VEHICLE_CRED_OVERRIDE.vin
            where VPP_CARRIER_SEQ_NUMBER = 90
              and EXPIRY_DATE = '17-MAR-10'
       set vpproadside.VEHICLE_CRED_OVERRIDE.EXPIRY_DATE = '15-SEP-10';Edited by: Indhu Ram on Mar 12, 2010 1:00 PM
    Edited by: Indhu Ram on Mar 12, 2010 1:22 PM
    Edited by: Indhu Ram on Mar 12, 2010 2:35 PM
    Edited by: Indhu Ram on Mar 15, 2010 8:04 AM
    Edited by: Indhu Ram on Mar 15, 2010 8:06 AM
    Edited by: Indhu Ram on Mar 15, 2010 8:28 AM

    Ask Tom has very good discussion about this, if UPDATE does not work for PK issue, you can use MERGE
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:760068400346785797

  • EDQ - Writing CASE or DECODE statement

    Test
    Edited by: user4362313 on May 3, 2013 5:00 AM

    Hi Bala,
    If I've interpreted the statement correctly then you're wanting to pad the digits to the left of a decimal point to four characters, so 12.345 becomes 0012.345.
    The easiest way to achieve this is by using an Expression processor [see the online help for full syntax details]. Assuming the input attribute is called "col1" then the following expression should acheive the desired result:
    substr("000" || col1, indexof(col1, ".") - 1)
    regards,
    Nick

  • Problem in HIDE statement

    Hi Guys,
    I have a query in <b>HIDE</b>, This is up gradation project 4.5B to ECC 6.0, but in the 4.5B it is working fine,When it come to the ECC 6.0 it is giving error like " you can not use <b>HIDE</b> for a read  only field.
    This is my statement:  "HIDE ICON_DISPLAY_MORE", please suggest me, is this statement correct?
    Thanks,
    Gourisankar.

    Try executing this program....
    you can understand...
    data: sym type ICON_D value '@1E@'.
    START-OF-SELECTION.
        FORMAT HOTSPOT.
        WRITE / 'ShowIcon'.
        HIDE: sym.
    AT LINE-SELECTION.
      WRITE: sym.
    And if i am not wrong, i hope you want to hide the "Display more" icon in the Select-options input. If that case, then use NO-EXTENSION keyword.
    Could you please tell me the exact requirement, why you want to hide that icon?

Maybe you are looking for