Personalisation - 'Launch a Function' using variables as parameters

I am trying to call a function from another form using Built In 'Lanch a function'.
In Add parameters, If I provide hardcoded values, its working fine. When I try to pass variables such as :GLOBAL.XX_ITEM_ID or ${item.folder.item_id.value} ,
it errors out
When I use GLOBAL variable, the error is 'Type does not match definition in form XXX ' I tried using to_char , to_number but no use.
When I use item.folder.item_id.value it errors out with 'FROM keyword not found'
I tried putting them in single quotes, pipes etc.
Can anybody tell me how to pass variabes while launching a function?
Thanks a lot.

I just solved it. Used the following syntax
'G_QUERY_FIND=PO_LINE_LOCATION_ID
PO_LINE_LOCATION_ID='||${global.xx_po_line_location_id.value}

Similar Messages

  • Repost Function using Variable is not working

    Hello experts!  I am on BW-BPS 3.5.  I have set up a repost function using variables to change a characteristic value for Business Unit.
    1. I created 2 variables as Bus.Unit From and Bus.Unit To in the Planning Area. I am not using the variables in my planning level.
    2. I entered the variables in the parameter group New Values area for the From and To Values.
    3. My goal is when the user executes the Repost Function for a Variable Prompt should appear and have the user select the From Business Unit and To Business Unit.
    The Variables are set up as USERVALUE User-Defined Values, Restriction of Values required by user and I have tried with/without option of Input Allowed by User. 
    Can you tell me what I am doing wrong, I expected a variable prompt when executing the Repost Function but it does not work.
    Thank you,
    Teri

    Ravi, Thank you for your reply however I contiue to have errors or the execution does not repost (change any value) as noted below.
    1. I have 2 Variables in Planning area var1 (from) var2 (to) for the same charateristic which is Business Unit
    2. Business Unit is in the level,  on the selection tab to add the variable I can only add 1 variable, So I added var1 (from) to the level. 
    3. Parameter group for old and new values - I have Var1 (from), var2 (to)
    4. Report Function - are you referring to Reporting variables in BPS? I have set this up as suggested in the "How to Use Reporting Variable in BW-BPS" document.
    5. Enter plan data: I receive prompt for VAR1, mandatory. At this point there is no value in Var2.
    6. Execute Repost function - I receive an error to "Restrict Var2"
    7. If I set variable values and add a value for Var2 I receive an error "The generated data is not contained in the selection condition".
    Next I removed VAR1 from my planning level and turned on the option 'Selection in package' for Business Unit. This seems to work well.
    What do you recommend?
    Thank you,
    Teri

  • Explain how to implement prompt functionality using @variable

    Hi all,
    Anyone please explain how to implement prompt functionality using @variable.
    We got some sql reports.Those reports have to be converted into BO free hand sql report.
    Please provide any best practices for converting sql reports into BO free hand SQL.
    Thanks & Regards,
    James Charle

    Hi
    Please refer "@Variable" section  in page number 601, in http://help.sap.com/businessobject/product_guides/boexir31SP3/en/xi31_sp3_designer_en.pdf
    Regards
    Ashwini

  • Distribute Planning Function(Using Variables)

    Hi All,
    I'm trying to distribute KeyFigure value between months.
    For example:Between Jan2005 and April2005 i want to distribute values.
    4000 gets distributed as below:
    Jan2005 - 1000
    Feb2005 - 1000
    Mar2005 - 1000
    Apr2005 - 1000
    I want user to select from CalYear/month and To CalYear/month from WebInterface dynamically.
    But,Distribute from Sender to Receiver planning function is not allowing me to use two variables From and To.
    It is allowing me to use only one Variable.
    Could u please suggest me how to use two variables in distribute planning function.
    Thanks in advance,
    Pat.

    Hello Saritha,
    A variable in the BPS can contain a single value or/and a range of values. In the definition of the planning function you can specify an interval by entering the from value and the to value or by choosing one variable containing this interval. This is why the system behaves the way you described it.
    What can you do? Use a variable of type Exit in the definition of the planning function. Use two additional variables in the web interface so the users can enter a from and a to value. Now in the exit (for the exit variable)you read the two values and return the interval. You can find the necessary coding and a more detailed description of such a scenario in the BPS how to guide "How to... Variables of type Exit".
    Best regards,
    Gerd Schoeffl
    SAPNet Weaver RIG BI

  • Variables or parameters in Sender JDBC Adapter.

    Hi,
    I have the following question:
    Is there any way to use variables or parameters when specifying the WHERE clause of a SQL SELECT statement or when using a Store Procedure in a Sender JDBC Adapter? If so, can anyone give an example.
    Thanks in advance.
    Sebastian Pereira.

    Hi Sebastian,
                   The links mentioned below will help you in this regard:
    Using a stored procedure for a  sender jdbc adapter
    Stored Procedure in sender JDBC
    JDBC Sender - Oracle Stored procedures
    Reward with points if helpful
    Regards
    Sai Ganesh

  • Using functional global variables to transfer data between touch screen device and other targets

    Hi,
    We are currently developing a control system that will operate on a cRIO with a touch screen interface. During development we have been using functional global variables (FGVs) to handle most of the settings/data etc, however we have just realised that we may have an issue updating the data on the touch screen, and vice versa.
    Previously we have implemented similar programs using shared variables, however we were wondering if there is anyway to implement FGVs in a similar manner, whether it'd be a combination of FGVs and shared variables.
    Regards,
    Mike
    Software version: Labview 8.2.1

    See this thread on LAVA about sharing FGV's across projects. THis should be extendable to cross paltforms (I believe).
    You also may want to concider an upgrade to LV 8.5.1. We have found a number of performance related issues with LV 8.2.1 and RT.
    If you decide not to upgrade, just remeber what I wrote (above) when you have reason to question the performance.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?

    Hi All,
    I am new to TestStand. Still in the process of learning it.
    What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?
    Thanks in advance,
    LaVIEWan
    Solved!
    Go to Solution.

    Hi,
    Using the Parameters is the correct method to pass data into and out of a sub sequence. You assign your data to be passed into or out of a Sequence when you are in the Edit Sequence Call dialog and in the Sequence Parameter list.
    Regards
    Ray Farmer

  • Using variables in a button function

    I am new to AS3 and building a simple flash banner. There
    will be four movie clips consisting of just one word each (in the
    sample below I'm just using rectangle for now). When moused over
    each word will show a rectangle with a message in it, like a large
    tool tip. I have a rudimentary version working fine, see code
    below.
    Question 1: Is there a way to just write on function which
    will work with all four buttons changing the message, say using
    variables like AS2?
    Question 2: Does the code below look relatively efficient?
    I'm sure there are better ways to write it.
    Here's a link to the rudimentary version,
    http://www.rivergraphics.net/tests/button3.html,
    that should give you an idea of what I'm trying to do.
    Thanks.

    Simply use the information that's passed along with the event
    to figure out which item raised the event. Then you can easily call
    the other items that correspond to the button raising the event.
    TS

  • How to  use data function using characterstics variable for calculation on

    how to  use data function using characterstics variable for calculation on  attribute as key figure

    Hi Gayatri
    Did you not see my answer for CASE because CASE does indeed offer the use of the BETWEEN clause, but DECODE does not. Let me give you a little synopsis of DECODE.
    In its most simple form it takes 4 values and looks like this: DECODE(A, B, C, D)
    This essentially means, IF A = B THEN C ELSE D
    The trick to solving BETWEEN in a DECODE is to work out algoriths where A = B. Because we don't know how many values are between 00 and 99, although I could guess there were 100 we could of course have 100 parts in the DECODE but that would be awful. How about if we look at it another way and say this:
    IF PART_NUMBER < 'SDK00' THEN pay_amount
    ELSE IF PART_NUMBER > 'SDK99' THEN pay_AMOUNT
    ELSE pay_amount + 100
    This statement only had 2 hard coded values, but how to make DECODE work with less than? Easy, we use the LEAST function. The LEAST function takes 2 values and returns the one with the lowest value. So I use LEAST(PART_NUMBER, 'SDK00') then whenever the PART_NUMBER is lower than SDK00 it will be true. A similar situation exists for the opposite function GREATEST. Putting all of this together then, you can do this:
    DECODE(PART_NUMBER, GREATEST(PART_NUMBER, 'SDK00'), DECODE(PART_NUMBER, LEAST(PART_NUMBER, 'SDK99'), PAY_AMOUNT * 100, PAY_AMOUNT), PAY_AMOUNT)
    In English this can be read as follows:
    IF the PART_NUMBER is greater than or equal to SDK00 and the PART_NUMBER is less than or equal to SDK99 THEN PAY_AMOUNT x 100 ELSE 0
    Best wishes
    Michael

  • Using variable coulmn name in sql function

    Hi there,
    I am not an expert with PL/SQL and I can not figure out how to use variable column names in my function.
    My function is:
    CREATE OR REPLACE FUNCTION RESET_TRIGGERS(aTrigger VARCHAR2) RETURN NUMBER IS
    TEMP_ID NUMBER;
    TEMP_USER_ID NUMBER;
    BEGIN
    SELECT 'LIMS.'||'$aTrigger'||'.NEXTVAL' INTO TEMP_ID FROM DUAL;
    SELECT 'LIMS.'||'$aTrigger'||'_USER.NEXTVAL' INTO TEMP_USER_ID FROM DUAL;
    IF TEMP_ID > TEMP_USER_ID THEN
    LOOP
    SELECT LIMS.SQ_U_FINALRESULT_USER.NEXTVAL INTO TEMP_USER_ID FROM DUAL;
    EXIT WHEN TEMP_USER_ID = TEMP_ID;
    END LOOP;
    ELSE
    WHILE TEMP_ID < TEMP_USER_ID LOOP
    SELECT LIMS.SQ_U_FINALRESULT.NEXTVAL INTO TEMP_ID FROM DUAL;
    END LOOP;
    END IF;
    COMMIT;
    RETURN (TEMP_ID);
    END;
    What I want is that I pass a seqencename with aTrigger and that two triggers will be equal if not.
    eg ifaTrigger = 'SQ_U_FINALRESULT'
    than I want the triggers LIMS.SQ_U_FINALRESULT and LIMS.SQ_U_FINALRESULT_USER to be set equal.
    The above function will not work, but what will?????
    I hope you can help me out!
    Cheers

    A very strange function indeed.
    But here is what I think he meant to do:
    SQL> create procedure reset_sequences
      2  ( p_sequence_name in  varchar2
      3  , p_nextval          out number
      4  )
      5  is
      6    l_nextval1 number;
      7    l_nextval2 number
      8    ;
      9    procedure reset_sequence_value
    10    ( p_sequence_name in varchar2
    11    , p_current_value in number
    12    , p_new_value     in number
    13    )
    14    is
    15      l_dummy number;
    16    begin
    17      execute immediate 'alter sequence ' || p_sequence_name || ' increment by ' || to_char(p_new_value-p_current_value);
    18      execute immediate 'select ' || p_sequence_name || '.nextval from dual' into l_dummy;
    19      execute immediate 'alter sequence ' || p_sequence_name || ' increment by 1';
    20    end reset_sequence_value
    21    ;
    22  begin
    23    execute immediate
    24      'select ' || p_sequence_name || '.nextval,' || p_sequence_name || '_user.nextval from dual'
    25    into l_nextval1, l_nextval2
    26    ;
    27    if l_nextval1 < l_nextval2
    28    then
    29      reset_sequence_value(p_sequence_name,l_nextval1,l_nextval2);
    30    end if
    31    ;
    32    if l_nextval1 > l_nextval2
    33    then
    34      reset_sequence_value(p_sequence_name || '_user',l_nextval2,l_nextval1);
    35    end if
    36    ;
    37    p_nextval := greatest(l_nextval1,l_nextval2)
    38    ;
    39  end reset_sequences;
    40  /
    Procedure is aangemaakt.
    SQL> show err
    Er zijn geen fouten.
    SQL> create sequence testseq start with 5 increment by 1
      2  /
    Reeks is aangemaakt.
    SQL> create sequence testseq_user start with 2 increment by 1
      2  /
    Reeks is aangemaakt.
    SQL> declare
      2    l_new_value number;
      3  begin
      4    reset_sequences('testseq',l_new_value);
      5    dbms_output.put_line(l_new_value);
      6  end;
      7  /
    5
    PL/SQL-procedure is geslaagd.
    SQL> select testseq.currval from dual
      2  /
                                   CURRVAL
                                         5
    1 rij is geselecteerd.
    SQL> select testseq_user.currval from dual
      2  /
                                   CURRVAL
                                         5
    1 rij is geselecteerd.Regards,
    Rob.

  • What are variables or parameters in Apex and how to use them?

    Hi
    What are variables or parameters in apex and how to use them to connect and run BI Publisher Report
    From Apex URL

    Hello Kanaiya,
    You should go here: http://www.oracle.com/technology/products/database/application_express/index.html
    Look at "What is Oracle APEX?" then download the documentation and review the various PDF files that are available.
    If you have a version of APEX installed and available, go through the 2-Day Application Express Developer's Guide followed by the Advanced Developer's Guide.
    Good luck,
    Don.

  • Using Variables in a "Report Custom Functions"

    Hi!
    I created a custom function using Basic Syntax where I am trying to declare/use variables.  I keep getting syntax errors and don't know why.  Here is my code so far:
    Function cdQSIPeriod () As String
    YY = Year(CurrentDate)
    MM = Month(CurrentDate)
    If MM = 1 then
        MM = 12
        YY = YY - 1
    else
        MM = MM - 1
    cdQSIPeriod = String(MM)& String(YY)
    End Function
    Any help you can provide will be appreciated.

    You need to add
    dim YY as number
    dim MM as number
    HTH,
    Carl

  • Use variables in ParallePeriod function in MDX

    Hello, I am using PARALLELPERIOD () function in MDX. the syntax is
    PARALLELPERIOD([Date].[Calendar Hierarchy].[Year],1,[Date].[Calendar Hierarchy].[Date].&[20131201]). My question is can i use two variables in this? like PARALLELPERIOD( @Level,1,@Member). I know we can do PARALLELPERIOD([Date].[Calendar Hierarchy].[Year],1,@Member).
    With this two variables, i can use same query for calendar hierarchy and week hierarchy etc. Please let me know your thoughts. A work around solution is also fine.
    or can I derive @level from @member on the fly? something like PARALLELPERIOD( @Member.level,1,@Member)
    thanks in advance.
    prajwal kumar potula

    You can use variables like that client side.  That may be a .NET function that generates MDX, or SSRS does the same thing.
    Regarding whether you can derive @Level from @Member, yes you can.  Once you have substituted @Member in the query, you can use the .Level function, so it would look like this - after substitution:
    PARALLELPERIOD( [Date].[Calendar Hierarchy].[Date].&[20131201].Level,
    1,
    [Date].[Calendar Hierarchy].[Date].&[20131201]
    Christian Wade
    http://christianwade.wordpress.com/
    Please mark correct responses as answers!

  • Is it possble to use out/inout parameters in function?

    Is it possble to use out/inout parameters in function?

    Hi,
    user10784864 wrote:
    But I can't call the function from SQL if it contains DML statements also right?Right.
    I know of two separate and independent reasons why fucntions with OUT arguments (or IN OUT arguments; I'll just say OUT in the remainder of this message)might not be a good idea.
    (1) They can be confusing, and
    (2) you can't call them from SQL statements.
    My reasons for (1):
    They are potenially confusing, because people usially expect the function value (alone) to pass information back to the caller. I like to write code that works. I like to avoid writing code that doesn't work, even if the reason is simply because someone else didn't read the documentation carefully. Notice I didn't say "Never write a function with OUT arguments", I said think carefully before you do. I believe there are good uses for such functions. I also believe that there are good uses for duct tape, and those good uses account for maybe 1% of the actual applications. (By the way, DML in stored procedures is another thing that is done far more often than it should.)
    If one of these reasons doesn't apply in your case, you should still consider the other reason.

  • How to use multiple selection parameters in the data model

    Hi, after have looked all the previous threads about how to use multiple selection parameters , I still have a problem;
    I'm using Oracle BI Publisher 10.1.3.3.2 and I'm tried to define more than one multiple selection parameters inside the data template;
    Inside a simple SQL queries they work perfectly....but inside the data template I have errors.
    My data template is the following (it's very simple...I am just testing how the parameters work):
    <dataTemplate name="Test" defaultPackage="bip_departments_2_parameters">
    <parameters>
    <parameter name="p_dep_2_param" include_in_output="false" datatype="character"/>
    <parameter name="p_loc_1_param" include_in_output="false" datatype="character"/>
    </parameters>
    <dataTrigger name="beforeReport" source="bip_departments_2_parameters.beforeReportTrigger"/>
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    select deptno, dname,loc
    from dept
    &p_where_clause
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_DEPT" source="Q2">
    <element name="deptno" value="deptno"/>
    <element name="dname" value="dname"/>
    <element name="loc" value="loc"/>
    </group>
    </dataStructure>
    </dataTemplate>
    The 2 parameters are based on these LOV:
    1) select distinct dname from dept (p_dep_2_param)
    2) select distinct loc from dept (p_loc_1_param)
    and both of them have checked the "Multiple selection" and "Can select all" boxes
    The package I created, in order to use the lexical refence is:
    CREATE OR REPLACE package SCOTT.bip_departments_2_parameters
    as
    p_dep_2_param varchar2(14);
    p_loc_1_param varchar2(20);
    p_where_clause varchar2(100);
    function beforereporttrigger
    return boolean;
    end bip_departments_2_parameters;
    CREATE OR REPLACE package body SCOTT.bip_departments_2_parameters
    as
    function beforereporttrigger
    return boolean
    is
    l_return boolean := true;
    begin
    if (p_dep_2_param is not null) --and (p_loc_1_param is not null)
    then
    p_where_clause := 'where (dname in (' || replace (p_dep_1_param, '''') || ') and loc in (' || replace (p_loc_1_param, '''') || '))';
    else
    p_where_clause := 'where 1=1';
    end if;
    return (l_return);
    end beforereporttrigger;
    end bip_departments_2_parameters;
    As you see, I tried to have only one p_where_clause (with more than one parameter inside)....but it doesn't work...
    Using only the first parameter (based on deptno (which is number), the p_where_clause is: p_where_clause := 'where (deptno in (' || replace (p_dep_2_param, '''') || '))';
    it works perfectly....
    Now I don't know if the problem is the datatype, but I noticed that with a single parameter (deptno is number), the lexical refence (inside the data template) works.....with a varchar parameter it doesn't work....
    So my questions are these:
    1) how can I define the p_where_clause (inside the package) with a single varchar parameter (for example, the department location name)
    2) how can I define the p_where_clause using more than one parameter (for example, the department location name and the department name) not number.
    Thanks in advance for any suggestion
    Alex

    Alex,
    the missing thing in your example is the fact, that if only one value is selected, the parameter has exact this value like BOSTON. If you choose more than one value, the parameter includes the *'*, so that it looks like *'BOSTON','NEW YORK'*. So you need to check in the package, if there's a *,* in the parameter or not. If yes there's more than one value, if not it's only one value or it's null.
    So change your package to (you need to expand your variables)
    create or replace package bip_departments_2_parameters
    as
    p_dep_2_param varchar2(1000);
    p_loc_1_param varchar2(1000);
    p_where_clause varchar2(1000);
    function beforereporttrigger
    return boolean;
    end bip_departments_2_parameters;
    create or replace package body bip_departments_2_parameters
    as
    function beforereporttrigger
    return boolean
    is
    l_return boolean := true;
    begin
    p_where_clause := ' ';
    if p_dep_2_param is not null then
    if instr(p_dep_2_param,',')>0 then
    p_where_clause := 'WHERE DNAME in ('||p_dep_2_param||')';
    else
    p_where_clause := 'WHERE DNAME = '''||p_dep_2_param||'''';
    end if;
    if p_loc_1_param is not null then
    if instr(p_loc_1_param,',')>0 then
    p_where_clause := p_where_clause || ' AND LOC IN ('||p_loc_1_param||')';
    else
    p_where_clause := p_where_clause || ' AND LOC = '''||p_loc_1_param||'''';
    end if;
    end if;
    else
    if p_loc_1_param is not null then
    if instr(p_loc_1_param,',')>0 then
    p_where_clause := p_where_clause || 'WHERE LOC in ('||p_loc_1_param||')';
    else
    p_where_clause := p_where_clause || 'WHERE LOC = '''||p_loc_1_param||'''';
    end if;
    end if;
    end if;
    return (l_return);
    end beforereporttrigger;
    end bip_departments_2_parameters;
    I've written a similar example at http://www.oracle.com/global/de/community/bip/tipps/Dynamische_Queries/index.html ... but it's in german.
    Regards
    Rainer

Maybe you are looking for

  • Error while saving a .PDF File to a mapped drive

    The issue I am having is similar to the one found on this older post. http://forums.adobe.com/message/3066663#3066663 The issue is as follows. I have a small company about 15 users divided into a couple of departments with different networking access

  • How to dunn a vendor

    how can we dunn a vendor just as we dunn a customer by selecting dunning procedure Edited by: ca sanjeev mehndiratta on Sep 25, 2008 12:11 PM

  • How to install RAM upgrade in MACBOOK?

    How do I go about installing RAM upgrade in a MacBook?

  • Table data transfer

    Hi, One basic question on table data transfer. We have a client dependant custom z table. When we transport the table's data also to quality and production, will the client field get automatically updated with the correct client number to which we ar

  • Super long render times every time I edit

    Hey all,      I would really appreciate a quick response to this. Just for some background I am using PP Cs5.5 on a Macbook Pro with 8 GB of ram and am using .mp4 files.      I have brought in an hour and a half long clip and I applied some color cor