How to use Value Variable in Report Painter Column defined as Formula

Hi Gurus,
In report painter, how can I add one field (exchange rate) in selection screen, so that user can provide the exchange rate to be used, then execute the report, the exchange rate will used to multiple local currency amount.
The reason for this is we want use provided exchange rate to convert the amount from once currency to the other currency.
Alternatively I am studying the functionality of "Value Variable" and found that I can perform the task from this. I have created the value variable but when I am using the variable in Report Painter columns as "&ZVALVAR", system is giving me error. I read the help and it states that use the variable with "&" and do it as it is mentioned.
Can anybody suggest what I need to do to make it workable.
Thanks

I did try using the presentation variable, but that does not work too. I am setting session variable in the dashboard prompt (select 'request variable'). When I use presentation variable, it hard codes the value of the variable name.
sql is
select date from work_order where facility = @{p_facility}
the physical log sql is
select date from work_order where facility = 'p_facility'

Similar Messages

  • Formula Variables in Report Painter- Syntac error in formula

    Dear Experts,
    I'm creating the report where I need to calculate annualized P&L. The formula is as follows : (P&L account/Period(variable ))*12
    I need to capture the From_period, which is entered by the user on the selection screen when running the report and use it as a variable in the formula above. Example: If User insert From Period 3, then the formula should be *P&L accoun / 3 * 12*
    I have tried so many different way but nothing seems to work. one of the ways i tried was:
    In the general selection Im using set variable 6P-S-PERIOVB.CCSS for period which consists of variable V_PERIO and B_PERIO.
    So Im trying to create a folowing formula:
    IF 1 >= u2018PER_FRu2019 AND 1 <= u2018PER_TOu2019 THEN 1 ELSE 16
    IF 2 >= u2018PER_FRu2019 AND 2 <= u2018PER_TOu2019 THEN 1 ELSE 16
    Unfortunately I keep getting Syntac error in formula. Please help me I'm really desperate to solve this issue after 5 days of unlucky research.
    Thank you in advance
    Regards
    Ernesta

    so, I would use parameters.....
    P_fr_MO(2) TYPE N DEFAULT '01',
    p_fr_yr(4) type n default '2011'.
    Then, to set my range, i would do something like....
    data: lv_to_mon(2) type n,
             lv_to_yr(4) type n.
    if p_fr_mo eq '01'.
      lv_to_yr = p_fr_yr.  "12th month, same year...
    else.
    lv_to_yr = p_fr_yr + 1.  "any other month puts us into next year.
    endif.
    case p_fr_mo.
      when '01'.
       lv_to_mon = 12.  "always for 12 month period...
    when others.
       lv_to_mon = p_fo_no - 1.  '''example 10/2010 to 09/2011.
    endcase.
    then concatenate the from and to variables into what format is needed to read the data...
    on the other hand, if the user gives us from and to, we have a different problem....one then has to calculate what part of a year they have and create a factor for multiplying any data values....
    for instance if user says Jan (01) to (03) March, then I know that to month - from month + 1 is the number of months I have....
    then 12 / that number is the factor to multiply the results by....
    example...
    data : factor(5) type p decimals 2
              months(3) type n.
    if p_to < p_from.  "adjust if I cross a year boundary....Oct to Jan becomes 13 - 10 + 1 or 4 months.
    p_to = p_to + 12.
    endif.
    months = p_to - p_from + 1.
    factor  = 12 / months.  " factor   12 /4 months = 3 times the values obtained  = 1 year.
    something like this....hope this is helpful to you.
    Edited by: DaveL on Oct 18, 2011 6:24 PM

  • Formula Variables for Report Painter- Syntac error in formula, Please Help!

    Dear Experts,
    I'm creating the report where I need to calculate annualized P&L. The formula is as follows : (P&L account/Period(variable ))12*
    I need to capture the From_period, which is entered by the user on the selection screen when running the report and use it as a variable in the formula above. Example: If User insert From Period 3, then the formula should be *P&L accoun / 3 * 12*
    I have tried so many different way but nothing seems to work. one of the ways i tried was:
    In the general selection Im using set variable 6P-S-PERIOVB.CCSS for period which consists of variable V_PERIO and B_PERIO.
    So Im trying to create a folowing formula:
    IF 1 >= u2018PER_FRu2019 AND 1 <= u2018PER_TOu2019 THEN 1 ELSE 16
    IF 2 >= u2018PER_FRu2019 AND 2 <= u2018PER_TOu2019 THEN 1 ELSE 16
    Unfortunately I keep getting Syntac error in formula. Please help me I'm really desperate to solve this issue after 5 days of unlucky research.
    Thank you in advance
    Regards
    Ernesta

    Thank you all for your help. The issue was that the variable was assigned to the different table as the library. After I changed it, it worked fine.
    Regards
    Ernesta

  • How to display a caracteristic in report painter column

    Hi guys,
    Got a question about reports using Report Painter,
    apparently it seems that lines are for caracteristics and columns are for key figures but would it be possible to have columns displaying only caracteristics without any key figure?! If so would like you to give me some hint.
    Thanks in advance.

    Hello - Does this link help you?
    http://help.sap.com/saphelp_40b/helpdata/en/66/bc7db443c211d182b30000e829fbfe/content.htm
    Regards.

  • Question on how to use a variable in report object's horizontal formula to shift back and forth at refresh interval.

    Hello All;
    I have an SSRS Report that displays some slider objects. The report auto-refreshes every 5 minutes.
    This report is displayed on a big screen TV and I want to shift the images back and forth every time it refreshes to prevent possible burn-in on the screen.
    I see you can use a formula on the Horizontal position of objects, and I think a variable that gets added 10 and then subtracted by 10 every refresh could be used to display the objects in different positions each iteration, but I don't know how to do that
    in SSRS. I have read up on variables, and I think I need a global variable, but not sure how to update it on each refresh iteration.
    I read the links on using Silverlight to shift things, but that adds a whole other level of complexity.
    I could even do something in the DB and then pull that into the formula field if needed.
    Thanks in advance.
    George Hicks

    Hello All;
    I have an SSRS Report that displays some slider objects. The report auto-refreshes every 5 minutes.
    This report is displayed on a big screen TV and I want to shift the images back and forth every time it refreshes to prevent possible burn-in on the screen.
    I see you can use a formula on the Horizontal position of objects, and I think a variable that gets added 10 and then subtracted by 10 every refresh could be used to display the objects in different positions each iteration, but I don't know how to do that
    in SSRS. I have read up on variables, and I think I need a global variable, but not sure how to update it on each refresh iteration.
    I read the links on using Silverlight to shift things, but that adds a whole other level of complexity.
    I could even do something in the DB and then pull that into the formula field if needed.
    Thanks in advance.
    George Hicks

  • GRCT    HOW TO ADD Z TABLES IN REPORT PAINTER

    Hi Gurus
    Could you please send me information about how to activate z tables in report painter ?   someone said me that i can user transaction GRCT  to do that...¿ what aspects must I consider to add a table ?
    mail: [email protected]
    Regards
    Andrés Moreno

    hi Andres,
    below are the steps for the Report Painter.....
    Create a new report.
    Menu Path: Information Systems > Ad hoc reports > Report Painter > Report > Create
    On the Report Painter: Create Report screen, enter:
    Library – 1VK
    Report RSS-A
    Report Description – Report w/Total Row
    Hit <Create> button to move to the next screen.
    Create the Rows of the Report – The first four rows are cost element characteristics
    Screen: Report Painter: Create Report
    Type ‘Cost Elements’ in the lead column cell
    Double click on Row 1
    In the Pop-up window 'Element definition: Row1", enter:
    Note: If Pop-up window (select element type) appears, choose 'characteristics' and hit <Enter>.
    Select 'Cost Element' as the characteristic in the 'Available characteristics' section
    Hit <Move selected to left> button to move the characteristic 'Cost element' to the 'Selected characteristics' section
    From – 430000
    Hit <Change short, middle and long texts> icon (at the bottom of the window)
    In the Pop-up for Enter Texts, Enter:
    Short – Description from Table above for this Account
    Click on the <Copy short text> button to copy this description to the other fields.
    Hit <Confirm> to close the Pop-up
    Hit <Confirm/Enter> to check consistency and close.
    Repeat the above steps for the other 3 accounts
    Create a formula row to calculate the total of the Cost Element rows
    Screen: Report Painter: Create Report
    Double click on Row 5 or the next empty row.
    In the Pop-up for Select Element Type select 'Formula'
    Hit <Enter> to close the Pop-up
    In the Pop-up 'Enter Formula'
    Use the calculator buttons to create the formula Y001 + Y002 + Y003 + Y004
    Hit <Enter> to close the Pop-up
    In the Pop-up 'Enter Texts'
    Short – Total
    Click on the <Copy short text> button to copy this description to the other fields.
    Hit <Enter> to close the Pop-up
    Make sure your cursor is in the cell containing the word ‘Total’
    Follow the Menu Path: Formatting > Row
    In the Pop-up 'Row Formatting'
    Overscore – checked
    Underscore – checked
    Hit <Enter> to close the Pop-up
    Create the first column for actual costs
    Screen: Report Painter: Create Report
    Double click on the ‘Column 1’ cell.
    In the Pop-up 'Select element type'
    Select Predefined Key Figure radio button, and press <Enter>.
    In Pop-up 'Choose predefined column'
    Select Actual Costs as the predefined column, and press <Enter>.
    In the Pop-up 'Element definition: Actual costs'
    Press <Confirm> to check consistency and close.
    Define the second column for plan costs
    Screen: Report Painter: Create Report
    Double click on the ‘Column 2’ cell.
    In the Pop-up 'Select element type'
    Select Key Figure with Characteristics as the element type, and press <Enter>.
    In the Pop-up 'Element definition: Column 2'
    Value Type – 01   (Plan)
    Version – 0   (Actuals)
    Valuation – 0   (Legal valuation)
    Hit <Change short, middle and long texts> icon
    In the Pop-up for Enter Texts, Enter:
    Short – Plan
    Click on the <Copy short text> button to copy this description to the other fields.
    Hit <Confirm> to close Pop-up.
    Hit <Confirm> to check consistency and close.
    Create a formula column to calculate the variance between actual and plan costs
    Screen: Report Painter: Create Report
    Double click on the ‘Column 3’ cell
    Assign the points....
    Ranjit

  • How to use the variables used in the message mapping

    Hi ,
    In the message mapping we can declare variables in the JAVA section , these variables could be used across the mapping .
    I have tried using it but I am unable to retrieve the values assigned to the variables in one UDF into the another UDF .
    Please guide me how to use the variables declared in the JAVA section in the message mapping .
    Thanks
    Anita Yadav

    Anita,
    I have worked on the Global variables and i found no issues. Make sure that the variable is declared in the Declaration Section and then initlaized in the Initialization section.
    If you declare a variable in the Declaration Section ,
    int i;
    then in any udf you can use if directly. No need to re declare  the variable in the UDF. If you do this, then it becomes a local variable.
    Regards,
    Bhavesh

  • How  can use a variable in the folowing code?

    How  can use a variable 'W_ROWNUM2' in the folowing code?
    MOVE '1' TO CNT.
    LOOP AT L_T_PM2.
                  CONCATENATE '0' CNT INTO W_ROWNUM2.CONDENSE W_ROWNUM2.
                   CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
        perform  DYNPRO_FIELD       using FLD2
                                     L_T_PM2-vari12_con.
                   CNT = CNT + 1.
                   CONDENSE CNT.                                                              
    ENDLOOP.
    I need to increment the value of W_ROWNUM2.
    Please ,it is urgent!!

    Hello
    CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
    Try using spaces between parts of the resulting string.
    CONCATENATE 'F110V-VARI'  W_ROWNUM2  '(01)'   INTO FLD2
    Regards
    Greg Kern.

  • How to use bind variables in the following query

    CREATE OR REPLACE PROCEDURE MMDB.test IS
    sel_qtn VARCHAR2 (10);
    CURSOR PT_QUANTITY IS select * from mmdb.product_tree WHERE QUANTITY_CHECK ='E'
    AND run_id = 100
    a PT_QUANTITY%ROWTYPE;
    BEGIN
    FOR i IN PT_QUANTITY
    loop
    sel_qtn := i.quanttity-1;
    While sel_qtn>=1
    loop
    insert into mmdb.product_tree (BILLING_ACCOUNT_NO ,S_CODE) values (i.BILLING_ACCOUNT_NO ,i.S_CODE||'E');
    sel_qtn :=sel_qtn -1;
    End loop;
    commit;
    end;

    Don't duplicate threads: How to use bind variables in the following query

  • Variable in report painter

    Hi,
    I have a customized variable in report painter which pulls data from standard table, profit centre (GLPCT).  The data is included dummy profit centre. 
    How can block or should not allow dummy profit centre data to flow to the report?
    Please advice.

    Hi,
    Easier option is to create a profit center group excluding the dummy profit center and assign it in the report painter instead of the variable.
    Other option is at the time of executing the report, exclude the dummy profit center with out making any changes in the report.
    Regards
    Sudhakar Reddy

  • How to use bind variables in this procedure

    Hi Experts,
    How to use bind variables in this procedure for static queries.
    PROCEDURE DELETE_MER_PROC (M_id IN NUMBER)
    IS
    BEGIN
    V_date DATE;
    SELECT PD_DATE INTO v_date FROM PD_MAINTAIN;
        DELETE FROM MER_CLEAR
        WHERE MER_DT < v_date
        AND ID = M_ID;
    COMMIT;
    END;   
    How to use  v_date and m_id as bind variables in this procedure to avoid hard parsing.
    Please help me.
    Thanks.

    976208 wrote:
    How to use  v_date and m_id as bind variables in this procedure to avoid hard parsing.
    You cannot avoid hard parsing - as the 1st time a SQL statement (like the SELECT or DELETE statements in your code) is encountered, it does not reside in the server's Shared Pool, and needs to be added into the pool via a hard parse.
    Bind variables does not prevent hard parsing. Hard parsing happens when the SQL statement (with or without bind variables) is a brand new statement encountered by the server.
    Bind variables enables the same SQL cursor to be reused, by simply changing the bind variable value.
    Not using bind variables means that each SQL statement is unique and not shareable - as the value is hardcoded into the statement and cannot be changed via a bind value. This typically means LOTS of different SQL statements (where the only difference is the changed value in the statement) are created - with each statement being a new statement not seen before in the Shared Pool and needing to be hard parsed.
    One does not design one's code not to be hard parsed. There ALWAYS will be a hard parse in order to get a SQL statement into the Shared Pool. One designs one's code to REUSE cursors in the Shared Pool.

  • How to use bind variable

    Hi,
    I have the below cursor 1 which is working already.For my requirement i want to use bind variable like second cursor.But its telling Bind Variable "p_col_list" is NOT DECLARED.Please any onehelp me on this.
    How to use bind variable Here.
    Cursor1:
    DECLARE
    emp_cv sys_refcursor;
    iid NUMBER := 1;
    i_sql varchar2(100);
    p_col_list varchar2(2000) := 'aaa,bbb,ccc,ddd';
    BEGIN
    i_sql := 'select '''||REPLACE(p_col_list, ',', ''',''')||''' from dual '||CHR(10) ;
    dbms_output.put_line(i_sql);
    OPEN emp_cv FOR i_sql ;
    END;
    Cursor2:
    DECLARE
    emp_cv sys_refcursor;
    iid NUMBER := 1;
    i_sql varchar2(100);
    p_col_list varchar2(2000) := 'aaa,bbb,ccc,ddd';
    BEGIN
    i_sql := 'select '''||REPLACE(:p_col_list, ',', ''',''')||''' from dual '||CHR(10) ;
    dbms_output.put_line(i_sql);
    OPEN emp_cv FOR i_sql using p_col_list;
    END;

    hello,
    the reports parameterform capabilities are limited. if you want
    to create sophisticated parameterforms, you should do that with
    oracle forms or html forms.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to use ADF variables in C:when test?

    I have a <af:iterator in my page fragment as follows
    <af:iterator id="i1" value="#{queryModel.currentDescriptor.conjunctionCriterion.criterionList}" var="criterion" varStatus="vs">
    Within this iterator, I want to make a decision absed on the index of the iterator. To do this test, I am using jstl as follows
    <c:when test="${vs.index == '0' or vs.index == '2' or vs.index == '4'}">
    This test is however always evaluating to false. I have tried cahnging my code using various combiantion as below ...
    <c:when test="#{vs.index == '0' or vs.index == '2' or vs.index == '4'}">
    <c:when test="${vs.index == 0 or vs.index == 2 or vs.index == 4}">
    <c:when test="${vs.index == '0' || vs.index == '2' || vs.index == '4'}">
    But nothign seems to be working fine.
    Can some one help me with what I am doing wrong?
    Thanks.

    How to use ADF variables in <C:when test?

  • How to use string variable onside quotes

    Hi,
    i would like to know how to use string variable onside quotes. what i mean is if i have a LOV variable P_STATUS as character string.
    and in my PL/SQL function i give a query as
    Q AS VARCHAR2(1000) := 'SELECT * FROM EMP
    WHERE STATUS = :P_STATUS';
    Is this correct. I Know that the above statement works when the LOV is an integer, but when i use a character LOV return value the above statement does not work. how can i get in the character LOV value.
    Can someone help me please.
    Thanks,
    Philip.

    916753 wrote:
    Yes I tried binding all the values separately. It is working, but, I am trying to pass all values by variableBut you can't. The variable is holding a single string value.... that is just 1 value. Your binding are expecting multiple values. You can't bind 1 string value and expect Oracle to magically know how to break your string up into seperate values for the bind variables. What if one of your bind variables actually needed e.g. a comma seperated string as it's value? How would Oracle know that?
    You must bind each thing seperately. That's the way cursors work.
    , because i have more than 150 tables in which data will be load. that's why i m trying to create a unique procedure to load data one by one table. Otherwise I have to write individual procedures for per procedures.It's a hard life being a software programmer, but somebody's got to do it. Unfortunately there are too many people who try and write "generic" procedures and expect them to just work. I mean why don't Oracle just implement some SQL command so you can do...
    execute immediate 'load all my tables';save us all the hassle eh!? ;)
    when i write all the columns like
    execute immediate (insert_string) using rc1.TOLL_ID, rc1.LANE_ID, rc1.RECEIVED_DATETIME, rc1.LANE_QUERY, c1.EXECUTED_DATETIME
    but it is not possible to generate runtime variable thats why I m trying to assign all values to a single variable and use it like
    execute immediate (insert_string) using (v_string)
    how can I separate the values and ho to use it .Don't use execute immediate. Use the DBMS_SQL package instead and bind your values dynamically with loops to cover all the columns you need etc.

  • Using value variables throw public functions

    He all!!
    I'm trying to use value variables throw public functions in
    the same class.
    Is there any possible to do it?
    I'll explain:
    What i whant is in tha FLA file to get the songName of the
    mp3 like trace(musica.nomeMusica);
    quote:
    //AS Code
    package Mp3Player{
    import flash.media.Sound;
    import flash.media.SoundLoaderContext;
    import flash.media.SoundChannel;
    import flash.media.ID3Info;
    import flash.net.URLRequest;
    import flash.events.Event;
    public class Mp3Player {
    private var sound:Sound;
    private var req:URLRequest;
    private var context:SoundLoaderContext;
    private var channel:SoundChannel;
    private var id3:ID3Info;
    private var nomeMusica:String;
    public function tocarMusica(file) {
    sound=new Sound ;
    req=new URLRequest(file);
    context=new SoundLoaderContext(8000,true);
    sound.load(req,context);
    channel=sound.play();
    trace("A tocar");
    sound.addEventListener(Event.ID3,id3Info);
    public function id3Info(event:Event):void {
    id3=event.target.id3;
    nomeMusica=id3.songName;
    public function get getNome():String {
    return nomeMusica;
    //FLA Code
    import Mp3Player.Mp3Player;
    var musica:Mp3Player = new Mp3Player();
    var nome:String = musica.getNome;
    musica.tocarMusica("Saia_Indiscreta.mp3");
    trace(nome);
    The trace of my code is:
    quote:
    A tocar
    Null
    What i'm doing wrong or is missing?

    Tnks all for the reply but none of them give me any answer :(
    Making the question in other way.
    Using the code above, how can i set a funcion to call the
    musicaNome value from FLA file?
    quote:
    //AS Code
    package Mp3Player{
    import flash.media.Sound;
    import flash.media.SoundLoaderContext;
    import flash.media.SoundChannel;
    import flash.media.ID3Info;
    import flash.net.URLRequest;
    import flash.events.Event;
    public class Mp3Player {
    private var sound:Sound;
    private var req:URLRequest;
    private var context:SoundLoaderContext;
    private var channel:SoundChannel;
    private var id3:ID3Info;
    private var nomeMusica:String;
    public function tocarMusica(file) {
    sound=new Sound ;
    req=new URLRequest(file);
    context=new SoundLoaderContext(8000,true);
    sound.load(req,context);
    channel=sound.play();
    trace("A tocar");
    sound.addEventListener(Event.ID3,id3Info);
    public function id3Info(event:Event):void {
    id3=event.target.id3;
    nomeMusica=id3.songName;

Maybe you are looking for

  • How to recover mail settings in Yosemite

    I am running a number of mac computers all having the same IMAP email accounts on them. I had an issue with two of the mail accounts where the emails were getting stuck in the outbox. I read a couple of posts that suggested deleting the mail boxes an

  • How do I convert a wave file of 50-60 meg into an MP3 to send to a client?

    This is ridiculous...I'm reading the help page and it's been absolutely no help whatsoever.

  • Text sound and no text

    Since I got the 2.1 upgrade, I keep getting the text message noise and no text message. I am getting most text messages, but where are the other ones going, and why aren't they showing up!?

  • Error-4960 when down loading CS6 trial

    I am using an Imac 27 with OSX 10.8.3.  The download seems to complete but the extraction never ends and I get the following: MasterCollection_error_4960 Any help will be appreciated

  • Adding an animation causes an error in menus

    All - any help would be appreciated. The minute I add an animation from the library, such as a flashing arrow, all of my drop-down menus in Captivate are unusable. Example: I add an arrow animation, then go to "File", the drop-down menu flashes then