Statements

explain
on change of
endon.
at new
endat.

<b>ON CHANGE OF </b>
Syntax
ON CHANGE OF dobj [OR dobj1 [OR dobj2] ... ].
  statement_block
ENDON.
Effect:
The statements ON CHANGE OF and ENDON, which are forbidden in classes, define a control structure that can contain a statement block statement_block. After ON CHANGE OF, any number of data objects dobj1, dobj2... of any data type can be added, linked by OR.
Example:
In a SELECT loop, a statement block should only be executed if the content of the column CARRID has changed.
DATA spfli_wa TYPE spfli.
SELECT *
       FROM spfli
       INTO spfli_wa
       ORDER BY carrid.
  ON CHANGE OF spfli_wa-carrid.
  ENDON.
ENDSELECT.
The following section of a program shows how the ON control structure can be replaced by an IF control structure with an explicit auxiliary variable carrid_buffer.
DATA carrid_buffer TYPE spfli-carrid.
CLEAR carrid_buffer.
SELECT *
       FROM spfli
       INTO spfli_wa
       ORDER BY carrid.
  IF spfli_wa-carrid <> carrid_buffer.
    carrid_buffer = spfli_wa-carrid.
  ENDIF.
ENDSELECT.
<b>ENDON </b>
Syntax
ENDON.
Effect
The ENDON statement closes a conditional statement block introducud by ON CHANGE OF.
<b>AT - itab </b>
Syntax
LOOP AT itab result ...
  [AT FIRST.
   ENDAT.]
    [AT NEW comp1.
     ENDAT.
       [AT NEW comp2.
       ENDAT.
       AT END OF comp2.
       ENDAT.]
     AT END OF comp1.
     ENDAT.]
  [AT LAST.
  ENDAT.]
ENDLOOP.
Extras:
1. ...  FIRST
2. ... |{END OF} comp
3. ...  LAST
Effect
The statement block of a LOOP loop can contain control structures for control level processing. The respective control statement is AT. The statements AT and ENDAT define statement blocks that are executed at control breaks. Within these statement blocks, the statement SUM can be specified to total numeric components of a group level. In the case of output behavior result, the same applies as for LOOP AT.
So that group level processing can be executed correctly, the following rules should be noted:
After LOOP there should be no limiting condition cond specified.
The internal table must not be modified within the LOOP loop.
The work area wa specified in the LOOP statement after the INTO addition must be compatible with the line type of the table.
The content of a work area wa specified in the LOOP statement after the INTO addition must not be modified.
The prerequisite for control level processing is that the internal table is sorted in exactly the same sequence as the component of its line type - that is, first in accordance with the first component, then in accordance with the second component, and so on. The line structure and the corresponding sorting sequence gives a group structure of the content of the internal table, whose levels can be evaluated using AT statements. The AT-ENDAT control structures must be aligned one after the other, in accordance with the group structure.
The statement blocks within the AT-ENDAT control structures are listed if an appropriate control break is made in the current table line. Statements in the LOOP-ENDLOOP control structure that are not executed within an AT-ENDAT control structure are executed each time the loop is run through.
If the INTO addition is used in the LOOP statement to assign the content of the current line to a work area wa, its content is changed upon entry into the AT-ENDAT control structure as follows:
The components of the current group key will remain unchanged.
All components with a character-type, flat data type to the right of the current group key are set to character "*" at that position.
All the other components to the right of the current group key are set to their initial value.
When the AT-ENDAT control structure is exited, the content of the current table line is assigned to the entire work area wa.
Regards,
Pavan

Similar Messages

  • And/or if statement in rtf templates.

    Hi all,
    I'm using XML Publisher 4.5.
    I have created a word template file (rtf) for my reports. I need to be able to show some content in the template file by using and and/or if statement.
    fx. <?if:doc_type='STANDARD'?> OR <?if:doc_type='DEFAULT'?>
    How can I do this?
    In advance thank you.
    Best regards
    Kenneth

    Hi D,
    Thank you for your answer.
    I have seriously thought about that solution; but I don't think it's a smart way to do it.
    If i do it like that, i need to copy the whole table and paste it inside the if statements.
    I have two xml elements that I need to make the decisions on. POH_PO_TYPE & CP_RELEASE_NUM.
    POH_PO_TYPE can be: STANDARD, RELEASE or BLANKET.
    CP_RELEASE_NUM can be: '' or N
    If POH_PO_TYPE is RELEASE AND CP_RELEASE_NUM is not ''
    OR POH_PO_TYPE is STANDARD
    OR POH_PO_TYPE is BLANKET AND CP_RELEASE_NUM is ''
    THEN show table (which contains the whole PO).
    It shall show the content of the PO in any of these cases.
    BR Kenneth

  • Filename in import statement

    Hi srinivas bobbala,
    Thank you for your response.But I think my quesition was not clear.My ques... is for suppose there is one datafile for importing like.. "datafile_21" Here my intention is it takes file from datafile_21 only but it appears in import statement like datafile_21<<curmon>>.
    import database sample.sample data from data_file "c:\\ABC\datafile_21_AUG.txt" using server rules_file datafile on error abort;
    In this it takes datafile from datafile_21.But it appears like datafile_21_AUG in import statement.This AUG coming from batch file.
    Essmsh c:\\ABC\loadmxl.mxl %curmon%

    No it is not possible.
    I assume the data file "datafile_21" is first renamed to datafile_21_${CurrMth} in the batchscript.
    After that this data file *datafile_21_${CurrMth}* is pointed in the import statement.
    In the logs you will see this file as datafile_21_Aug.

  • Help with if statement in cursor and for loop to get output

    I have the following cursor and and want to use if else statement to get the output. The cursor is working fine. What i need help with is how to use and if else statement to only get the folderrsn that have not been updated in the last 30 days. If you look at the talbe below my select statement is showing folderrs 291631 was updated only 4 days ago and folderrsn 322160 was also updated 4 days ago.
    I do not want these two to appear in my result set. So i need to use if else so that my result only shows all folderrsn that havenot been updated in the last 30 days.
    Here is my cursor:
    /*Cursor for Email procedure. It is working Shows userid and the string
    You need to update these folders*/
    DECLARE
    a_user varchar2(200) := null;
    v_assigneduser varchar2(20);
    v_folderrsn varchar2(200);
    v_emailaddress varchar2(60);
    v_subject varchar2(200);
    Cursor c IS
    SELECT assigneduser, vu.emailaddress, f.folderrsn, trunc(f.indate) AS "IN DATE",
    MAX (trunc(fpa.attemptdate)) AS "LAST UPDATE",
    trunc(sysdate) - MAX (trunc(fpa.attemptdate)) AS "DAYS PAST"
    --MAX (TRUNC (fpa.attemptdate)) - TRUNC (f.indate) AS "NUMBER OF DAYS"
    FROM folder f, folderprocess fp, validuser vu, folderprocessattempt fpa
    WHERE f.foldertype = 'HJ'
    AND f.statuscode NOT IN (20, 40)
    AND f.folderrsn = fp.folderrsn
    AND fp.processrsn = fpa.processrsn
    AND vu.userid = fp.assigneduser
    AND vu.statuscode = 1
    GROUP BY assigneduser, vu.emailaddress, f.folderrsn, f.indate
    ORDER BY fp.assigneduser;
    BEGIN
    FOR c1 IN c LOOP
    IF (c1.assigneduser = v_assigneduser) THEN
    dbms_output.put_line(' ' || c1.folderrsn);
    else
    dbms_output.put(c1.assigneduser ||': ' || 'Overdue Folders:You need to update these folders: Folderrsn: '||c1.folderrsn);
    END IF;
    a_user := c1.assigneduser;
    v_assigneduser := c1.assigneduser;
    v_folderrsn := c1.folderrsn;
    v_emailaddress := c1.emailaddress;
    v_subject := 'Subject: Project for';
    END LOOP;
    END;
    The reason I have included the folowing table is that I want you to see the output from the select statement. that way you can help me do the if statement in the above cursor so that the result will look like this:
    emailaddress
    Subject: 'Project for ' || V_email || 'not updated in the last 30 days'
    v_folderrsn
    v_folderrsn
    etc
    [email protected]......
    Subject: 'Project for: ' Jim...'not updated in the last 30 days'
    284087
    292709
    [email protected].....
    Subject: 'Project for: ' Kim...'not updated in the last 30 days'
    185083
    190121
    190132
    190133
    190159
    190237
    284109
    286647
    294631
    322922
    [email protected]....
    Subject: 'Project for: Joe...'not updated in the last 30 days'
    183332
    183336
    [email protected]......
    Subject: 'Project for: Sam...'not updated in the last 30 days'
    183876
    183877
    183879
    183880
    183881
    183882
    183883
    183884
    183886
    183887
    183888
    This table is to shwo you the select statement output. I want to eliminnate the two days that that are less than 30 days since the last update in the last column.
    Assigneduser....Email.........Folderrsn...........indate.............maxattemptdate...days past since last update
    JIM.........      jim@ aol.com.... 284087.............     9/28/2006.......10/5/2006...........690
    JIM.........      jim@ aol.com.... 292709.............     3/20/2007.......3/28/2007............516
    KIM.........      kim@ aol.com.... 185083.............     8/31/2004.......2/9/2006.............     928
    KIM...........kim@ aol.com.... 190121.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190132.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190133.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190159.............     2/13/2006.......2/14/2006............923
    KIM...........kim@ aol.com.... 190237.............     2/23/2006.......2/23/2006............914
    KIM...........kim@ aol.com.... 284109.............     9/28/2006.......9/28/2006............697
    KIM...........kim@ aol.com.... 286647.............     11/7/2006.......12/5/2006............629
    KIM...........kim@ aol.com.... 294631.............     4/2/2007.........3/4/2008.............174
    KIM...........kim@ aol.com.... 322922.............     7/29/2008.......7/29/2008............27
    JOE...........joe@ aol.com.... 183332.............     1/28/2004.......4/23/2004............1585
    JOE...........joe@ aol.com.... 183336.............     1/28/2004.......3/9/2004.............1630
    SAM...........sam@ aol.com....183876.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183877.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183879.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183880.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183881.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183882.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183883.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183884.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183886.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183887.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183888.............3/5/2004.........3/8/2004............     1631
    PAT...........pat@ aol.com.....291630.............2/23/2007.......7/8/2008............     48
    PAT...........pat@ aol.com.....313990.............2/27/2008.......7/28/2008............28
    NED...........ned@ aol.com.....190681.............4/4/2006........8/10/2006............746
    NED...........ned@ aol.com......95467.............6/14/2006.......11/6/2006............658
    NED...........ned@ aol.com......286688.............11/8/2006.......10/3/2007............327
    NED...........ned@ aol.com.....291631.............2/23/2007.......8/21/2008............4
    NED...........ned@ aol.com.....292111.............3/7/2007.........2/26/2008............181
    NED...........ned@ aol.com.....292410.............3/15/2007.......7/22/2008............34
    NED...........ned@ aol.com.....299410.............6/27/2007.......2/27/2008............180
    NED...........ned@ aol.com.....303790.............9/19/2007.......9/19/2007............341
    NED...........ned@ aol.com.....304268.............9/24/2007.......3/3/2008............     175
    NED...........ned@ aol.com.....308228.............12/6/2007.......12/6/2007............263
    NED...........ned@ aol.com.....316689.............3/19/2008.......3/19/2008............159
    NED...........ned@ aol.com.....316789.............3/20/2008.......3/20/2008............158
    NED...........ned@ aol.com.....317528.............3/25/2008.......3/25/2008............153
    NED...........ned@ aol.com.....321476.............6/4/2008.........6/17/2008............69
    NED...........ned@ aol.com.....322160.............7/3/2008.........8/21/2008............4
    MOE...........moe@ aol.com.....184169.............4/5/2004.......12/5/2006............629
    [email protected]/27/2004.......3/8/2004............1631
    How do I incorporate a if else statement in the above cursor so the two days less than 30 days since last update are not returned. I do not want to send email if the project have been updated within the last 30 days.
    Edited by: user4653174 on Aug 25, 2008 2:40 PM

    analytical functions: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions2a.htm#81409
    CASE
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#36899
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/04_struc.htm#5997
    Incorporating either of these into your query should assist you in returning the desired results.

  • When would I use an if, for or while statement in Small Basic and what is the difference between the three?

    I have a Y9 Computer Science Exam next week and I know that this will probably be one of the questions on it so I need to know the answer. What is the difference?

    An If statement executes once IF the statement is true:
    If 1 = 2/2 Then
    Textwindow.writeline("True")
    EndIf
    A While statement executes WHILE the statement is true:
    While 4 = 2+2
    'Will keep looping while it is true
    EndWhile
    A For statement loops a number in increment:
    For i = 1 to 10
    'Every time through, i gets bigger by one until it equals 10
    EndFor
    It is written: "'As surely as I live,' says the Lord, 'every knee will bow before me; every tongue will acknowledge God.'" Romans 14:11

  • If statement in sql

    regarding the following sql:
    SELECT a.lname, a.fname, a.user_id, c.address, c.city,
    c.zip, c.addresstypeid, d.descriptor as state
    FROM users a, address c, maintstatetype d
    WHERE a.user_id = c.user_id(+)
    AND c.statetypeid = d.statetypeid(+)
    AND c.addresstypeid in (1,2,3,4)
    I have a database of users and addresses. Each user can
    have multiple addresses and the addresses are
    designated by addresstypeid. In plain english, what I want
    to pull is "If they have an addresstypeid of 1, pull that one
    only, if not, check if they have a 2 and use that, if not, check
    for a 3, etc..".
    Any help with this?

    What you want, then, is to pull the address with the minimum addresstypeid ..
    SELECT a.lname, a.fname, a.user_id, c.address, c.city,
    c.zip, c.addresstypeid, d.descriptor as state
    FROM users a, address c, maintstatetype d
    WHERE a.user_id = c.user_id(+)
    AND c.statetypeid = d.statetypeid(+)
    AND c.addresstypeid =
    (select min(c2.addresstypeid)
    from address c2
    where c2.userid=a.userid
    I'm not sure what this will do to your outerjoin, though. You might have to get funky with a union ...
    SELECT a.lname, a.fname, a.user_id, c.address, c.city,
    c.zip, c.addresstypeid, d.descriptor as state
    FROM users a, address c, maintstatetype d
    WHERE a.user_id = c.user_id
    AND c.statetypeid = d.statetypeid
    AND c.addresstypeid =
    (select min(c2.addresstypeid)
    from address c2
    where c2.userid=a.userid
    Union all
    SELECT a.lname, a.fname, a.user_id, to_char(null), to_char(null),
    to_char(null), to_char(null), to_char(null)
    FROM users a
    WHERE not exists
    (select 1
    from address c
    where c.userid=a.userid
    )

  • 'IF' statement in a select statment?

    I have the following cursor in a package specification;
    cursor c_sales_code is
    select sales_condition||' MC '||sales_option
    from sales;This will return something like: 'T300 MC 9'
    MC means 'multiple choice' for when there are multiple options. Although, sales_option is sometimes null and in this case I just want 'T300' to be returned, not 'T300 MC'.
    How would I go about doing this?
    Thanks,
    fakelvis

    Use
    CASE and DECODE
    to add the functoinality of Conditional Statements in Your SQL Statements..
    These two CASE / DECODE will help you to get your desired output

  • IF Statement in Select

    I need to choose between value1 and value2 within a select statement.
    TableA
    Flag (char)
    Value1
    Value2
    ItemDesc
    pseudo code
    select ItemDesc, (if Flag = 'y' then Value1 else Value2) as Price from TableA;
    How can this be done?

    select   itemdesc,
             sum (case
                     when flag = 'y'
                        then (case
                                 when value1 < 10
                                    then value1 * 1.2
                                 else value1
                              end)
                     else value2
                  end
                 ) as price
        from tablea
    group by itemdesc;

  • If statement in select statement alias

    I have the following select statement. It has the alias Survivors, Deaths and "All Cases". Is it posible to use :P_LANGUAGE variable to say that -- IF :P_LANGUAGE = FRENCH THEN alias are Survivants for survivors, Décès for Deaths, Tous_les_cas for All Cases. Please advise
    SELECT ALL T_NTR_MULTIBAR.CAT, T_NTR_MULTIBAR.NUM_CASES_LEFTBAR AS Survivors,
    T_NTR_MULTIBAR.NUM_CASES_MIDDLEBAR AS Deaths, T_NTR_MULTIBAR.NUM_CASES_RIGHTBAR AS "All Cases"
    FROM T_NTR_MULTIBAR
    WHERE INSTANCE_NUM = :P_INSTANCENUM
    order by ORDERS

    You may not be able to add this condition inside the SQL Statement. But you can add this condition outside the statement, if you're using PL/SQL...
    IF :p_language = french THEN
    SELECT ALL t_ntr_multibar.cat,
      t_ntr_multibar.num_cases_leftbar AS survivors,
      t_ntr_multibar.num_cases_middlebar AS deaths,
      t_ntr_multibar.num_cases_rightbar AS "All Cases"
    ELSE
    END IF;

  • If Statement in PLD

    I'm trying to set up a formula similiar to an If then statement with the PLD, and not having any luck.   I need to create a formula on a sales order that says if  there is no frieght on the order display "0.00". 
    Thanks.
    Eric

    Hi,
    Create a field with empty value (Say field ID is 100).
    Create a formula field which equals fields 100 and 186 (Say field ID is 101).
    Create a formula field which has "not equals" as relation, within fields 100 and 186 (Say field ID is 102).
    Create a field with the text 0. Link it with the field 101. Put it in the same place as the 186.
    Link the 186 field with the 102.
    Result: 0 will be shown when 186 is empty, value of 186 when is not empty.
    Hope is clear,
    Ibai Peñ

  • If statement in Custom Calculation Script

    I have 16 fields and if even one of them ="1" I have to list it in another field.  I do not want to count or sum.  If one of those fields has a 1 in it I just want the other field to display Y and if none have a 1 I want that field to display N.
    Please help.
    Thank you in advance~mjc

    You need to write a compound logical statement to evaluate all of the values and that statement needs to evaluate to true or false.
    Do you know how to write JavaScript?
    Do you know how to enter JavaScript calculations into a form field?
    For custom calculation of the text field I could write something like:
    // define an array of the field names to check
    var aNames = new Array("Text1", "Text2", "Text3", "Text4",
    "Text5", "Text6", "Text7", "Text8",
    "Text9", "Text10", "Text11", "Text12",
    "Text13", "Text14", "Text15", "Text16");
    // define a logical variable that is true if any field has a value of 1 - default is false or no field has a value of 1
    var bMatch = false;
    // value for text field
    var TextValue = 0;
    // logical value of field being equal to 1 test
    var FieldIs1 = false;
    // loop through all the fields and test the fields value
    for(i = 0; i < aNames.length; i++) {
    // logically OR the result of field i value equal to true with bMatch
    // get the value of field
    TextValue = this.getField( aNames[i] ).value;
    // test the value of the field
    FieldIs1 = Number(TextValue) == 1
    // logically OR the 2 values
    bMatch = FieldIs1 | bMatch;
    } // end field processing
    // set the field value
    if(bMatch == true) {
    event.value = "Y";
    } else {
    event.value = "N";
    You will need to change the field names to match your fields. You can add more field name or remove field names as needed and the script will adjust for the number of field names.

  • If statement in calculated batch characteristic (dependencies)

    I have a little problem with calculating a certain batch characteristic.
    The situation is the following:
    I have batch char A, batch char B and batch char C. Batch char C is the result of the sommation of char A and B. The problem I have now is that batch char C only should be calculated when batch char A and B are different from 0.
    I have a custom build interface that imports QM data to the batch chars. Default, all my batch chars are set to 0 so if I just say $self.charC = $self.charA + $self.charB, I always get a value.
    Is it possible to some sort of IF statement to check if the value is different from 0?

    Dear,
    You need to try with variant table
    take all the combination and enter in a variant table and see the result...it works
    example
    A     B      C
    0      0      space
    0      1      sapce
    1      1      space
    I hope you got it

  • IF-statement in Personas that is checking if control is inactive?

    Hi,
    I have this simple script in screen personas that is clicking the option: "Attachment list". Everything is working great if there is attachments.
    If there are no attachments the option is "inactive" or "greyed out". This will result in a script error.
    I thought this was going to be an easy fix by adding IF statement to the the script. But howerver I specify the critera for the IF statement the script will always try to click the Attachment list. The condition will simply always be TRUE.
    Am I missing something here or is it not possible at this time to script an IF statement that is checking if the control is inactive or similar?
    Best Regards,
    Oskar Söderlund

    There is another way, but it will get a little tricky.
    Outside of the transaction IE03 you can check for the existence of attachments for a piece of equipment by looking in table SRGBTBREL. Field TYPEID_A will be "EQUI" and field INSTID_A will be the equipment number, zero-padded on the left to 18 characters long. Use SE16 to look in the table and you'll get the idea.
    You could wrap this test in an RFC-enabled ABAP function and call that from your Personas script button. Use the return value from that RFC to decide if attachments exist or not and how the script should respond. Details for how to write such an RFC and call it from a Personas script are in this blog: Calling RFCs from a Personas script.
    Like I said, this isn't straightforward and perhaps Personas scripting should include an active/inactive test in addition to the exists/doesn't exist test. Until then, however, there is a way if you don't mind a bit of ABAP programming.

  • If statement in a cursor

    Hi
    I am trying to have a if statement inside a cursor clause. But it gives me error saying that "PLS-00103: Encountered the symbol "IF" when expecting one of the following: ( select <a SQL statement>". I know this is not the right syntax so is there any way that I can specify the table that the cursor should get its information from based on a if clause.
    The typeID field tells me which table to go to to get the information from. So if typeId=1 then go to table1 if it is type=2 then go to table2 etc.....
    CREATE OR REPLACE PROCEDURE FILLDATA(
         typeID IN NUMBER
    ) IS
    data varchar2(16);
    dataresult varchar2(16);
    cursor c1 is
            IF typeID=1 then
         select value from TableName#1
            ELSE
         select value from TableName#2
            END IF;
         where id='1';
    begin
         open c1;
         dataresult:='';
          loop
          fetch c1 into dataresult;
          EXIT WHEN c1%NOTFOUND;
             data:=concat(to_char(data), to_char(dataresult));
          end loop;
         close c1;
    end
    Your help will be really appreciated. Thanks a lot.
    Message was edited by:
    user561977
    Message was edited by:
    user561977
    Message was edited by:
    user561977

    Or I guess:
    DECLARE
        cur SYS_REFCURSOR;
    BEGIN
        CASE ROUND(DBMS_RANDOM.VALUE(1,2))
            WHEN 1 THEN OPEN cur FOR SELECT id FROM t1;
            WHEN 2 THEN OPEN cur FOR SELECT id FROM t2;
        END CASE;
        CLOSE cur;
    END;Also I can't think of a practical use for this here, but you can assign one ref cursor to another:
    DECLARE
        c1 SYS_REFCURSOR;
        c2 SYS_REFCURSOR;
        c_generic SYS_REFCURSOR;
    BEGIN
        CASE ROUND(DBMS_RANDOM.VALUE(1,2))
            WHEN 1 THEN
                DBMS_OUTPUT.PUT_LINE('Picked value: 1');
                OPEN c1 FOR SELECT id FROM t1;
                c_generic := c1;
            WHEN 2 THEN
                DBMS_OUTPUT.PUT_LINE('Picked value: 2');
                OPEN c2 FOR SELECT id FROM t2;
                c_generic := c2;
        END CASE;
        CLOSE c_generic;
        IF c1%ISOPEN THEN
            DBMS_OUTPUT.PUT_LINE('c1 is open.');
            CLOSE c1;
        ELSIF c2%ISOPEN THEN
            DBMS_OUTPUT.PUT_LINE('c2 is open.');
            CLOSE c2;
        ELSE
            DBMS_OUTPUT.PUT_LINE('It appears that neither c1 nor c2 is open.');
        END IF;
    END;
    Picked value: 2
    It appears that neither c1 nor c2 is open.
    PL/SQL procedure successfully completed.Message was edited by:
    William Robertson

  • IF statement in RB2.0

    I am trying to use an IF logic statement in a report but as an expression, I have been searching the net to help me find an answer as everything I have tried is sending an error when I run   The report feeds from multiple tables and has various
    filters set of which I am extremely proud to say I figured out however I just can't figure out the right expression for this
    Fields are non-numeric
    Fields = Table3.Process & Table3.Processtwo
    equation = IF Process is Blank/Null then return Processtwo
    IF Process is Not Blank/Null the return Process/Processtwo
    Any help is greatly appreciated

    Hi,
    If I understand you correctly, you want to use IF logic statement that if Table3.Process is Blank/Null then return ProcessTwo, else return Process/ ProcessTwo. According to your description, there may be two scenerios.
    .  IF “/”represents devide operation, please refer to the following expression:
    =IIf(isNothing(Fields!Process.Value) or Fields!Process.Value="", Fields!ProcessTwo.Value,CInt(IIf(Fields!Process.Value="" or IsNothing(Fields!Process.Value),0,Fields!Process.Value))/CInt(Fields!ProcessTwo.Value))
    .  IF “/” is just a symbol of string connection , please refer to the following expression:
    =IIf(Fields!Process.Value ="" or IsNothing(Fields!Process.Value),Fields!ProcessTwo.Value,Fields!Process.Value + "/"  + Fields!ProcessTwo.Value)
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu

  • If statement in Java Script

    Hi,
    I just want to create a simple IF statement. I have looked at two text books and the on-line help but it still does not work.
    I have two fields.
    One is called "IfTest"
    The other is called "PFValue"
    If "A" is entered in field "IfTest" then I want the text message "50:50" to appear in the "PFValue" field. If "A" is not entered the I want "50:25:25" to appear.
    The formula I have entered in field "PFValue" is :
    ProFormaInv.Invoice.PFValueB::calculate - (JavaScript, client)
    if (IfTest.rawValue == "A")
    "50:50"
    Else
    "50:25:25"
    But it does not work. What have I done wrong? I have attached the pdf form I am creating which is a Pro Forma Invoice.
    Regards
    Chris C

    Change the code to:
    if(ProFormaInv.Invoice.IfTest.rawValue == "A") 
    {this.rawValue="50:50";
    else
    this.rawValue="50:25:25";
    Also, your best bet for getting involved in the Designer communinity and responses to your posts is in this forum: http://forums.adobe.com/community/livecycle/livecycle_es/livecycle_designer_es
    The forum you are currently in is for Adobe Certified Trainers

Maybe you are looking for