Restrict variable values based on another variable in the bex query...

I am struggling to restrict the variable values from other varaible in the selection criteria. I have a variable which restricts he organisation(0ORGUNIT) and another to restrict employees.
When the user selects any organisation unit form the hierarchy, I want only those employees related to that organsation in the varaible selection options.
Is there any way I can make a variable values dependant on the another variable value in variable selection screen?
Thanks,
Your help in this matter will be much appreciated.
Edited by: Kthapa on Nov 25, 2010 11:08 PM

Hi Kthapa,
Did u try using cmod?
i_step = 1? Used to provide default values for the selection screen variables and
i_step = 2 for filling up the variables after selection screen.
Try using based on ur requirement.
Hope this helps. Revert back for any queries.

Similar Messages

  • Restriction of f4 help of a bex variable based on another variable input

    Hi,
    Could you please let me know if there is any possibility to restriction of f4 help of a bex variable based on another variable input.
    eg: when i select particular company code in one variable, i need to restrict the f4 help for another variables eg: pur. group based on selected company code.
    Regards
    Kasi

    Hi,
    Try using replacement path option in bex with replace variable with variable selction.
    Thanks.

  • Assign a Javascript variable value to a ABAP variable

    Hi,
       I wish to assign a javascript variable value to  a ABAP variable. Any ideas how to do that?
        Many thanks.
    Rgds,
    Bernice

    Here's another suggestion for you.
    BSP Application: SBSPEXT_HTMLB
    Check out the radionbuttongroup.bsp
    So then instead of using a standard HTML radio buttons you can use the HTMLB element with the parameter for onClick set then in your DO_HANDLE_EVENT you can read the value.
    VIEW
    <htmlb:radioButtonGroup id="radio">
      <htmlb:radioButton id="id_link"
                       text="Link"
                    onClick="myClickHandler"/>
      <htmlb:radioButton id="id_unlink"
                       text="Unlink"
                    onClick="myClickHandler"/>
    </htmlb:radioButtonGroup>
    DO_HANDLE_EVENT
      DATA:   lt_event        TYPE REF TO if_htmlb_data.
      lt_event = cl_htmlb_manager=>get_event_ex( request ).
      if lt_event IS NOT INITIAL.
        if  lt_event->event_name = htmlb_events=>radiobutton.
           case lt_event->event_id.
            when 'control_id_link'.
              schalter = ' '..
            when 'control_id_unlink'.
              schalter = '1'.
           endcase.
        endif.
      endif.
    There is an example of how to use it and read it in the DO_HANDLE_EVENT you then just have to pass the variable around (in this example the variable name is schalter and is defined as char1 in the class)

  • Selection values in query should have help values based on another field

    Hi all,
    I have the following requirement:
    I have a query in which there are the following two filters in the
    selection criteria:
    1. COuntry
    2. State
    Based on the Country selected, the values for the State should come up
    in the Help values in the slection criteria. The user then shall select from these values.
    I plan to use a variable for Country with Replacemetn path as the second query whcih shall have Coutnry and States.
    Is this right or can I do this in a better way? Please suggest.
    Thanks and Regards,
    Srilakshmi B

    Hi,
    See you can achieve this through exit variable.
    Try to create one custom table or try to refer to master data tables may be?
    Custom table need to maintain your master data and need to be referred in below code.
    INCLUDE ZXRSRU01 *
    Enhancement: MultiProvider using InfoProvider Variable
    include YBW_INFOPROVIDER_VARIABLE.
    *& Include YBW_INFOPROVIDER_VARIABLE *
    DATA:
    ls_var TYPE rrs0_s_var_range,
    ls_range TYPE rsr_s_rangesid,
    l_contained TYPE c,
    ls_mapping TYPE ybw_mapping,
    lt_mapping TYPE TABLE OF ybw_mapping.
    Called after variable popup
    IF i_step = 2 AND i_vnam = 'INFOPROV'.
    - 13 -
    Read mapping table
    REFRESH lt_mapping.
    SELECT * FROM ybw_mapping INTO TABLE lt_mapping.
    Process all selection for country variable
    REFRESH e_t_range.
    LOOP AT i_t_var_range INTO ls_var WHERE vnam = 'S_COUNT'.
    Process all mapping rules
    LOOP AT lt_mapping INTO ls_mapping.
    Always fill LOW and HIGH, Otherwise logic below will not work
    IF ls_mapping-high IS INITIAL.
    ls_mapping-high = ls_mapping-low.
    ENDIF.
    Check if selection is contained in the defined InfoProvider
    CLEAR l_contained.
    CASE ls_var-opt.
    WHEN 'EQ'.
    IF ls_var-low BETWEEN ls_mapping-low AND ls_mapping-high.
    l_contained = 'X'.
    ENDIF.
    WHEN 'BT'.
    IF ls_var-low <= ls_mapping-high AND
    ls_var-high => ls_mapping-low.
    l_contained = 'X'.
    ENDIF.
    ENDCASE.
    Add InfoProvider to return table
    Note: Use COLLECT to avoid duplicates
    IF l_contained = 'X'.
    CLEAR ls_range.
    ls_range-sign = 'I'.
    ls_range-opt = 'EQ'.
    ls_range-low = ls_mapping-infoprov.
    COLLECT ls_range INTO e_t_range.
    ENDIF.
    ENDLOOP. " lt_mapping
    ENDLOOP. " i_t_var_range
    EXIT.
    ENDIF.
    Thanks and regards

  • Assigning a Jython variable value to an ODI variable

    I have to implement database cursor functionality in ODI.
    For storing the returned values from database, I am using a Jython list.
    The next functionality that I have to implement is as follows:
    (i) For each value in the Jython list, I have to pass that value as a variable to an interface and then execute the interface
    (ii) Return back to the Jython list to get the next value in it
    (iii) Execute the interface for the new value from Jython list
    (iv) Have to execute the interface for as many values as in the list and stop when list is over.

    Hi,
    Thanks for your replies.
    I tried your method of using source as a query in procedure and using ODI startScen in the Target of the same procedure. But the scenario runs only once, and then stops even though the Source query returns 4 rows.
    Do we have to write Source and Target in separate steps of the procedure?
    Does ODI store the many records returned into some internal variables?
    I need to implement a cursor functionality so what is the best approach?
    Can i pass array variable value to some odi variables and do a loop?
    I used a workaround....it works but dont know if that's a good way of doing things:
    I retrieved all the different values that I need in a string by appending the values(this was done using Java loop).
    In my next step in the procedure I call a scenario(package which has some variables and my interface), which passes this long variable from Java as <@...@>
    Then in the package I use an iteration variable which is used to find out the SubString position so that I can extract the correct string to use for my Interface in the next step of the Package.
    It is working fine as of now.....but things could be made simpler if I could call the scenario in the Java loop, then I wouldn't need the iteration variable etc.

  • How to use SQL import to set the attribute value based on another?

    Hello all,
    I want to set an attribute of a dimension based on another attribute (if matches). Let's say I have a dimension PRODUCT. And I have defined two user defined attributes MANAGER and ISVISIBLE.
    Now within a PERMIT_READ program I want to set the ISIVISIBLE to true where the MANAGER Value is selected from a table.
    Something like
    <define a cursor c1 to select all the Manager values>
    sql import c1 into -
    :MATCHSKIPERR PRODUCT_MANAGER then <PRODUCT_ISVISIBLE (PRODUCT MANAGER) = true>
    <etc>
    Obviously the above is not correct. But I am stuck as to how this can be done? Can some one on this forum please help me with correct syntax/ approach please?
    Thanks a lot.
    Pxsheth
    This statement assigns true to the isvisible attribute for every gc_dim_bu dimension (selected as part of cursor c1).
    SO FAR SO GOOD.. NOW -
    If I want to change the above so that the attribute value gets assigned based on another attribute for the dimension (say a flag). i.e.
    Set the isvisible to true where attribute flag has a certain value. How do I code this in OLAP DML?

    There are a number of ways to do this. If you want to use an attribute that has been defined within AWM as an attribute of Product then simply using the mapping tool to populate the attribute as part of the normal dimension load procedure.
    Alternatively you could create an attribute at the DML level, and assuming you are not using surrogate keys, you can then define a cursor to read the relational table to populate your attribute. Something like this:
    sql declare MKT_BASKET cursor for -
    select PRODUCT_ID, PROD_MGR , PROD_VISIBLE -
    from PRODUCT_DIM
    if SQLCODE ne 0
    then goto ERROR
    sql open MY_CURSOR
    sql fetch MY-CURSOR loop into :append PRODUCT, :PRODUCT_MANAGER, :PRODUCT_ISVISIBLE
    sql close MY_CURSOR
    sql cleanup
    update
    commit
    If you want to create a complex PERMIT function using OLAP DML then personally I would create a formula and assign a program of type BOOLEAN and have the program return a YES or NO depending on the outcome of your test. Then your PERMIT_READ still references a dimension object. For example:
    DEFINE PROD.ISVISIBLE BOOLEAN FORMULA <PRODUCT>
    EQ PRG.ISVISIBLE(PRODUCT)
    DEFINE PRG.ISVISBLE PROGRAM BOOLEAN
    The program will then return Yes or No depending on the processing you need to do.
    Hope this helps
    Keith Laker
    Data Warehouse Solution Architect
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • Change column value based on another

    Hi, everyone.
    my version 11.1.2.2.0.
    i wanna change 1 column's value based on another column's value that be selected.
    ex: select 2rd column to 'A' , then the 1rd should be 'New Start'.
    i used EL like #{row.bindings.MacdType.inputValue eq 1 ? 'New Start' :  row.bindings.CircuitId.inputValue}.
    But it does not set the inputvalue which should binding with the DataSource.
    what's the best way to do these logic?
    pls help. thx

    Hi,Abhijit;
    ex: the frist column is a LOV, the user select "A" for the first column, so the value of the second column should be changed to 'New Start'.
    And the value should be binding to the DC, when save, the value of the 2rd column should be saved to DB.
    thx

  • How to restrict the Null Values for Key Figules in the Bex Query

    Hi Friends,
        I want to restrict the Null values of a perticular key figure in the Bex Query Output.
    I will explain in details. i have 3 key figures in my query.. let us assume.. key1 key2key3
    key1           key2                key3
    4                4                   100.00
    5                0                   200.00
    1                0                    19.00
    0                1                    10.00
    i don't want to see the the records for which key 2 is 0.
    we have a setting in the Bex Query for restricting the Zero values in the query properties. If we enable that setting it will show
    4               4          100.00
    but i want the report to display..
    4               4           100.00
    0               1           10.00
    can any body guide me. <b>i want to display the values if key2 <> 0.</b>
    Regards,
    Nagesh.

    Hi AVR,
    nice to see reply.
    can you eloborate your view...how can i put the condition.
    <b>i want to put the condition key2 <> 0.</b>
    Regards,
    Nagesh.

  • Count Distinct based on another column in the same table

    Hello,
    My question in short: is is it possible to add a new column to a view which holds the DISTINCT COUNTS of values/domains of another column in the same view?
    For example, in the below table the column "Distinct Count of Occurence" shows how many distinct values a person has in the Occurence column. So AAA has 1 and 2 therefore it is 2 distinct values etc.
    My issues is that I can retrieve unique values bu Count (Select Occurence)but I can not add the new column that would add the records to the corresponding Persons in the above table.
    Is there an easy way to achieve this on the DWH level or should it be done with MDX in the cube?
    Thanks

    Hi,
    Below a solution to use the view by adding a column with window functioning, maybe this will help.
    CREATE TABLE #TMP
    PERSON VARCHAR(10),
    OCCURENCE SMALLINT
    --DROP TABLE #TMP
    INSERT INTO #TMP(PERSON,OCCURENCE)
    VALUES
    ('AAA','1'),
    ('AAA','2'),
    ('BBB','1'),
    ('BBB','1'),
    ('BBB','1'),
    ('CCC','1'),
    ('CCC','2'),
    ('CCC','3');
    --TRUNCATE TABLE #TMP
    WITH CTE
    AS
    SELECT PERSON
    ,OCCURENCE
    ,ROW_NUMBER() OVER(PARTITION BY PERSON ORDER BY OCCURENCE) AS RN
    FROM #TMP
    SELECT PERSON, MAX(RN) AS RN
    FROM CTE
    GROUP BY PERSON
    Regards,
    Reshma
    Please Vote as Helpful if an answer is helpful and/or Please mark Proposed as Answer or Mark As Answer when question is answered

  • Crystal didn't show the BEx query Attributes description changes/Values

    We experiencing the BEx query attributes/crystal report  issue.
    I create a crystal report using BW- BEx query. Bex query displays the attributes values. But in crystal report side it didn;t show up the values as well as description changes.
    But If I change the display properties of attributes (different from one attribute to another) the crystal report reflect the values. But crystal report didn't show the Attribute description changes , the one i did it in BEx query side.
    Example:
                         Bex has a Masterdata as well as attribute Field1, Field2 etc.. I changed the description like Field_Test1 and Field_Test2. Also I changed the display property for Field_Test1 is Key and text and long , Field_Test2 is Text & LOng text.
    I  got the attribute values is crystal report Xi R2. But crystal didn't reflect the description changes?
    Suggestions Please?

    Post your question to the Business Object Integration Kits forum

  • RWI 00200 Error while scheduling the Bex Query based Webi report

    Dear All,
    I am facing the below error while scheduling the Bex Query based Webi report.
    Error:RWI 00200
    We are using BO XI 4.0 Sp05.
    Please advise

    Hi,
    I am on BO 4.0 SP05 Patch 6. Webi reports are just showing processing but not giving results. When I try to create new report it is throwing java security error.
    Tried applet patch upgrade(From link : https://websmp207.sap-ag.de/~sapidb/011000358700000902752013E) for webi certificate but didn't help.
    Please suggest what could be done.
    Thanks and Regards,
    Ankit Sharma

  • Determine variable value based on characteristic row value

    Hi all,
    Am basically looking for a bit of advice from those wiser than myself.
    I have a requirement to build an Activity per Driver report which is essentially a list of cost centres down the page, with Productive Hours (an SKF) in one column, the driver (another SKF) in the next column, and then a calculation.
    Sounds easy, however the SKF for the driver differs depending on the cost centre. . . .
    For example, cost centre 100 might be driven by ACTIV1 whereas cost centre 200 might be driven by ACTIV2 and then cost centre 300 might also be driven by ACTIV1.
    I have come up with 2 possible solutions ;
    1) Set the SKF as an attribute of the cost centre and then use this as the restriction in the report.  Easiest, most standard way of setting it up, however the problem here is that some cost centres use a number of SKFs (represented by a hierarchy node) as their activity driver.  I can't set a hierarchy node as an attribute, so I don't know how this could work for those cost centre with more than one SFK accumulating as their driver.
    2) Maintain a Cost Centre to SKF Driver mapping table in R/3 which is loaded into an ODS in BW.  Create the report using an exit variable for the driver, which queries the ODS to retrieve the appropriate SKF value(s) for each cost centre.  Could this work - not sure how I know which cost centre to retrieve the driver for in the exit coding ?
    Any suggestions would be welcomed.  Surely this can't be a unique problem.
    Many thanks,
    Blair

    I should have explained better before. I have one invoice template and we want to keep it one template for all companies. Each invoice is run individually, each companies footer is different, I am calling multiple headers and footers based on each company. Since the headers and footers are different I need to be able to add different amounts of lines and the end of each invoice depending on that company. I have accounted for the page break in my logic based on the amount lines the page is long. I just need a dynamic variable that I can assign different values on the fly.
    Thanks

  • How Can I get the value of a variable name stored in another variable?

    I have a scenario wherein i get a record as %rowtype as input parameter into my function and i generate a dynamic sql to check the validity of a particular value in one of the columns of the input parameter record.
    I have a variable that stores the column name of input parameter record whose value is to be validated.
    The dynamic SQL looks like this:
    'Select empno from emp where empname = input_rec.'||v_colname
    While using Execute Immediate I get the error - Invalid Identifiier -'input_rec'.'ename'
    On Googling I found that the input parameter is out of the scope of the SQL that's being executed in the Execute Immediate.
    Is there any way I can get the value of ('input_rec.'||v_colname) so that I can pass it into the Execute Immediate with 'Using' clause?

    karthyk wrote:
    I have a scenario wherein i get a record as %rowtype as input parameter into my function and i generate a dynamic sql to check the validity of a particular value in one of the columns of the input parameter record.
    I have a variable that stores the column name of input parameter record whose value is to be validated.
    The dynamic SQL looks like this:
    'Select empno from emp where empname = input_rec.'||v_colname
    While using Execute Immediate I get the error - Invalid Identifiier -'input_rec'.'ename'
    On Googling I found that the input parameter is out of the scope of the SQL that's being executed in the Execute Immediate.
    Is there any way I can get the value of ('input_rec.'||v_colname) so that I can pass it into the Execute Immediate with 'Using' clause?compose the SELECT in a single VARCHAR2 variable before passing variable to EXECUTE IMMEDIATE

  • Variable replacement path with another variable

    Hi Guru's
    I'd like to use the functionnality of replacement path from a variable.
    Well, i have variable V_1 which is a basic manual entry variable based on a date infoobject. this variable is not mandatory and accessible.
    And i have the variable V_2 which should be based on V_1 so i created V_2 with a process replacement path and in the replacement tab i put V_1 (i try with the list but i didn't find my V_1)
    But the result is that V_2 is always empty but i have no problem when i check the query
    So do you have any idea ?
    Why i can not see the V_1 in the list of variable from the replacement ?
    I don't want to use by exit. i know that it is possible but i want to use the main simple functionnality for flexibility is maintenance by users.
    Thanks for help
    Cyril

    thanks for your answer,
    svu123, my V_1 variable is of course in a correct status to be used. i made test in first without V_2.
    And when i create V_2 in the first tab i activated correctly the replacement in processing type. if not i can not choose
    the query or variable source and i can not see the list of variables.
    Rakesh, i tried what you answered without results. i check different variables that are available in the list and i have
    lots of different variables (all in ready for input) but i have interval, multiple single values, SAP standard variables my own variable on other fields.
    any other ideas ?
    many thanks
    Cyril

  • Filter EPM Property values based on another property in same dimension

    Hi,
    I need to restrict property values of a Dimension based on selected value of another property of the same dimension.
    For example, in Material Dimension, I have properties Planner and LOB
    Material
    Planner
    LOB
    100
    ABC
    LOB1
    200
    ABC
    LOB1
    300
    XYZ
    LOB2
    The Planner will select a Planner Name, based on which the corresponding list of materials should be shown along with LOB.
    I have tried EPMDimensionPropertyValues but it doesnt allow to restrict the IDs based on another filter condition.
    Please help.

    Thanks everyone for the response.
    As mentioned in the post, the requirement is a bit twisted.
    Let me rephrase the requirement:
    I need to have two dropdowns ( which should act as filters to the template).
    MATERIAL diemnsion has a property PLANNER.
    I need to have the first drop down as list of all PLANNERS ( I could do this easily by EPMDimensionPropertyValues).
    For the next dropdown, I need to show only those MATERIALS which has PLANNER1 ( lets say, PLANNER1 was selected in the first dropdown).
    I am facing issues for the second dropdown, as I cannot have a condition to show the Property (ID) values in EPMDimensionPropertyValues
    Also note that MATERIAL is not present in the report ( this is because we need a different aggreagation for material in the report) so we cannot use EPMDiemnsionOverride.
    Please help.

Maybe you are looking for

  • Crystal Report 9 crashes while trying to connect to Oracle

    Post Author: sminabe CA Forum: General Hi,I'm having trouble with Crystal Report 9 and wondering if someone could give me a clue.When I try to connect to Oracle using "Refresh" button, Crystal Report 9 crashes everytime.And, the following error appea

  • Error while inserting attachements data into  FND_LOBS

    Hi, I m trying to insert data into fnd_lobs using below, I didn't declare any variables for below. I m getting many compilation erros for below insert, Could you let me know if i have to declare any of below values. INSERT INTO fnd_lobs            (f

  • Mini to RCA? Yes I did some searching... aud 2

    Yes I did some searching and read some previous posts but I'm still a little confused. I have an audigy 2 zs, and from what I read in the sticky and some other posts, I can use a mini-RCA cable to run sound to my surround system. But that sound will

  • Error: Cannot display Gantt chart in PWA 2010

    Hi, With a brand new instance of Project Web App 2010, I cannot display any project Gantt Chart: "Error: cannot display this view". NB: on the client Win 7 PC, there are several versions of  MS Office installed: 2003; 2007, 2010. I was told that this

  • A dynamic tree question

    i have found some example about how to create dynamic trees... and also found and example wich is similiar to my case on how to Building a hierarchical tree from recursive tables(Frank Nimphius' Blogbuster).... i have a answer.... i want for the same