Lookup number in range variable

i am working on a table in which three header cells have been merged into one:
table-1
–––apple––pear––peach–
2|–A–B–C|D–E–F|G–H–I
3|–J–K–L|M–N–O|P–Q–R
4|–S–T–U|V–W–X|Y–Z–a
from another table there are two cells i use that look up the value in the first table
table-2
–––––y––––z–––––––––––
2|–apple––2–– =formula
=HLOOKUP('table-2'::z2,'table-1'::$A$1:$J$4,MATCH('table-2'::y2,'table-1':: $A,0),0)
this returns A as expected, in essence 'table-1::b2'. my problem is how do i specify the columns underneith 'table-1::apple' so i can get to the values of B and C ('table-1::c2' and 'table-1::d2')
is their a way to put the range of apple into a variable like in excel?–or some other way to look up the other values with the information i have?-or do i just need a better way to rearrange my headers?
thank you for any advice

If I understand correctly your problem, your friend is the OFFSET() function which may return a calculated range of cells.
Yvan KOENIG (from FRANCE lundi 9 mars 2009 18:38:48)

Similar Messages

  • Posting Period Range variable - Using Offset

    Hi:
    I need to create queries for each quarter.  Without going through detail, some of my columns in my report I need to use the first two months of the quarter and some of the other columns I need to use the 3 months in each quarter.
    So for example:  We are right now in quarter 1; Jan, Feb, and Mar. Some columns I will be using a range of 1 to 2 and the rest I will be using a range of 1 to 3.  The same type of logic for the other 3 quarters.  I have a posting period variable (Characteristic value) and I was hoping that I was going to be able to use the offset option when I restricted my variable in each column that I only want period 1 and 2.  But when I run the query I don't get any results.  I know that the offset works with "fix" values but it seems not to work with a "range".
    I'm trying to stay way of creating the same queries for each quarter where the difference is only the posting period.
    Does anybody have any idea how I can accomplish this?  Has anybody ever had to do something like this?
    Your thoughts comments will be greatly appreciated!
    Regards,
    Helena

    Hi Arun:
    I know I can restrict the values that I want but I'm trying to avoid in having to create 4 queries..One per quarter.  I'm trying to see if I can just have 1 query and use a range variable which I have already defined as a characteristic value and it's a range.  I use the user exit to populate the initial values depending on the posting period at the time the query runs.  Right now the variable screen will show 1 on the from and a 3 on the to.
    The columns that need all three months are coming out fine in the report.  The issue that I'm encountering is the columns that I only need the two months in this case 1 and 2.  What I did here is still using the same range variable and restrict it with an offset of -1.  When the query  runs, this column comes up with no data.
    How can I get around this?
    Thanks for your help!
    Helena

  • How can I set the Computer Serial Number as a Variable?

    Hey everyone, need some help here,  I need to get some data from a workstation using a script.  What I would like to do is "echo" the serial number of the workstation to certain spots in the data file.  The only way I know how to
    do this is by setting the serial number as a variable and doing a echo %SERIALNUMBER%.
    How can I do this?
    I found the WMIC key:
    wmic bios get serialnumber
    doesn't help much though.

    Hi usgrcm,
    What is your current situation?
    Will the scripts suggested by Frederik Long work here to meet your needs?
    Besides, regarding scripts issue, if any further help needed, we could also ask in Microsoft Scripting Guys forum:
    The Official Scripting Guys forum!
    https://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
    Best regards
    Michael Shao
    TechNet Community Support

  • Can we create range variable for Query Key Date

    Hello Gurus,
    Can we create a range variable for Query Key Date ? when I tried to give a range of values for Query Key Date, I am unable to find Range Values option. I found only Single Values.
    so, Please let me know if we can use Range variables for Query Key Date ??
    Thanks in advance,
    Regards,
    Aarthi

    Hi Aarthi,
    This is relevant for the time dependant master data that is being pulled in thw query. Like if you are using a nav attr in the query and this nav attr is time dependant, then which record (from the char master data) is to be pulled into the report, depends upon the key date that you specify.
    The default key date value is the date on which the query is executed, that is <Today>.
    Hope this helps...

  • Unknow number of binding variables in Dynamic SQL

    I have to use a dynamic sql and binding variables. The problem is the number of binding variable varies due to the form input.
    EX.
    if ( something is not null ) then
    query := query || ' and column = :column';
    end if;
    if ( something_else is not null ) then
    query := query || ' and another_column = :another_column';
    end if;
    When I use in my USING clause, I don't know which of the four combinations of column/another_column I could be
    open query;
    open query using A,B;
    open query using A;
    open query using B;
    How can I solve this problem?
    Thanks a lot!

    Always with NVL:
    query := query || ' AND column = NVL(:column,column ) AND another_column = NVL(:another_column,another_column)';Invoke:
    DECLARE
      a_null CHAR(1); -- set to NULL automatically at run time
    BEGIN
      --open query
      open query using (a_null,a_null)
      --open query using A,B
      open query using A,B;
      --open query using A
      open query using A,a_null;
      --open query using B
      open query using a_null ,B;
    END;
    /Edited by: jortri on 04-dic-2008 18:34

  • Passing values to range variable

    Hi,
    I am using a range variable in the planning function.
    In WAD, I am using two dropdown box for selecting the from and to range.
    I am calling the planning function from WAD, on a button click.
    In Data binding, i could bind the variable, to only one dropdown box.
    How to pass the from and to values to the variable from two dropdown box.
    Thanks in advance for your help.
    Regards,
    Suresh.

    Hi,
    See if this helps
    http://wiki.sdn.sap.com/wiki/display/BI/BI-IPPassingVariableValuestoPlanningFunctionsfromBEx+Analyzer
    pratyush

  • Range variable

    Hi!
    I have a question of a range variable in Analyzer.
    I have 2 Characteristics (Start date and End Date) and I created a restricted Key Figure that has a 0NET_VALUE and I want to restrict this Key Figure with the range of the Start date and the End Date. When I create a Range Variable it´s only give me the option to create a Range for one Characteristic (Start Date or End Date).
    What can I do to solve this issue?
    Thanks a lot!
    Regards.

    if you want to restrict 0NET_VALUE for the date range Start_date and End_date then please follow the following steps:
    1. Create a restricted key fig
    2. include 0NET_VALUE
    3. include Start_date and End_date as well
    4. for Start_date, pick the value range Greater than equal to
    5. for End_date , pick the value range less than equal to.
    save it.

  • Can we specify the next screen number with a variable?

    hi
    can we specify the next screen number with a variable?

    yes, dynamicaly u can. i.e using set screen or call screen.
    but u cant obviously set a variable in the attributes.

  • Try: Assign The Error Number To A Variable

    Hi, All!
    I know there must be a way to do this, but I can't find it.
    In the 'On Error' part of a Try, is there a way to set the error number to a variable?
    So, I'd like it to look something like this:
    on error
    set errorNum to [the error number]
    if errorNum =
    Something like that.
    How do I do that?
    Thanks in advance!
    Any help much appreciated!
    -Nate

    The error number is a number, not a text string
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    try
    display dialog "Generate an error?" default answer "script generated error"
    error text returned of the result -- make a custom error
    on error errorMessage number errorNumber
    if errorNumber is -128 then
    -- do nothing (cancel)
    else
    display alert "Error " & errorNumber message errorMessage
    end if
    end try
    </pre>

  • Text Not Found. Message Number: ZJV 001 Variable: CPZZZZ ZZZ 3303001 Accoun

    All!
    We are currently posting payroll results to our accounting system and everything is working fine just untill last week.
    There were a few simulations over the weekend and the following error occrued.
    Text Not Found. Message Number: ZJV 001 Variable: CPZZZZ ZZZ 3303001 Account
    Could some one throw some light on what exactly this error is referring to..and the content we are missing here.
    Thanks & Regards,
    Vikram. B

    Dear Vikram,
    I don't think this message is SAP standard, the number start with Z* which make me think that it is custom made.
    I could not find similar message in our system.
    Please check your user exit/Badi's or custom modification if any.
    Best regards
    Sarah

  • I had an iphone 3GS, but received my new iPhone 5 with micro sim, but wanted to keep old mobile number so rang up to change it, that's all working fine, but iMessage is still using the number I received with iPhone, how do you delete a new number?

    I had an iphone 3GS (normal sim), but received my new iPhone 5 with micro sim, but wanted to keep old mobile number so rang up to change it, normal text messaging is working fine, but iMessage is still using the number I received with iPhone 5, how do you delete that number I can only receive iMessages on my original number?

    Issue solved

  • Material document number's range issue

    Dear Friends,
    We are  facing Material document number's range issue i.e. For year 2010, 5000202085 number  does not exist but higher number 5000202691, 5000203284 exists in system. 
    why the number 5000202085  is missing?
    I checked in the system for  relevant setting at tcode OMBT with year 9999 are okay.
    Can you pls help me in getting it resolved?
    Rgrds,
    Pradeep Jain

    I had the same question so I searched, that should always be the first step before posting a question.
    No points to me please as this answer is not from me!
    Search results show:
    Answer from: Mauro Bianchi  (SAP moderator)
    This issue with the internal number assignment occurs due to bufferingin the application server. Buffering increases the performance of theserver and documents don't loose their properties. Nevertheless, it may cause gaps in the internal number assignment and sometimes the numbers may not be chronologically assigned. As I stated before, this won't cause inconsistencies in the system and is usually not an inconvenient, unless you require sequential number assignment in your documents due
    to legal reasons. In this case, you'll have to disable buffering in the application server.
    in order to disable buffering Just access transaction SNRO and enter the Object type MATBELEGhttp:// Number Range for Material and Phys. Inventory Document In change mode, in the menu bar, please, follow the path:
    Edit -> Set-up buffering -> No buffering
    Check note 62077 which describes this issue in detail

  • Input field for Range variable

    I am trying to create a basic VC application based on SAP BI query. The query has a variable that is a Fiscal period range.  I can input a Range, like  001/2009 - 005/2009. This input works fine in BI query, but VC returns error Invalid variable value. How to make the VC to accept the input value with Fiscal year Range.
    Appreciate your help.

    Hi
    In VC syntax for entering variable value is different than the BI query. For the same thing which you have mentioned, you have to enter it as -
    001.2009:005.2009.
    Then only it will accept the values.
    Regards
    Sandeep

  • How execute a dynamic statement with a variable number of bind variables

    Hi all.
    I would like to execute SQL statements in a PL/SQL function.
    SQL statements must use bind variable in order to avoid parsing time. But the number of arguments depends on the context. I can have from 10 to several hundreds of arguments (these arguments are used in a 'IN' clause).
    To minimise the number of differents signature (each new signature involve a parsing), the number of argument is rounded.
    My problem is : how to set dynamicaly the bind variables ?
    Cause it is pretty simple to construct dynamicaly the SQL statement, but using an
    " OPEN .... USING var1, var2, ..., varX "
    statement, it is not possible to handle a variable nomber of bind variable.
    I am looking for the best way to do the same thing that it can be done in java/JDBC with the PreparedStatement.setObject(int parameterIndex, Object x).
    I saw the dbms_sql package and bond_variable procedure : is a the good way to do such a thing ?
    Thanks

    If the variation is only values in an IN list, I would suggest using an object type for the bind variable. This lets you have just one bind variable, regardless of how many values are in the IN list.
    The dynamic SQL ends up looking like:
    ' ... where c in (select * from table(:mylist))' using v_list;where v_list is a collection based on a SQL user-defined type that can be populated incrementally, or in one shot from a delimited list of values using a helper function.
    I use this approach all the time in dynamic searches.
    See this link for more details:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:110612348061

  • Want to fill number of ranges through a common form - how?

    I have a number of select-options and ranges I want to add values to when processing a screen where I am using selection screen as a subscreen in my dialog programme.  What I want to be able to do is to call a form passing the range/select option and the values to fill like this:
    example:
    ranges: r_date for sy-datum,
            r_cust for kna1-kunnr.
    LOOP AT ITAB.
    perform fill_range tables r_date
                       using  ITAB-DATE.
    PERFORM FILL_OPTION  tables  r_cust
                         using  ITAB-KUNNR.
    ENDLOOP.
    The problem I have is that when I try and define the a generic structure for the tables within the FORM it keeps telling me that R_DATE is too short.  I am using RSVDATYN as the structure but I have tried other structures that mimic the range structure of SIGN,OPTION, LOW and HIGH.  The only thing I can think of is that because my LOW and HIGH fields are different it won't pass the value or convert it.
    Is it even possible to do this or do I have to code each range/select-option separate like this without passing this into a generic form to be filled:
    r_date-sign   = 'I'.
    r_sign-option = 'EQ'.
    r_date-low   = value.
    append r_date
    Any ideas?

    Hi,
      You can write a macro instead..
      For example,
      DEFINE fill_range.
        &1-sign = 'I'.
        &1-option = 'EQ'.
        &1-low = &2.
        APPEND &1.
      END-OF-DEFINITION.
      ranges: r_date for sy-datum,
              r_cust for kna1-kunnr.
      LOOP AT itab.
        fill_range r_date itab-date.
        fill_range r_cust itab-kunnr.
      ENDLOOP.
      Hope this helps..
    Sri

Maybe you are looking for