IF check against subvar value

I need to execute code in a calc script based on the value of a sub var:My subvar is CQ, which can have a value of Q1, Q2, Q3, or Q4.I want to do this in a calc script:FIX ( <member list ..> ) "601000"( IF &CQ == Q1 <do this> ELSEIF &CQ == Q2 <do this> ELSEIF &CQ == Q3 <do this> ELSEIF &CQ == Q3 <do this> ENDIF)ENDFIXThis does not work (all the IF statements resolve to TRUE no matter what the value of CQ is.) Upon further reflection, I see what.I am looking for your help in finding another way to conditionally execute code based on the value of a substitution variable. Thanks.

We do this and I don't actually see anything wrong with your syntax. This is mine (not sure how this will format) and works:Fix(&StartYear)Jan(if(&Startmonth==Jan)     Jan=x;elseif(&Startmonth==Feb)     Jan=y;     Feb=x;endif)EndfixMaybe its because you're checking on the time member and trying to change the account? or something like that. Not got the full story in your post.Hope this helps.

Similar Messages

  • Checking against Select-Options with "CP" using "IF value IN select_option"

    Dear experts,
    first of all: I'm sorry, if this question already should have been asked and answered!
    I tried quite a lot of search terms but didn't find anything helpful.
    We are using a statement like "IF value IN select_option" to perform comparisons after the Select-Options have been used in a SELECT statement. This logical expression fails (compared to the results of the DB-SELECT) whenever a select-option line contains the option CP (Contains Pattern). To be more specific: The case sensitivity of the LOW value doesn't seem to play a role any more. A variable with the value 'ABCD' would be positively checked against a select-option with OPTION 'CP' and LOW 'abc*', whereas this value wouldn't have been selected if the select-option had been used in a DB-SELECT.
    Does anybody know a workaround?
    Thanks in advance
    Andreas

    Dear Keshav,
    it's an own field in an own table, defined as CHAR of length 140 (lowercase allowed), reflecting to a line of remittance info of an account statement. A regular Select-Option for this field is provided in a report which works perfectly fine regarding the case sensitivity. For reasons I don't want to point out in detail we need to check a value in this field against the select-option without selecting it from the db again.
    Let's assume that a field remittance_info contains the value 'ABCD'.
    A line of the select-option table looks like this:
    select_option_table-SIGN = 'I'
    select_option_table-OPTION = 'CP'
    select_option_table-LOW = 'abc*'.
    Then an ABAP statement such as
    IF remittance_info IN select_option_table.
    * would be true !!!
    ENDIF.
    but wouldn't deliver a result in a SELECT such as
    SELECT * FROM my_table INTO TABLE my_internal_table WHERE remittance_info IN select_option_table.
    because of the differences in lower/upper case.
    regards
    Andreas

  • How does APEX check for null values in Text Fields on the forms?

    Hello all,
    How does APEX check for null values in Text Fields on the forms? This might sound trivial but I have a problem with a PL/SQL Validation that I have written.
    I have one select list (P108_CLUSTER_ID) and one Text field (P108_PRIVATE_IP). I made P108_CLUSTER_ID to return null value when nothing is selected and assumed P108_PRIVATE_IP to return null value too when nothign is entered in the text field.
    All that I need is to validate if P108_PRIVATE_IP is entered when a P108_CLUSTER_ID is selected. i.e it is mandatory to enter Private IP when a cluster is seelcted and following is my Pl/SQL code
    Declare
    v_valid boolean;
    Begin
    IF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := FALSE;
    ELSIF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := FALSE;
    END IF;
    return v_valid;
    END;
    My problem is it is returning FALSE for all the cases.It works fine in SQL Command though..When I tried to Debug and use Firebug, I found that Text fields are not stored a null by default but as empty strings "" . Now I tried modifying my PL/SQL to check Private_IP against an empty string. But doesn't help. Can someone please tell me how I need to proceed.
    Thanks

    See SQL report for LIKE SEARCH I have just explained how Select list return value works..
    Cheers,
    Hari

  • Check table and value table -Example

    Hi Experts
                  Please give me the step by step procedure to create the check table and value table, and how to work on it.
    Thanks in advance.
    Regards
    Rajaram

    Hi
    Check Table is for Field level Validation whereas Value table is for Domain Level Validations.
    Value Table proposes table for check table.
    I think you are clear with this.
    more elaborate.
    Check Table
    The Check Table is the table used by system to check if a data exist or not exist.
    While creating a table if you want to be sure that a field can have some values
    and these are in a certain table, you can give IT this table as CHECK TABLE.
    Value Table
    This is maintained at Domain Level.
    When ever you create a domain , you can entered allowed values. For example you go to Domain SHKZG - Debit/credit indicator.
    Here only allowed values is H or S.
    When ever you use this Domain, the system will forces you to enter only these values.
    This is a sort of master check . .
    To be maintained as a customization object.
    This mean that if you want to enter values to this table you have to create a development request & transport the same.
    Differences:
    1)check table will carry out the check for input values for the table field being entered in any application
    and value table will provide values on F4 help for that table field.
    2)The check table defines the foreign keys and is part of the table definition.
    The value table is part of the domain definition.
    check table is validation at field level.
    value table is at domain level.
    Value table is defined at the domain level and is used to provide F4 help for all the fields which refer to that domain.
    Check table is defined against a field in SE11 if you want the values in that field to be checked against a list of valid values. For e.g. if you are using the field matnr in a table you could define MARA as the check table.
    Also while defining a check table SAP proposes the value table as check table by default. Referring to the previous example if you tried to define a check table for the matnr field SAP would propose MARA as the check table.
    1. what is the purpose / use ?
    -- so that the user can select values
    from some master table , for that field !!!!
    2. This is done by
    CHECK TABLE (foreign key concept)
    (and not value table)
    3. When we create a check table for a field,
    then
    some DEFAULT table is PROPOSED
    4. that DEFAULT table is nothing
    but PICKED up from the domain of that field,
    and shown from the value of VALUE TABLE.
    CHECK TABLE -it is a parent table.
    for example..
    i have two tables ZTAB1 and ZTAB2.
    I have one common field in both the tables,i can make any ztable to be the check table .If i make Ztab1 to be the check table then when i have to make an entry in ztab2 i will check whether ztab1 is having that value or not..
    its also field level checking..
    Valuetable-It is nothing but default check table.
    one parent can have n number of child tables.For example
    For ztable we have zchild1 and zchild2 tables r there.
    Its domain level checking..When zchild2 uses the same domain as used by zchild1 then the system automatically generates a popup saying a check table already exists would u want to maintain it.
    go to domain and then press the value tab u can see the valuetable at the end...
    Please refer the links below,
    d/r b/n check and value table?
    wjhat is the exct difference between check table and value table
    what is the check table and value table
    check table and value table
    Re: wjhat is the exct difference between check table and value table
    http://www.sap-img.com/abap/difference-between-a-check-table-and-a-value-table.htm

  • API to validate a value against a value set

    I have a 'Table' Value Set based on the MTL_CATEGORIES_V view, and need to validate some loaded data against it to check the loaded values are are valid. Rather than use a cursor to perform a lookup of the value in MTL_CATEGORIES_V, is there an API that can be used instead?
    I thought I'd found something when I discovered "FND_FLEX_VAL_UTIL.is_value_valid", but this seems to just check that a value meets the criteria of the valueset based on the datatype. size, hi-lo range etc, it doesn't check if the value is actually permitted within the set.
    Andy

    Hi,
    you can use fm FM_DOMAINVALUE_CHECK. Pass parameter values for I_DOMNAME and I_DOMVALUE.
    If the value is invalid, exception VALUE_NOT_ALLOWED will occur.
    Regards,
    Klaus

  • DropTarget check against all objects on the stage

    Hey all,
    Not sure the best way to do this.  I have a class we will call DropActivity, here is the code
    package com.activitycontrol
              import com.activitycontrol.DropCheck;
              public class DropActivity
                   // Constants:
                   // Public Properties:
                   // Private Properties:
                   private var _selectedClip:Object;
                        // Initialization:
                        public function DropActivity(/*selectedClip:Object*/)
                        // Public Methods:
                        public function set selectedClip(selectedClip:Object):void
                                  _selectedClip = selectedClip;
                        public function stopDraggingMe():void
                                       var dropCheck:DropCheck = new DropCheck();
                                       //dropCheck.checkAgainst = dropTarget.name; ///***********
                                       if (dropCheck.canBeDropped == true)
                                            _selectedClip.stopDrag();     
                        // Protected Methods:
    when the stopDraggingMe() method is called from another object (code shown below) I need to see all the objects on the stage to see what objects on the stage my currently selected movie clip is over and assign it to the dropCheck.checkAgainst method (that will be checked against an array to see if it can in fact be dropped, if so set the canBeDropped value to true and therefor run the .stopDrag() ).  I have read using root is not a good coding practice in AS 3.
    call to the stopDraggingme() mehod.
    private function setDown(event:MouseEvent):void
                             var droppedItem:DropActivity = new DropActivity();
                             droppedItem.selectedClip = this;
                             droppedItem.stopDraggingMe();

    No, I think I can use drop target, I just need to use it from the DropActivity class and not a document class. I just don't know how to use it from a non-document class.
    "and you need to loop through all displayobjects to see which have a positive hitTest with your dropped object, correct?"
    I am trying to say..... ok, what movie clip is currently under the one I have selected,  the drop activity class knows what object I have selcted as it is in the selectedClip variable.  so I need to find out what clip is under it ......... the light just came on!
    answer duh......dropCheck.checkAgainst = _selectedClip.dropTarget.parent.name;
    thanks a bunch kglad you have helped me out once again, you are the man. I might just have to buy you a beer one of these days.

  • Password validation script checking against stored passwords

    I am able to create a script to check and validate for the password complexities outlined by our Active Directory GPO, but is there a way to check the password against the 1-24 stored passwords to validate that it hasn't been used before?
    Thanks

    Sorry Bill, I have written a forms based application in VB.NET that will allow the end-user to type in a proposed password. upon the press of the "Test" button the application loops through the characters in the textbox.text and determines if it
    meets at least three of the following requirements:
    1) the proposed password has at least one uppercase character
    2) the proposed password has at least one lowercase character
    3) the proposed password has at least one numeric value
    4) the proposed password has at least one symbol
    5) the proposed password has at least one Unicode character (non upper/lower case)
    and an over all check that it meets the length requirements
    I am hoping to find a way to check against the stored passwords to find out if the password has been used before.
    Thanks,
    -Ken

  • ATP check and Check against planning for a production order

    Hi
        When I create a production order for some orders it is ATP check and for some orders it is showing 2 in type avail check is check against planning in coois screen. Because of this orders are gettign released even though BOM material is out of stock.Can I know in which situations the orders will come under the second scenario. I always want the orders should be in ATP check
    regards,
    PradeepM.

    Hi,
    If you want only ATP check, then in MRP-3 view of the mtl master change the checking group to the same value as the one which you find to be following the ATP check.
    However before making this change do consult your colleagues in other domains, as this will impact all places where Av. check is done.
    Hope it clarifies.
    Regards,
    Vivek

  • How to check for null values in bpel?? Please Help! very urgent!!!

    Hello Guys,
    I have a problem. I have an external webservice to which I have to post my request. My task is to create an Webservice and Service Assembly to which others would post request and get response. I have to create SA to deploy onto the bus.
    The problem is that there are optional elements in the request and response xsd's. In the Response sometimes certain feilds may come or they may not. for Example:- my response could contain a tag like this <firstName></firstName>
    I have to copy these feilds in my bpel process from one variable to another.(like in the mapper).
    My Question is , Is there any way in BPEL process or BPEL mapper where I could Check for null values in the request or response???
    Your inputs would be very helpful.
    Thanks
    Rajesh

    Thanks for replying man :)
    Ok I will be more clear.
    Here is a snippet of one of the xsd's that I am using.
    <xs:element name="returnUrl" nillable="false" minOccurs="0">
                        <xs:annotation>
                             <xs:documentation>Partner specifies the return URL to which responses need to be sent to, in case of
    Async message model.
    </xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:anyURI">
                                  <xs:maxLength value="300"/>
                                  <xs:whiteSpace value="collapse"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
    This means that the return URL field can be there or it may not be there. But if it is there it cant be null because nillable=false. But the whole <returnURL> </returnURL> can be there or it may not be there because minOccurs=0.
    My requirement is , if returnURL is there in the response with a value, then in my BPEL mapper I should map it else I should not map it.
    Thats the issue.
    and Yes kiran, the node be non-existant.
    So can you please help me with this.
    Thanks
    Rajesh

  • Checking for null value in arraylist

    Hi
    i have an excel file which i i am reading into an arraylist row by row but not necesarrily that all columns in the row mite be filled. So how do i check for null values in the array list.
    try
                        int cellCount = 0;
                        int emptyRow = 0;
                        HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(file));
                        HSSFSheet sheet = workbook.getSheetAt(0);
                        Iterator rows = sheet.rowIterator(); 
                        myRow = new ArrayList();
                        int r = 1;
                             while (rows.hasNext())
                                  System.out.println("Row # " + r);
                                  HSSFRow row = (HSSFRow) rows.next();
                                  Iterator cells = row.cellIterator();          
                                  cellCount = 0;
                                  boolean isValid = false;
                                  while (cells.hasNext())
                                       HSSFCell cell = (HSSFCell) cells.next();
                                       switch (cell.getCellType())
                                            case HSSFCell.CELL_TYPE_NUMERIC:
                                                 double num = cell.getNumericCellValue();     
                                                 DecimalFormat pattern = new DecimalFormat("###,###,###,###");     
                                                 NumberFormat testNumberFormat = NumberFormat.getNumberInstance();
                                                 String mob = testNumberFormat.format(num);               
                                                 Number n = null;
                                                 try
                                                      n = pattern.parse(mob);
                                                 catch ( ParseException e )
                                                      e.printStackTrace();
                                                 System.out.println(n);
                                                 myRow.add(n);                                             
                                                 //myRow.add(String.valueOf(cell.getNumericCellValue()).trim());
                                                 //System.out.println("numeric: " +cell.getNumericCellValue());
                                                 break;
                                            case HSSFCell.CELL_TYPE_STRING:
                                                 myRow.add(cell.getStringCellValue().trim());
                                                 System.out.println("string: " + cell.getStringCellValue().trim());
                                                 break;
                                            case HSSFCell.CELL_TYPE_BLANK:
                                                 myRow.add(" ");
                                                 System.out.println("add empty:");
                                                 break;
                                       } // end switch
                                       cellCount++;
                                  } // end while                    
                                  r++;
                             }// end while
                   } myRow is the arrayList i am adding the cells of the excel file to. I have checked for blank spaces in my coding so please help with how to check for the black spaces that has been added to my arraylist.
    I have tried checking by looping through the ArrayList and then checking for null values like this
    if(myRow.get(i)!=null)
      // do something
    // i have tried this also
    if(myRow.get(i)!="")
    //do something
    }Edited by: nb123 on Feb 3, 2008 11:23 PM

    From your post I see you are using a 3rd party package to access the Excel SpreadSheets, you will have to look in your API for you 3rd party package and see if there is a method that will identify a blank row, if there is and it does not work, then you have to take that problem up with them. I know this is a pain, but it is the price we pay for 3rd party object use.
    In the mean time, you can make a workaround by checking every column in your row and seeing if it is null, or perhaps even better: check and see if the trimmed value of each cell has a lenth of 0.

  • Check for NULL value (Recordset field)

    Hi y'all...
    A little question, so just for the weekend...
    I've a query that returns 4 fields, the fisrt three always containing data, and the last one an integer, or NULL. If I get the value with <i>rs.Fields.Item(3).Value.ToString();</i> it always contains an integer. The NULL values are always converted to '0'.
    How can I check if it is a NULL value?

    Okey, found a workaround, using the SQL function ISNULL()...
    SELECT ISNULL(U_MyVar, 'null_value') FROM [@MyTable]
    Now I can check if the value has the value <i>"null_value"</i>. If so, that field was <i>null</i>

  • How to check  if all values from a dataset  has come to  an internal table

    How to check  if all values from a dataset  has come to  an internal table ?

    Hi,
    After OPEN DATASET statement check if sy-subrc = 0 if its success then proceed with split statement and save the dataset values into a internal table and while debugging the internal table you will find that whether all values get into internal table.
    Checking sy-subrc after OPEN DATASET statement is must to fill up the values in the internal table.
    For e.g.
    OPEN DATASET p_inpfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc NE 0.
        WRITE :/ 'No such input file' .
        EXIT.
      ELSE.
    READ DATASET p_inpfile INTO loc_string.
          IF sy-subrc NE 0.
            EXIT.
          ELSE.
            CLEAR loc2.
    *Spliting fields in the file-
            REPLACE ALL OCCURRENCES OF '#' IN wa_string WITH ' '.
           SPLIT wa_string AT const INTO loc2-pernr
                                           loc2-werks
                                           loc2-persk 
                                           loc2-vdsk1.
    Hope you get some idea.
    Thanks,
    Sakthi C

  • ATP Check against customer stock for return Sale order

    Hi Friends,
    Pl.help in this.
    1. Is it possible to configure ATP check against Customer stock in a Sale order/Return order/any other way? ( Actuallly, client wants to take back empty cylinders through return sale order by ATP check against the customer stock)
    Regards,
    Mani

    Hi Mani ,
    Are you  taking cylinder as returable packing item or not?
    ex- For soft  drinks or beverages industry  it pretty common , they  use thel returnable package material type and more over why you want  use return sales order for this?
    Note- Just plz explain  scenario to MM and PP People also as availability check with all combination
    Hope it is helpful to you,
    Regards
    Venkat

  • Loop not working for check of duplicate values in a repeating table

    I have a form that is used for marking down problem items, describing the problems and assigning a value to the specified item. In some cases the problems belong to the same class. When they do, the value associated with the problem should only be marked once. If another problem in the same class is documented the value should not be recorded the second time. I have a variable that is called based on a switch statement in the exit event of the field that records the problem item number. The script in the variable is then supposed to check for duplicate values in the table. If no other problem item in that class is selected, then the problem value should be assigned a number. If another item from the same class has already been entered, then the problem value should just be left blank. I will paste the script for the variable below as well as the switch statement. When I used to call the variable based upon the change event for the problem item, the script work. At that time, the switch statement was related to a drop-down menu. We decided to get rid of the drop-down and just have the used type the item number. But to do so, I had to move the switch statement to the exit event for the field. when I did this, the script in the variable no longer worked properly. Here is the switch statment followed by the script in the variable:
    this.rawValue = this.rawValue.toLowerCase();
    var bEnableTextField = true;
    var i = "Inspection Criteria: ";
    var r = "Required Corrections: ";
    switch (this.rawValue)
      case "1a": // 1a- First debit option
        CorrectionsText.CorrectionLang = r+"Correction description for 1st debit";
        ViolCorrSection.ViolationsText.DebitVal = "C";
        ViolCorrSection.Reference.RefLanguage = i+"1st debit reference";
    break;
      case "1b": // 1b- Second debit option
        CorrectionsText.CorrectionLang = r+"Correction description for 2nd debit";
        ViolCorrSection.Reference.RefLanguage = i+"2nd debit reference";
        myScript.group1();
    break; //the script continues for various item numbers...
    ________________ variable script ________________________
    function group1()
    //Used in checking duplication of violations
    var oFields = xfa.resolveNodes("form1.MAINBODYSUB.ViolationsTableSubform.ViolationsTable.ViolCorrSectio n[*].ViolationsText.ItemNo"); // looks to resolve the repeating rows
    var nNodesLength = oFields.length; //assigns the number of rows to a variable
    var currentRow = xfa.resolveNode("form1.MAINBODYSUB.ViolationsTableSubform.ViolationsTable.ViolCorrSection ").index;
    var currentDebit = xfa.resolveNode("form1.MAINBODYSUB.ViolationsTableSubform.ViolationsTable.ViolCorrSection [" + currentRow + "].ViolationsText.DebitVal");
    for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) // this loops through Item Numbers looking for duplicate violations
    //console.println("nNodeCount: " + nNodeCount);
    var nFld = xfa.resolveNode("form1.MAINBODYSUB.ViolationsTableSubform.ViolationsTable.ViolCorrSection [" + nNodeCount + "]");
    //console.println("nFld.ViolationsText.ItemNo: " + nFld.ViolationsText.ItemNo.rawValue);
         if (nFld.ViolationsText.ItemNo.rawValue == "1a" || nFld.ViolationsText.ItemNo.rawValue == "1b" || nFld.ViolationsText.ItemNo.rawValue == "1c" || nFld.ViolationsText.ItemNo.rawValue == "1d") // looks for other 1s
              currentDebit.rawValue = "";
              nNodeCount = nNodesLength;  // stop loop
         else
            currentDebit.rawValue = "5";
    So, if you enter 1b the first time, you should get a value of 5 appearing in the debit value field. If you enter 1c next, because it belongs to the same group of class of problem items, there should be no value assigned. What happens now is that the values for 1b and 1c don't appear at all because the form thinks that the first 1b entry already existed.
    Any ideas? I have a stripped down version of the form that I can email to someone for reference if that would help. Thanks
    P.S. I am working with LiveCycle Designer ES 8.2.1....

    Hi,
    I can have a look at your form, but can you host it somewhere like Acrobat.com or google docs and add a link to it here.
    Regards
    Bruce

  • How to Check the total value of a field

    Hi,
    I want to check the total value of a field (this total is obtain by using property of that field thru personalization).
    that means , in a table 3 columns are there (col 1, col2 & col3). I personalized the total property as true for col3.
    now i'm getting the total for that field.
    I want to check that total whether it crossed 100 or not.
    How to do this?
    Thanks in advance,
    SAN

    Hi San,
    You can achieve by using OATotalRowBean, search for OATotalRowBean in this forum you should be able to get some sample code.
    public class OATotalRowBean
    extends TotalRowBean
    implements OAWebBean, OAWebBeanConstants
    A special row rendered at the bottom of a table which lets users see totals for columns which are designated for summing.
    Note The total is calculated and displayed only for visible rows.
    When you indicate that you want to total one or more columns, the OA Framework creates an OATotalRowBean and designates it as the columnFooter named child of the OATableBean. If the OATableBean is also configured to insert rows (so it has an "Add Another Row" button), then the total bean becomes an indexed child of the add table row bean (see OAAddTableRowBean), which the OA Framework in turn designates as the table's columnFooter object.
    If you need to access the table's column footer object for any reason, call the OATableBean's getColumnFooter() method. If row insertions are enabled, this method returns an OAAddTableRowBean; otherwise it returns an OATableRowBean.
    For detailed information about creating and working with tables, see OA Framework Developer Guide: Tables.
    With regards,
    Kali.
    OSSi.

Maybe you are looking for