Use currency rate in report

Hi everyone!
I have 2 tables -
Employee limit (in USD)
- ID
- Employee
- LimitName
- Limit
CurrencyRates
- ID
- Currency
- Date
- Rate
User should select Date and Currency and get Limit in selected currency by the rate on selected date. How can I do this?
If I create 2 logical table and then create report with column Employee, LimitName, Limit and Rate, I get null in Rate column. What should I do?

No, you can't really pull sql from a table and execute it well... What you are doing will be okay.. If you need to have the predicate where user = = V('APP_USER') in all selects you build, you could use VPD (Virtual Private Database) in your setup.. Thus every select you issue through the application would have this prefaced onto it without the user or application being aware..
First step I would do is, determine how many reports will be using this code, and see if you can move the code into a function returning select, and in that you can build a function that will build this into your code..
Thank you,
Tony Miller
Webster, TX
What if you really were stalking a paranoid schizophrenic... Would they know?
If this question is answered, please mark the thread as closed and assign points where earned..

Similar Messages

  • SQL Open Sales Orders Value using today's currency rates

    Hi experts,
    I am creating a report for displaying the open sales order values (and other fields) using current currency rate (where applicable). I developed the below query. The only problem with this query is that it ignores the order rows in which the currency field is blank (Don't understand why this happens in SAP). Do you have other ideas?
    Thanks & Regards,
    IC
    SELECT 
    T0.DocNum as 'Sales Ord No', T0.DocDate as "Ord Date",  T0.CardCode as "Cust Code",  T0.CardName as "Customer Name",  T1.ItemCode, 
    T1.Dscription,  T3.ItmsGrpNam,  T1.U_SU,  T1.U_SULEN,  T1.U_SUQTY,  T2.InvntryUom as 'Stock UOM',  T1.Quantity as 'Ord Qty', T1.Quantity*T2.U_ITWTSTU as 'Weight (KG)', T1.Quantity-T1.OpenQty as "Qty Delivered", T1.OpenQty as 'Bal Qty', T1.Price*T1.Quantity/T4.Rate AS "Ord Value (GBP)", T1.Price*T1.OpenQty/T4.Rate  AS "Open Qty Val (GBP)", T1.Price/T4.Rate  AS "Price (GBP)", T1.Price*T1.OpenQty as "Ord Value (BP Currency)", T1.Price as 'Price (BP Curr)', T1.Currency as 'Cur Ind', T4.[Rate] AS 'Curr Rate', T0.DocDueDate as "Due Date",  T1.WhsCode as 'Del WHG'
    FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod, ORTT T4 WHERE T0.DocCur <> 'GBP' AND T1.Currency=T4.Currency AND T4.[RateDate] = [%0] AND T1.OpenQty > 0
    UNION ALL
    SELECT
    T0.DocNum as 'Sales Ord No', T0.DocDate as "Ord Date", T0.CardCode as "Cust Code", T0.CardName as "Customer Name", T1.ItemCode, T1.Dscription, T3.ItmsGrpNam, T1.U_SU, T1.U_SULEN, T1.U_SUQTY, T2.InvntryUom as 'Stock UOM', T1.Quantity as 'Ord Qty', T1.Quantity*T2.U_ITWTSTU as 'Weight (KG)', T1.Quantity-T1.OpenQty as "Qty Delivered", T1.OpenQty as 'Bal Qty', T1.LineTotal AS "Ord Value (GBP)", T1.LineTotal/T1.Quantity*T1.OpenQty AS "Open Qty Val (GBP)", T1.LineTotal/T1.Quantity AS "Price (GBP)", T1.Price*T1.OpenQty as "Ord Value (BP Currency)",T1.Price as 'Price (BP Curr)', T1.Currency as 'Cur Ind', T1.[Rate] AS 'Curr Rate', T0.DocDueDate as "Due Date", T1.WhsCode as 'Del WHG'
    FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod WHERE T0.DocCur = 'GBP'  AND T1.OpenQty > 0 ORDER BY 2,1

    Hi,
    Try:
    SELECT 
    T0.DocNum as 'Sales Ord No', T0.DocDate as "Ord Date",  T0.CardCode as "Cust Code",  T0.CardName as "Customer Name", 
    T1.ItemCode,  T1.Dscription,  T3.ItmsGrpNam,  T1.U_SU,  T1.U_SULEN,  T1.U_SUQTY,  T2.InvntryUom as 'Stock UOM', 
    T1.Quantity as 'Ord Qty', T1.Quantity*T2.U_ITWTSTU as 'Weight (KG)', T1.Quantity-T1.OpenQty as "Qty Delivered",
    T1.OpenQty as 'Bal Qty', T1.Price*T1.Quantity/T4.Rate AS "Ord Value (GBP)",
    T1.Price*T1.OpenQty/T4.Rate  AS "Open Qty Val (GBP)", T1.Price/T4.Rate  AS "Price (GBP)",
    T1.Price*T1.OpenQty as "Ord Value (BP Currency)", T1.Price as 'Price (BP Curr)',
    T1.Currency as 'Cur Ind', T4.[Rate] AS 'Curr Rate', T0.DocDueDate as "Due Date",  T1.WhsCode as 'Del WHG'
    FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
    INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
    LEFT JOIN ORTT T4 ON T1.Currency=T4.Currency AND T4.[RateDate] = [%0] AND T4.Rate != 0
    WHERE T0.DocCur != 'GBP' AND AND T1.OpenQty > 0
    Thanks,
    Gordon

  • BW Report with currency rates

    Hello,
    small question: Does anybody has generated a report in BW which is showing (only) the different currency rates (the ones from T-Code OB08)? (= sorry, newbie-question, I know...)
    At the moment we're creating a list with the rates in excel by coping the rates from SAP into Excel by hand - would be more fun to do this in an automated way...
    Thanks in advance, 
    Hansi

    Haven't tried it as I don't have the right to read in tables.

  • Currency unit in Report painter

    Hi,
    I met a problem when i maintain a report using report panter. Table FAGLFLEXT is used for the library, and I want to using currency translation function. I use Basic key figure "HSL local currency" and CC_HSL translation local currency for the report. But when i run the report, there is a problem, system tell me that can not find the unit of source currency, so can not translated to target currency. The data of local currency can be displayed.
    i set the format of the local currency column, find that even i click "print the unit", there is no currency unit of the data, so I think there is some problem.
    What is the problem? thank you!

    Hi Amir,
    Thank you for your answer.
    I changed the key figue to "Crcy Transltn TransCrcy (Act.)" as told, and run the report again, but still have problem.
    No valid exchange rate for currency translation from  to USD
    Message no. GR640
    Diagnosis
    The system could not find a valid exchange rate for the currency translation.
    System Response
    The system could not translate into the target currency.
    Procedure
    Check the target currency, the exchange rate date and the exchange rate type.
    I am sure i have maintain the exchange rate type and related rate.
    The setting of "Define Currencies of leading Ledger" is "1 Translation taking transaction currency as a basis".
    I think the problem is that the system cannot find the unit of the currency, so the error massage display as "No valid exchange rate for currency translation from  to USD". If can find the unit of currency, i thought the message should be like "No valid exchange rate for currency translation from EUR to USD".
    If the unit can be found, I think after set the format of the column "print the unit", in the report the unit can be displayed. But in my system, can not display the unit.
    What do you think about this? thanks in advance.

  • 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'

  • Currency conversion in report

    We have sales amount reported by various operating units in different currencies.
    However we need to summarize in USD and in EUR at the time of report execution?
    How to ensure that data is converted in to USD,EUR using  monthend rates and summarized during execution of reporting..

    Here is an example using the the AdventureWorksDW sample datawarehouse in SQL Server 2005...
    SELECT
    frs.SalesOrderNumber,
    dt.FullDateAlternateKey AS OrderDate,
    frs.ExtendedAmount AS CurrencyUnit,
    fcre.EndOfDayRate,
    frs.ExtendedAmount * fcre.EndOfDayRate AS Converted_EURO_Currency,
    fcru.EndOfDayRate,
    frs.ExtendedAmount * fcru.EndOfDayRate AS Converted_UsDollar_Currency
    FROM FactResellerSales AS frs
    INNER JOIN DimTime AS dt ON frs.OrderDateKey = dt.TimeKey
    INNER JOIN FactCurrencyRate AS fcre ON frs.OrderDateKey = fcre.TimeKey AND fcre.CurrencyKey = 36  --EURO
    INNER JOIN FactCurrencyRate AS fcru ON frs.OrderDateKey = fcru.TimeKey AND fcru.CurrencyKey = 100 --US Dollar
    Hopefully this will get you pointed in the right direction
    HTH,
    Jason

  • Displaying currency rate problem

    Dear all,
    I have amount currency in my report, when i have currency translation, my client needs to display the currency rate that is used.
    Is it possible?
    Thanks
    Jmq

    There may be differenct currency conversions like USD ---> EURO, USD --->INR etc in single query depending on data.
    May be you can create two key figure both same except that one has conversion and other doesnt.
    In the query output you can show only the key figure which as currency conversion.
    eg: KFCONVER   KFNORMAL.
    To Dispaly currency rate.
    Create a new formula as which gives exchange rate :
    NOIM ( KFCONVER )/ NODIM ( KFNORMAL)
    Hope this helps.

  • Currency Translation Type in queries using currency conversion

    I have a question on the Currency Translation Type (EUR_VAR) that is used in all of the queries using currency conversion on the fly. (currency is maintained automatically nor in table.)
    User wants to use 2 different exchange rates in a single query. The months in 2010 (Actuals) are to
    be converted using Xchangerate-type EURO and the months in 2011 (Planned) to use Xchangerate-type USD.
    But store different rates with different starting dates. This is however not possible because the Currency Translation
    Type is set-up (1) to work with Query Key date - rather than a characteristic in the data and (2) apparently these
    currency translation types only work with time characteristics like 0fiscyear
    My idea is therefor to:
    1. Create a new variable (similar to EXC_RATE) to prompt for a 2nd Exchange Rate type when query starts
    2. Create a new Currency Translation Type (next to EUR_VAR), referencing the new variable or sticking to fixed Xrate type, fixed to EUR
    Is this possible to create Idea (2)
    Many Thanks in Advance.

    The best way would be to create two curr conversion types , one converting to EUR and other to USD .Put them in properties of coressponding KFs in query.For timref in RSCUR , variable time ref can be used individually for two conv types.

  • A/R and A/P invoices and credit memo realized currency gain/loss report

    Hi,
    We need some help in getting a report from SBO.
    We would like to analyze their realized currency gain and loss account. We are lookiing into a report that shows the individual invoice/ credit memo foreign and local currency amount against the incoming / outgoing payment foreign and local currency amount.
    Sometimes we  would do direct offset invoices in the incoming / outgoing payment, and sometimes it would be thru internal reconciliation. We have look thru the tables for the past 2 days but could not find any link between the invoices and payments especially so when reconciliation is performed.
    Can this report be done either in XL Reporter or in SQL? If yes, which tables are these information store?
    Thanks.
    Regards,
    Whay Peng

    Hi Jimmy,
    There is no need to run the exchange rate differences, when invoices that was offset during the incoming and outgoing payment. The realized currency gain/ loss account will be generated when the incoming and outgoing payment is made.
    During reconcilation, yes we did run the exhange rate differences to get the realized currency gain / loss.
    Could it be the two tables that you mentioned are storing information on the unrealised currency rate differences? We did not run exchange rates differences to provide for any unrealized gain/loss for the period, therefore the tables on our end is empty.
    Regards,
    Whay Peng

  • How to change currency sign in report

    How can I change the currency sign in report like from dollar to pound sign. Any help and advice will be highly appreciated.

    Sherry,
    I'm stumbling my way thru the same question. we need to print the currency symbol based on the country defined in the data. here's the not-so-short answer:
    we're looking into storing the currency symbol as a unicode value (NVARCHAR2 field) in the database by country and linking it to the data selected in the report. I have a select statement in the report sql that retrieves the correct unicode value per data row. the question then seems to become: do i want to display the field as a number with a format mask, or convert the whole thing to a string/char value?
    Keeping everything as a number, in the report format field Format Trigger, i create a mask for each field and call a function to do the following:
    v_format := q'{(}' || q'{"}' || p_currency || q'{"}' || v_format || q'{)}';
    this gives you a mask with the parenthesis for negative numbers, the currency as literal string, and the v_format (NN,NNN,NNN,NNN,NN0.00) for currency amounts. we vary the # of decimal places and pass that value into the function (just to make things complicated.)
    the 'uber complex' version of the function converts the number field to a string/char value. this allows you to change the decimal and separator values for an individual data row. we have not decided to implement this, but it works. you have to enter a 'bogus' character field in the report format and use srw.set_field to change the value at runtime. this keeps the value as a number in the sql for math, but a char to display. complicated. the function does this...
              v_format := '999G999G999G990';
              v_decimalplaces := MOD((p_decimalplaces * 10),10);
              IF v_decimalplaces > 0 THEN
                             v_format := v_format || 'D';
                   FOR i in 1..v_decimalplaces LOOP
                   v_format := v_format || '9';
                   END LOOP;
              END IF;
              CASE WHEN SIGN(p_value) >= 0
                   THEN
                        v_format := p_currency || TO_CHAR(p_value, v_format, 'NLS_NUMERIC_CHARACTERS = '',.'' ');
                        ELSE
                        v_format := '(' || p_currency || TO_CHAR(ABS(p_value), v_format, 'NLS_NUMERIC_CHARACTERS = '',.'' ') || ')';
                   END CASE;
    we would pass the values of NLS_NUMERIC_CHARACTERS to the function.
    the last 'hitch' is that not every UNICODE currency symbol displays properly. the euro (hex 20AC) is fine, but the korean won (hex 20A9) is not. the database character set is AL32UTF8, and the sql works fine in sql_developer. however, reports does not reliably display the symbol. i have a TAR into oracle at the moment, hoping for clarification. there seem to be many layers in oracle reports to get this to work (database character set, report server character set, font in developer, font on report server, etc.)
    let us know how it goes...an often asked, but rarely answered question (IMO). hopefully this gives you some ideas.
    thanks,
    john

  • How to use currency format set

    Hi All,
    I have to use currency format set to mask the amount values to their respective currencies ,
    i reviewed the Oracle XML Publisher Administration and Developer's Guide and followed all the steps mentioned there ,i m also quoting the same over here
    To define a Currency Format Set:
    1. Navigate to the Currencies page under the Administration tab. Select Create
    Currency Format Set.
    2. Enter a Name and a Code for the set. The Code is a unique identifier and cannot be
    changed later. Select Apply.
    3. The Currency Formats page will display for your newly created set.
    To add currency formats to the Currency Format Set:
    1. Select Add Currency Format to add a format to your set.
    2. Select a Currency Name from the list.
    Note: This list is generated from the FND currency table and
    should include all ISO currencies. Additional currencies can be
    added from the System Administrator responsibility.
    3. Enter the Format Mask you wish to use for this currency and select Apply.
    The Format Mask must be in the Oracle number format. The Oracle number format
    uses the components "9", "0", "D", and "G" to compose the format, for example:
    9G999D00 where
    9 represents a displayed number only if present in data
    G represents the group separator
    D represents the decimal separator
    0 represents an explicitly displayed number regardless of incoming data
    See Using the Oracle Format Mask, Oracle XML Publisher Report Designer's Guide for
    more information about these format mask components.
    After a currency format has been created, you can update or delete it from the Currency
    Formats page.
    i followed all the above step ,i need to use germany currency ,i have also used the format-currency command in my RTF template,but still its not working ,i used 9G999D00 for masking .
    Any hint would be very helpful ,thanks in advance .Please let me know if my question is not clear
    Thanks
    Pratap

    hi all
    Thanks ,this is resolved ,i just missed clearing cache ,after clearing the cache its working .
    thanks
    Pratap

  • Daily Currency Rate upload

    Hi
    We are working on 11.5.10.2.
    How can I upload daily currency rate upload to my oracle application from bank or any other system ?
    Will it be loaded in oracle GL and then drill down for use in AP and AR ?
    We are planning to use multi currency payments, I mean raise an invoice in a foreign currency and pay in foreign currency?so what are the prerequisite set up required for achieving this?
    Thanks

    GL_DAILY_RATES_INTERFACE is the interface you use to create, update, and delete daily conversion rates. Customers should use this table to load rates into the GL_DAILY_RATES table.
    To use this table to insert/update rates into GL_DAILY_RATES, insert rows into it with a FROM_CURRENCY, a TO_CURRENCY, a FROM_CONVERSION_DATE, a TO_CONVERSION_DATE, a USER_CONVERSION_TYPE, a CONVERSION_RATE, a MODE of 'I', and, optionally, an INVERSE_CONVERSION_RATE. Oracle General Ledger will automatically create rows in GL_DAILY_RATES for each date between the FROM_CONVERSION_DATE and the TO_CONVERSION_DATE, using the specified FROM_CURRENCY, TO_CURRENCY, USER_CONVERSION_TYPE, and CONVERSION_RATE.
    INSERT INTO GL_DAILY_RATES_INTERFACE
         from_currency,
         to_currency,
         from_conversion_date,
         to_conversion_date,
         user_conversion_type,
         conversion_rate,
         mode_flag
    VALUES
         SGD,
         'USD',
         '01-FEB-2008',
         '28-FEB-2008',
         'Spot',
         1.33,
         'I'
    COMMIT
    Hope this is what you required.

  • How to transfer currency rates to R/3 after dynamic modelling in BPS

    Hi all,
    I need your advice.
    I have, for example, a several sales plans, which were composed by using BPS. Each of sales plans depends on currency rates. After comparision these plans, I selected and approved one of them. After plan approval I transfer planned data to R/3.
    This is an issue to transfer currency rates, which corresponded to selected plan as well.
    Is there standart method to transfer currency rates for selected plan to R/3 (to "Currency Exchange Rates", tr-n OB08)?
    Your advice will be appreciated!

    Hi Dmitry,
    R/3 is the place basically meant for maintaining currency translation rates. If they have been maintained in BW/BPS directly, I don't think there is any facility to take them back to R/3 other than manually entering.

  • Purchase Orders Summary, Currency Rate Field

    Recently we applied Patch INV.RUP 14, after that users notice that
    Purchase Order summary screen => Purchase Order Headers Block => Rate field, it shows the Foreign Currency Rate,
    while it used to show Local Currency rate before applying the patch.
    Does INV.RUP 14 patch change/amend on the PO behavior?

    Hello,
    RUP is called "Oracle Inventory and Receiving (PO): Release 11.5.10, Rollup Patch 14". You see PO that why this patch can change this or another prerequisite. You can create SR in metalink it seems to be bug. Always after upgrade something is missing:)
    Regards,
    Luko

  • Logic used in Rate App doubt

    Hello Everybody,
    I´m using the Rate Application for currency conversion but i still dont understand the logic applied when we run the FX_trans calc, i have 2 Business Rules one for Average and other for . Does anyone knows whats the logic applied? i need to understand this in order to get the value i want when a charge the different rate types.
    Thanks in Advance
    Nidia

    Thanks for your responses,
    Maybe i need to explain better. I´m using BPC for Microsoft v7.5 SP4 and configured all the dimensions, properties, Business Rules and Fx_trans.lgf as shown : *RUN_STORED_PROCEDURE=SPRUNCONVERSION('%APP%','%VERSION_SET%','USD','GLOBAL','%SCOPETABLE%','%LOGTABLE%').
    Using BPC for Excel, when i load the rate type values, for example in order to convert MXN to USD i load 10 in this CV:
    Flow dim- non flow member
    Currency dim- USD member
    Datasource dim- calculated values
    Rate-account dim- Average
    Then i go back to the Financial Application and run the FX trans package, but the values obtained do not match with the exchange rate of 10 that i have stored in rate application. For example i have 83 392 in one account in MXN, after the calc is runned i'm supposed to get 8 339.2 but instead i get 43 781.
    The MD property in input currency dim is set as "D"
    What value do i have to store inside the rate application in order to get the correct amount? what's the logic (and i mean like mathematical logic) used for currency convertions?
    Thanks a lot

Maybe you are looking for

  • Runtime error in COPA

    Hi I'm getting a runtime error message saying "The Dictionary structure or table "*T2580" is either not active or doe" s not exist.' when i go to create the characteristic values Pls let me know how to resolve it Thanks

  • I am not able to remove an element of my side bar of the finder

    I am not able to remove an element of my side bar of the finder

  • REM Prod Version: How to hide/disable Storage Location fields

    Hi, We are using REM. For Issue storage locations, we are maitaining str location in BOM/MRP2 View. For Receving Str locatiom, we are maitaining str location in MRP2 View. Similarly, for REM assemblies, system provides str locations fields in Product

  • Last played and play count help.

    My "last played" hasn't updated since 9/9 and my play count isn't loading, either. I've tried to reset the play count but it's still not working. Anyone know what I can do?

  • Foreing key 와 Primary key 비교해서 결과 추출

    안녕하세요 참조 하고 있는 테이블을 비교하고 싶어서요. A테이블의 . pk 컬럼과 B테이블의 fk. 컬럼이 서로 부모,자식으로 연결되었다고 가정하면 두 테이블을 비교해서 다른 컬럼(즉 Foreign key이 깨진것) 을 확인하고 싶어요.....간단하면서 막상 할려니 머리를 헤매네요... ( FILES.filesid 와 ITEM.itemsno)를 조인해서 한쪽에 없는 값을 리스트로 출력할려구요.. 글 수정: user541094