Two Conditions in If statement

Hi,
I wanted to include two condition in a single IF statement. So, i tried below,
<?xdofx:if :POH_CANCEL_FLAG='Y' and :POH_PO_TYPE!='RELEASE' then?><?call-template:po_oc?><?end if?>
But this is calling the template even if one condition is false. Can i do like this? Please advice.
Thanks.

Assuming your field names are POH_CANCEL_FLAG AND POH_PO_TYPE;
You should be able to use:
<?if: (./POH_CANCEL_FLAG='Y' and ./POH_PO_TYPE!='RELEASE') ?>
<?call: po_oc?>
<?end if?>
OR use this:
<?choose:?>
<?when: ./POH_CANCEL_FLAG='Y' and ./POH_PO_TYPE!='RELEASE'?><?call:po_oc?>
<?end call?>
<?end when?>
<?end choose?>
Hope this helps!

Similar Messages

  • How to set two Conditions Simultaneously in set where clause

    Hi,
    I have a messgechoice item , and i need to fire messagechoice VO with two conditions.
    For Eg:-- we have three Items ProjectContractor& Work Order on a custom Page , now i need work order list should populate on lelection of project & contractor both, so i have apply a fire partial event on contractor where i i get the parameter values as follows:--
    CO Code
    if("OrderNoself".equals(event))
    String value21 = (String)pageContext.getParameter("ProjectName");
    System.out.println("The Selected Project Name for self Contractor is "+value21);
    String value22 = (String)pageContext.getParameter("ContractorName");
    System.out.println("The SelectedContractor Name for ContractorName is "+value22);
    Serializable [] params11 = {value21,value22} ;
    am.invokeMethod("initWorkOrderNumberself",params11);
    AM Code
    public void initWorkOrderNumberself(String ProjectName,String ContractorName");
    getDprWorkOrderpopVO1().setWhereClause("PROJECT_NAME = " + "'"+ProjectName+"'");
    getDprWorkOrderpopVO1().setWhereClause("CONTRACTOR_NAME = " + "'"+ContractorName+"'");
    getDprWorkOrderpopVO1().executeQuery();
    Now when i run my form then Work order list only populateon set conditions ofContractor NAme only.
    Please suggest....

    Hi Tarun,
    Thanx for ur reply,
    i have used below mwntioned code provided by you but still i m getting error...
    public void initWorkOrderNumber(String ProjectName,String ContractorName)
    //getDprWorkOrderpopVO1().setWhereClause("CONTRACTOR_NAME = " + "'"+ContractorName+"'");
    //getDprWorkOrderpopVO1().executeQuery();
    getDprWorkOrderpopVO1().setWhereClause("PROJECT_NAME =:1 AND CONTRACTOR_NAME=:2");
    getDprWorkOrderpopVO1().setWhereClauseParams(null);
    getDprWorkOrderpopVO1().setWhereClauseParam(1,ProjectName);
    getDprWorkOrderpopVO1().setWhereClauseParam(2,ContractorName);
    getDprWorkOrderpopVO1().executeQuery();
    ERROR:---
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (select * from omaxe_work_order_headers
    where work_order_number is not null) QRSLT WHERE (PROJECT_NAME =:1 AND CONTRACTOR_NAME=:2)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:862)
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:985)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:210)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:721)
         at omaxe.oracle.apps.xxopa.boqmain.webui.OmaxeDPRCO.processFormRequest(OmaxeDPRCO.java:107)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01006: bind variable does not exist
    Regards
    Saurabh

  • Checking conditions in SELECT statement

    Hi All,
    I am relative new to ABAP and I would like to ask a question about checking conditions in SELECT statement in the "WHERE" part.
    There are two checkboxes at the selection screen and each should disable one of  conditions (marked with two stars) in the SELECT mentioned below.
    My question is, whether there exists an option how to solve this problem without using solution like:
    IF checkobx1.
    SELECT (without one condition)
    ELSEIF checkbox2.
    SELECT(without other condition).
    ELSE.
    SELECT (with both conditions)
      SELECT  qprueflos qherkunft qaufnr qsa_aufnr qmatnr qwerkvorg
              qpastrterm  qpaendterm
              qverid qobjnr vobjnr AS objnr_fa vauart
        FROM qals AS q INNER JOIN vkaufk AS v
        ON qaufnr = vaufnr
        INTO CORRESPONDING FIELDS OF TABLE gt_qals
        WHERE q~prueflos IN s_pruefl
          AND q~stat35     EQ space
          AND q~werk       EQ loswk
          AND q~herkunft IN s_herk
          AND q~offennlzmk EQ 0
          AND q~offen_lzmk EQ 0
          AND q~pastrterm IN s_startt
          AND q~paendterm LE s_endt
          AND v~auart IN s_auart.    "('ZCPA', 'ZCPK', 'ZCBA').

    Hi,
    With this, I think u can directly read into WHERE clause
    IF checkbox1.
        v_where = '& BETWEEN ''&'' AND ''&'' '.
        REPLACE '&' WITH key_field INTO v_where.
        REPLACE '&' WITH field_LOW INTO v_where.
        REPLACE '&' WITH field_HIGH INTO v_where.
        CONDENSE v_where.
    ELSEIF  checkbox2.
        v_where = '& BETWEEN ''&'' AND ''&'' '.
        REPLACE '&' WITH key_field INTO v_where.
        REPLACE '&' WITH field_LOW INTO v_where.
        REPLACE '&' WITH field_HIGH INTO v_where.
        CONDENSE v_where.
    ENDIF.
    select * into corresponding fields of table ITAB
                 from (table_name)
                where (v_where).
    In this key_field is your fieldname in the where clause and field_low, field_high are range of values.
    If i write static query it looks like this
    RANGES: MATNR1 FOR MARA-MATNR.
      MATNR1-LOW = MATNR_LOW.
      MATNR1-HIGH = MATNR_HIGH.
      MATNR1-SIGN = 'I'.
      MATNR1-OPTION = 'BT'.
      APPEND MATNR1.
    select * into corresponding fields of table itab
    from mara where matnr BETWEEN 'M100' AND 'M200'.
    Hope it helps u
    thanks\
    Mahesh
    Edited by: Mahesh Reddy on Jan 30, 2009 11:23 AM

  • DBPolling based on two conditions

    Hi All,
    We have a requirement in our bpel to process to poll the DB based on two conditions as we know how to poll on DB for one conditions.
    Any help is highly appreciated.
    Thanks and Regards,
    Nagaraju .D

    Sorry it is late here, I was thinking of selecting data, forget what I have said.
    Polling condition needs to be a sequence so there is no possibility of missing rows. Things like date, id etc
    If you need to use multiple conditions you need to concatinate the fields as part of the select statement. You may need to create a view for this.
    Obviously if you are doing a physical delete, or a logical delete there is no such issue as BPEL will read every row that is in the table, or where the flag is set to not processed.
    Hopefully this helps, sorry for mucking you around
    cheers
    James

  • How to combine two conditions :  Exists and Item not null ?

    Hello !
    I have a flash chart region that I would like to display only if two conditions are both true.
    The first condition is this one :
    Exists (SQL query returns at least one row) :
    select 1
    from    observatoire.fiche aa, observatoire.activite_faite bb
    where   aa.fiche_id = bb.fiche_id
    and     bb.fiche_id = aa.fiche_id
    AND     bb.activites_id = TO_NUMBER(:P23_ACTIVITES_ID)
    AND     TRUNC(aa.date_activite, 'YYYY') = TRUNC(TO_DATE(:P23_ANNEE, 'YYYY'), 'YYYY')And the second condition would be :
    Item not null :
    P23_ACTIVITES_IDHow to combine these two conditions into one display condition ?
    Thank you .
    Christian

    Hello,
    The issue is that you're doing -
    TO_NUMBER(:P23_ACTIVITES_ID)When you leave the Null return value blank like that, you'll typically see '%null%' used in session state (i.e. it's not actually null). Obviously '%null%' can't be converted to a number, hence the error you're seeing.
    A simple solution would be to make your null return value -1 or some other value that is guaranteed not to be a valid id (and alternative is to convert the %null% to a real null via an App/Page process etc (if you search this forum you'll find a few examples on how to do that). Another alternative is to use a DECODE to detect the '%null%' etc.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Calculation of tax with two conditions

    hi all,
    i have an issue regarding tax in condition in po.
    i want the calculation of tax should be on two condition basis, while i am giving value in tax code field in invoice tab.
    1. when i am entering tax code, the value like- L1- 4%, L2- 12%, that is calculating on gross price.
    supose- GP- 100
         tax- 4%-     4
                        104
    then am puting fright charge- 10
    so total is 114
    2. supose- GP- 100
             fright     -  10
                            110
    then a will calculate- 4% on 110
    how this could be done, the 2nd one.
    thanks&regards
    susanta

    Hi,
    For this you have to treat Freight as a Discount Condition Type in MM Pricing
    Take a copy of RA01 in M/06 and keep it as Positive Condition
    Here keep
    Cond. class   A Discount or surcharge
    Calculat.type A Percentage
    Cond.category Blank
    And Plus/minus - A (Positive)
    Use this in Pricing Procedure (M/08) after Gross Price ad Discount conditions (before Subtotal)
    Now
    Base Price = 100
    Freight = 10
    Subtotal = 110
    Tax (4%) = on Subtotal

  • Two conditions in a report

    Hello,
    I have a reports with few key figures, for one of regular key figure and formula key figure need to create two conditions. 1st condition needs to bring values greater than X values (example 20) from regular key figure. 2nd condition should bring top 10 values from formula key figure. 2nd condition should only show top 10 from list of 1st condition.  Can this scenario achievable in 3.x query designer? Any help greatly appreciated!
    Regards,
    JayPee

    Hi, You can have multiple Conditions in a Query wherein each Condition is evaluated independently, however the order matters. Hence, have;
    - first condition on the KF where > some fixed value
    - second condition on the same KF where the Top N operator is used where N is obtained from a Formula Var using Manual I/P
    for more on Conditions, refer below links
    http://help.sap.com/saphelp_nw04/helpdata/en/1e/7875a998bc44409f6002e28552685a/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/86/dfc405ab60524ea0d3e89db15fb2e7/content.htm
    --Priya

  • Formated Search: Auto refresh with two conditions.

    Hi,
    I've created a Formated Search in one of my column.
    I defined my formated search as :
    - Auto refresh "When Exiting Altered Column" Item No.
    - Display Saved Values.
    Now how can I make it Auto refresh with two conditions?
    - Auto refresh "When Exiting Altered Column" Item No.
    And
    - Auto refresh "When Field Changes" Customers/Vendor Code.
    - Display Saved Values.
    Is there any way to make it work?
    Thanks In Advance.
    Bruce.

    Hi Bruce,
    You could try this trick.
    You need to execute SELECT1 in Col1 when Item No. column is altered or the Customer code is changed.
    Then, in the Item No. column asign a new Formatted Search which selects the Item No. column value (Its value) when the Customer code is changed.
    And in the Col1 asign a formatted search that acts when the Item No. column is altered.
    I think this should do the trick.
    Let us know if works.
    Regards,
    Ibai Peñ

  • Inclusion of two condition types in pricing procedure

    Dear Sir,
    There is a import pricing procedure ZIMPRT in SAP system.The client wants to include two condition types
    ZPOR= Port handling charges
    ZFCP+CLEARING AND FORWARDING CHARGES.
    iIs it possible to do so.I?
    What are the factors I need to consider for iincorporating two condition types in Import Pricing Procedure
    Regards
    Manash Das

    Hi,
    Yes you can do it & as needed you can includes two condition types {ZPOR (Port handling charges) and ZFCP (CLEARING AND FORWARDING CHARGES)} in import pricing procedure ZIMPRT. As already have condition types in import pricing procedure ZIMPRT, you need to take care following:
    1.u201CStepu201D for both condition types ZPOR & ZFCP (position of the both condition types) in which sequence and exactly where both of the conditions with in a import procedure
    2.u201CFromu201D: Which is base to the both condition types ZPOR & ZFCP for calculating further value.
    3.u201CFrom & Tou201D: What are the ranges between the steps from and to can be used to specify the range between both condition types.
    4.Both condition types ZPOR & ZFCP are preferred for manual entry or automatic.
    5.Both values of condition types ZPOR & ZFCP are needed to be given deletion option, if needed.
    6.Both condition types ZPOR & ZFCP needed accounting key & accrual key or not which further needed to be captured all related respective cost to separate G/L account( where accrual key assigned  to G/L account in OBYC t.code)
    Regards,
    Biju K

  • Dynamic where condition in Select statement

    Hi,
    I have 10 fields on selection-screeen. In which ever field the user enters single values or ranges,i should pick that field dynamically and pass that field along with value range to Where condition of Select statement.How can i achieve this? Please help.
    Regards
    K Srinivas

    see the following example:
    data : begin of itab occurs 0,
             matnr like mara-matnr,
    end of itab.
    ypes: begin of ty_s_clause.
    types:   line(72)  type c.
    types: end of ty_s_clause.
    data : begin of gt_condtab occurs 0.
            include structure hrcond.
    data : end   of gt_condtab.
    FIELD-SYMBOLS <fs_wherecond> TYPE ty_s_clause.
    data:
      gt_where_clauses  type standard table of ty_s_clause
                        with default key.
    gt_condtab-field = 'MATNR'.
    gt_condtab-opera = 'EQ'.
    gt_condtab-low = '000000000000000111'.
    append  gt_condtab.
    clear  gt_condtab.
    call function 'RH_DYNAMIC_WHERE_BUILD'
      exporting
        dbtable         = space " can be empty
      tables
        condtab         = gt_condtab
        where_clause    = gt_where_clauses
      exceptions
        empty_condtab   = 01
        no_db_field     = 02
        unknown_db      = 03
        wrong_condition = 04.
    select matnr from mara into table itab where (gt_where_clauses).

  • Suppressing a section based on two conditions

    Hello
    currently, I am trying to suppress a section of group based on two conditions:
    - The first condition is to suppress the section always if the user is not at DrillDownGroupLevel 1.
    - The second condition is to supress the section if the GroupName ({Customer.TerritoryID})  is not UK or US.
    I went to the section expert and entered this code in the "Suppress (No drill-down)" x-2 formula field:
    DrillDownGroupLevel <> 1 AND
    GroupName ({Customer.TerritoryID}) <> "US" OR
    GroupName ({Customer.TerritoryID}) <> "UK"
    Unfortunately, it does not work. Any ideas are very welcome!!
    I am using Crystal Reports XI
    Thanks in advance!!

    Which "section of a group" are you trying to conditionally suppress?  (group header, group footer or details within a particular group......or all of them?)
    AND you stated,
    "currently, I am trying to suppress a section of group based on two conditions:
    The first condition is to suppress the section always if the user is not at DrillDownGroupLevel 1.
    The second condition is to supress the section if the GroupName ({Customer.TerritoryID}) is not UK or US.
    Try this formula for the conditional suppression:
    (DrillDownGroupLevel  <> 1) AND
    (GroupName ({Customer.TerritoryID})  "US") OR
    (GroupName ({Customer.TerritoryID})  "UK")
    If that does not work you may want to check and make sure your values are upper case in the TerritoryID.
    In addition, a GOOD way to test conditional suppression formulas is to put them into a conditional highlighting color for the section so you can still see the values and the highlighting lets you know if it's working.  For example:
    IF
    (DrillDownGroupLevel  <> 1) AND
    (GroupName ({Customer.TerritoryID})  "US") OR
    (GroupName ({Customer.TerritoryID})  "UK")
    then YELLOW else WHITE

  • Delete from two tables in one statement

    Hi,
    Is there a way to delete from two tables in one statement?
    Actually I have two tables:
    1. Base table (id, name, age)
    2. Person table (id, city, street)
    The id in both tables is identical.
    I would like to delete using something like a join:
    Delete from base, person where id=2;
    Thanks
    dyahav

    Hi,
    If you want to delete records both at a time them your table must use ON DELETE CASCADE. See the below example.
    CREATE TABLE supplier
    ( supplier_id numeric(10) not null,
    supplier_name varchar2(50) not null,
    contact_name varchar2(50),
    CONSTRAINT supplier_pk PRIMARY KEY (supplier_id)
    CREATE TABLE products
    ( product_id numeric(10) not null,
    supplier_id numeric(10) not null,
    CONSTRAINT fk_supplier
    FOREIGN KEY (supplier_id)
    REFERENCES supplier(supplier_id)
    ON DELETE CASCADE
    In this example, we've created a primary key on the supplier table called supplier_pk. It consists of only one field - the supplier_id field. Then we've created a foreign key called fk_supplier on the products table that references the supplier table based on the supplier_id field.
    Because of the cascade delete, when a record in the supplier table is deleted, all records in the products table will also be deleted that have the same supplier_id value.
    Thank you.

  • Start Local chain based on two conditions

    Hello,
    I want to trigger a local chain in a metachain based on success of two conditions.
    1) at a stipulated time.
    2) and on the completion of above process.
    Also is there a function module by which i can get the variant name of a process.

    how can this be achieved.
    Thanks
    Dutta

  • Multiplying two condition types in pricing procedure

    Hi,
    I want to multiply 2 condition types in pricing procedure.Kindly guide me how to do it??
    Somnath

    Hi Somnath,
    You can do that in following way
    1. Create another condition type
    2. Maintaine this condition type, after those two condition type which you want to multiply like, 10-first condition type, 20-second condition type, 30-new condition type which is multiplicaiton of first two. (10, 20, 30 are step numbers)
    3. Now write a routine which will multiply 10 and 20.
    4. Assigne this routine number in the Alt. Cal. Type filed for the new condition type 30.
    5. Now this new condition type will be caliculated based on this routine, and the value will be taken as multiplication of first and second condition type.
    Hope this clear.
    Reward if helpful.
    Thanks,
    Praveen

  • Show Item depending on two conditions

    Hello,
    I have an item which have to display conditions.
    How can I realize this combined display option?
    The same problem I have for the computation.
    The computation depends on two conditions.
    Is there a possibility to realize this in ApEx?
    Thanks in advance
    Ulrike

    That does work for simple cases, but sometimes I have a more complicated set of conditions. If I'm just checking against data values on whether or not to display something, it's easy using PL/SQL. But I have a situation where I'm deciding whether or not to display something based on data values and whether or not the page is printer-friendly.
    Is there a way (api?) in PL/SQL to get at the values for printer-friendly and other conditions? If so, that would be keen. I've looked in the docs, but haven't found something like that yet. Maybe I'm looking in the wrong place?

Maybe you are looking for

  • How can I get my old iPod onto my new computer without my old computer?

    The hard drive on my old computer recently crashed and there was no way to recover anything from it. I was currently using iTunes 7 on that computer so everything was updated. I was using Windows XP on my old computer but I just bought a new one that

  • Mapping error :Collecting file : BpmPatternCollectTime

    Hi I am trying to use Multimapping with BPM,  for 3 files correlated based in some field value but mY collectpattern is not workin, Workflow shows errror in Message Mapping Runtime exception Attach Mapping http://img255.imageshack.us/my.php?image=map

  • A55M-P33 Front Audio

    I know there are lots of questions and answers on the front audio ports.   I just want to clarify some stuff.  I have the A55M-P33 motherboard which has the JAUD1 connector.  My case came with the HD and AC97 audio connectors.  I currently have the H

  • IDOC HRMD_A  to Files

    Hi, I have change pointers activated on an HR system, and I need to transfer the changes to an external application via XI. The external application accepts 3 different types of messages (e.g I have 3 distinct message type in my design rep.) but on t

  • Cannot register radius server in active directory

    Hi All What I can't do is to register the RADIUS server to the Active Directory service which is located on the same server and stand alone server same problem  (see screenshot). I've tried to do this as both domain administrator and local administra