Charcter type to currency conversion

Hi,
Pl say how do I convert a character type variable to Currency or particular table field type so that it can be passed to a function module as currency (pc207-betrg)
type.
Any functional module/conversion routines....??
earliest say will be surely rewarded.
thanks,

Hello,
here's an example to catch/change the value:
REPORT z6.
DATA digit(11) VALUE ' 0123456789'.
PARAMETERS: text(16) DEFAULT '20,000.00'.
DATA c_text(16).
DATA amount TYPE p DECIMALS 2.
DATA n TYPE n.
DATA i TYPE i.
c_text = text.
CATCH SYSTEM-EXCEPTIONS conversion_errors = 1.
MOVE c_text TO amount.
ENDCATCH.
IF sy-subrc EQ 1.
CALL FUNCTION 'PREPARE_STRING'
EXPORTING
i_valid_chars = digit
i_xvalid_check = 'X'
i_xchar_repl = 'X'
i_xtoupper = 'X'
CHANGING
c_string = c_text.
CONDENSE c_text NO-GAPS.
DESCRIBE FIELD amount DECIMALS n.
i = 10 ** n.
amount = c_text / i.
ENDIF.
WRITE:/ text, 50 amount.
regards Andreas
Message was edited by: Andreas Mann

Similar Messages

  • Problem with ENTITY FX TYPE in Currency Conversion

    Hi Experts,
    I have a problem regarding currency translation. I tried to use the property FX_TYPE so as to use the value in this as filter in the ENTITY FX TYPE field of the currency conversion table. I want some rules to apply only to specific entities so I used this filter but what seems to be happening is that I doesn't seem to filter it. It still applies to other entities as well thus I get wrong translation. I validated it by removing all other rules except for the ones that's being used by the entity I am analyzing and my values translation is OK but when I put the other rules again, which I have already filtered to run on specific entities only using the FX_TYPE property, my translations are wrong again. Does ENTITY FX TYPE really work or I'm just missing some set up?
    Thanks,
    Marvin

    Hello Martin,
    Could you solve this issue, Im having the same problem.
    Im trying to use this functionality but it seems that it does not apply the filter. When I run the currency convertion it stills run the business rule I have configure for all the other entities.
    Best regards,
    Aldrin Liendo

  • Concept of currency conversion.

    In a report user is getting currency conversion issue. In report  all currency which is in Pound is not converting into EUROS. 
    So can any one tell me  concept of currency conversion.
    I am not able to understand where currency conversion is happing in PN2 or  directly  in reporting. How i will know this?
    Thnaks
    Abha.

    Hi Abha,
      Currency translation is used to translate the key figures with currency fields that exist in the source system in different currencies into a standard currency in the BI system. Currency translation can be done at different levels depending on requirements and based on translation type.
    Currency conversion can be carried out in,
    i. Transformation using Function module
    ii. In Bex using conversion type created in RSCUR.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0d5bf96-b19b-2c10-e3b6-e2f12a3de99a?quicklink=index&overridelayout=true

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

  • Currency Conversion type not visible in the query

    Hi ,
    I created one currency type conversion   Z_INR
    exchange rate type : M
    Exchange rate from infoobject : zexch_rate(key fig)
    source curr from data record
    Fixed target curr : INR
    Variable time reference  : A to Exact Day
    Special info object : Ztr_date (Transaction date)
    it got saved succesfully but wen i try to include  this in the query its not visible there . can anyone let me know why this problem is coming
    help will be appreciated .
    i also included rate and date in the query still not visible

    Hi,
    Create Currency conversion type using Trans: RRC1.
    1.Specify your Exchange rate type.                     
    2.Dynamic Exchange rate type
    3.Source curency from data rec.
    4.Fixed currency say USD.
    5.Select Variable Time reference "Start Month" and Special Info Object - 0calmonth
    Secondly In the key figure field to be converted in the query,   select properties - select the currency conversion key name .
    Thanks,
    Nagesh
    Sony Singapore

  • Currency Conversion Type missing in BEx

    I have created a new conversion translation type M1 based on Monthly Average exchange.
    RSCUR definition for  this conversion on the time ref tab to be a "variable time reference"- End of Period for
    Standard Info Object Fiscal Period "0FISCPER".
    Is this configuration the cause for placing a limiting restriction on the visability of this selection at runtime of query.
    The following currency translation types are not available at the runtime of the query.
    ●      Translation types for which a variable is stored (variable time reference, source currency from variable, target currency from variable, and so on).
    From BEx I am unable to select Currency Conversion (Convert to Currency USD) and Use of Currency Translation M1
    Thank You ...... Dan

    Andrey:
    Once BEx query results are displayed in M/S excel ... the user navigates (right click) to (local) query properties:
    Tab >> Currency Conversion >> select Convert to Currency will open option to determine Currency (USD) and Currency Translation (via drill down).
    Those Currency conversion types configured with variable time reference on InfoObject 0FISCPER cannot re-determine
    target currency values. Fixed Time reference conversion types can be selected through BEx.
    I found a restriction/ limitation in the following thread.
    http://help.sap.com/saphelp_nw70/helpdata/en/ec/076f3b6c980c3be10000000a11402f/frameset.htm
    Restrictions:
    The following currency translation types are not available at the runtime of the query.
    ●      Inactive translation types
    ●      Translation types for which a variable is stored (variable time reference, source currency from variable, target currency from variable, and so on)
    ●      Translation types in which an InfoObject is used for determining the source currency or target currency.
    Are you aware of any way around this ??
    Thank you ....... Dan

  • Currency Conversion - Rate Type Selection

    I have a BEx query that displays key figure in 3 columns inside a structure, using variable rate types (one rate type per column).  We have rate types P, P1, and P2 loaded into currency tables. 
    I run this query with the following selection criteria:
    Column 1 -- Key Figure in Local Currency (BRL)
    Column 2 -- Key Figure converted from BRL to EUR using rate type P
    Column 3 -- Key Figure converted from BRL to EUR using rate type P2
    For some reason column 2 is converted using rate type P1, instead of rate type P, even though rate type P1 is not even part of the selection screen.  Column 3 is converted correctly, using rate type P2.  I enter the same time period for all 3 columns, and rate types P and P2 both exist for this time period.
    Do you know what's going on here?
    Thank you.
    Nadia

    Hi,
    see if there is any currency conversuion type used in you report.
    It can be checked in the properties of the key figures.
    you can go to RRC3 to check which echange arte is used by this currency conversion.
    Or if currency conversion is happening at the update rule then check if which is the exchange rate used there.
    Once you have seen the exchange rate...go to t-code SPRO
    SAP Netweavet->General Settings->Currencies->Enter Exchange rate .
    here you cah check the latest exchange rate ...from currency to currency...and the values...based on settings of you currency conversion type it will chose the factor.
    Thanks

  • Currency Conversion for Exchange rate type "AS02"

    Hi Experts,
    I am gonna post the most challenging problem (regarding currency conversion) I ever faced in my 1 year of BW Carrier.Kindly provide a solution.
    There are three types of currency to be used in the query for Key Figure 0NET_VALUE (so total 3 Key Figures to be created)
       1.Document currency (may be any currency)
       2.Local Currency (must be EURO)
       3.Global Currency (must be USD)
    From Document currency to Local Currency(EURO) we are using Exchange rate Type "M" (in Conversion Type created in Trans RRC1) [There is no problem in this conversion]
    Problem starts now--->
    From Local Currency(EURO) to Global Currency(USD) we have to use Exchange rate type "AS02" (in conversion type to be created in RRC1)
    but there is a Business requirement  that currency rate should be as per the last day of the entered period;and this logic should work for the range of periods also.
    Example :
    we are executing query for the period 006/2006 (posting Period)
    Last day of this period is 06/30/2006,
    Currency rate would be as per 06/30/2006
    And this currency rate should be same throughout the period 006/2006 in query
    The example was for single period,but logic must be incorporated for the range of the periods.

    Hi..
    There is no corresponding source key figure in the InfoSource for the target key figureof the InfoCube.
    a. A source key figure of the same type can be assigned to the target key figure
    (for example, sales revenue instead of sales quantity revenue).
    If the currencies of both of the key figures are the same, no currency
    translation can take place.
    If the currencies are different, a translation can take place either using a
    currency translation type or by simply assigning a currency.
    The following table provides an overview of possible combinations with different
    currencies in the source and target key figures:
    if Source key figure currency  is fixed , Target key figure currency is variable  then Currency translation (CT)  No CT
    if Source key figure currency  is fixed , Target key figure currency is fixed  then Currency translation (CT)   CT
    if Source key figure currency  is variable , Target key figure currency is fixed then Currency translation (CT)   CT
    if Source key figure currency  is variable  , Target key figure currency is variable  then Currency translation (CT)  CT or assignment
    b. If there is no corresponding source key figure of the same type, then you have
    to fill the key figure for the data target from a routine.
    If the target key figure has a fixed currency, no currency translation is
    carried out. This means that if translation is required, you have to execute
    it in the routine.
    If the target key figure has a variable currency, you also have to assign
    a variable source currency to the routine. Using the F4 help you can
    select a currency from the variable currencies in the communication
    structure. You have two options:
    – You can select a variable currency and assign it.
    – You select a currency translation type and a currency into which you
    wish to translate (‘To’ currency).
    The ‘To’ currency is, by default, the target currency if it is included in the
    communication structure.
    Creating a Routine for Currency Translation:
    If you want to translate currencies in the update even though the currency translation is not
    available for one of the above reasons, you can create a routine. Choose Routine, set the
    Unit Calculation in the Routine and choose Create Routine. In the routine editor you get
    the additional return parameter UNIT, the value of which is used to determine the target
    1.  save the query  and it under role
       see to it is in   :  Restricted and calculated key figures --->   properties of k.f
    2. exeute the query
    3. the currency translation --> by target currency  usd  choose  OK
    conversion type :  MEANTODAY Fixed target currency current date (MT)
    4.  Go back to the query definition by chossing chage query ( global definiton)
    5.  in the context menu for % share sales vouume of incoming orders,  choose properties --> formula collision -->  result form this formula choose OK
    Note that -
      your should alos set the currency translation in the  properties for the  two key figures sales voule EUR , choose properties ---> currency  conversion key :  fixed target currency ,  currrent date ( MT) -->  target currency  : American Dollar .  choose   OK
    <b>The translation key is a combination of different parameters that establish how the exchange rate for the translation is executed.
    The parameters that determine the exchange rate are the source and the target currency, the exchange rate type and the time reference for the translation.</b>
    The source currency is determined from the data record or dynamically from the master data of the specified InfoObject (currency attribute)
    The target currency can either be fixed in the translation key or selected at the time of translation.
    You can also use an InfoObject (currency attribute) to determine the target currency.
    The exchange rate type distinguishes exchange rates that are valid in the same time frame next to each other, for example, the bid rate, ask rate or middle rate. The exchange rate types are stored and can be maintained in a central table (TCURV).
    The time reference for the currency translation can be either fixed or variable
    The fixed time reference can either be a fixed key date that is stored in the translation type, or be determined using the system date when executing the currency translation.
    If the time reference is variable, then the point in time for the exchange rate determination comes from the value of a time characteristic (InfoObject). The reference can, for example, be the end or the start of a fiscal year or a calendar year, a period and a month – or even to the exact day. It can also be determined using a customer-specific InfoObject (for example, trading day).
    Currency translation in the BEx
    When selecting a translation key with a fixed target currency     this currency will be added automatically to the query definition
    Also, you can use translation keys selecting their target currency at the time of translation. These can be applied in two different ways:
    Selection of a specific target currency in the query definition (1)
    Entry by variable (2)
    Dynamic translation keys require input from the InfoCube !
    InfoObject value will be read during query execution
    Examples:
    dynamic time reference (p.eg. 0CALDAY)
          time characteristic
    target currency determined by InfoObject (currency attribute)
         characteristic which contains currency in its attribute table
    the corresponding InfoObject has to be part of the InfoCube
    1.Define the currency attribute in the InfoObject maintenance
    The currency attribute has to be a unit InfoObject of type currency
    The unit InfoObject must be an attribute of the characteristic
    The currency attribute should be filled in the master data table of the corresponding InfoObject (manual maintenance or upload via InfoSource)
    2.Enter the InfoObject in the translation key maintenance
    Only InfoObjects with a currency attribute can be used in translation keys (p.eg. 0COMP_CODE)
    At the time of currency translation the value for the source currency / target currency is then derived for every record from the master data table of the specified InfoObject
    All values for a query are translated ad hoc (after having executed the query) using a translation key
    Depending on the translation key a fixed target currency will be used for translation or you will be able to select the target currency
    The ad hoc currency translation offers only restricted functionality (selection of translation key and target currency) compared to the currency translation in the query definition
    Do not forget to create your translation keys before starting your work in the Business Explorer Analyzer
    Example:
    You load the following record to your InfoCube:
    Company Code:                1000
    Amount in Source Currency:      500,-
    Source Currency:                FRF
    Target Currency:               ?
    In the Update rules, you are now using a translation key which derives the target currency from the InfoObject 0COMP_CODE. During the Update Process the target currency will then be read for Company Code 1000 from the master date table of 0COMP_CODE.
    With the currency translation in the Business Explorer, the source currency can currently only be determined from the data record.
    Only translation keys with a fixed exchange rate type can be used in the BEx
    Translation keys with a dynamic time reference (from an InfoObject) can only be used in the query definition. It is not possible to fill the InfoObject by a variable !
    Translation keys getting their target currency from a currency attribute can only be selected in the query definition
    When getting the dynamic reference from an InfoObject (p.eg. 0CALDAY) the currency translation will apply to each record read from the database. That means it will use the date in this record for the currency translation.
    When using a variable you will restrict the output of your query to a certain amount of data. For example, you would translate all invoices of March 11 with the translation date March 11
    This means, the requirement “show me all invoices in my cube in group currency, conversion date: 14.07.2001” could not be solved by a variable input for 0CALDAY
    I hope this would help...
    with regards,
    hari

  • How to move currency conversion types

    Dear All
    my problem is currency conversion types and fixed&target currency is showing development but in production its not showing aft i came to know i hav to move
    currency conversion types to production. i checked in rscur tcode where i got this list here i cant understand which currency type i hav to move
    1.0HRFIXCUR     Fixed Target Currency, Current Date
    0MEANDAILY     Middle rate using exact days
    USD_VAR     usd with var rate
    VAR_ALL     Multiple Curencies
    ZCC01     Cost Center
    ZCUR_1     Target currency type
    ZCUSTTR     Local currency
    ZNEWCUR     New Currency Type
    ZTEST1     Conversion currency translation
    2.in development i hav seen currency variables are there but for the same i hav checkded production currency variables are not there
    its mandatory to move currency variables also production
    iam in bi7 sp13 actually previously its working we applied some patches in r/3 fi then only we are facing this problem
    can you please help me to close this issure
    thanx for all

    please close this thread and see the other one...

  • Currency Conversion types not visible for KF in BEx report

    Hi Gurus,
    I'm facing a strange issue with the curr conversion types.
    I had created a KF with 0currency for my requirement. when i'm trying to create a report on the top of the MP i'm facing this issue.
    When i right click on the KF --> selected "properties" at the bottom - we have "curr conversion types" -- here i can't see all the curr conversion types for my KF.
    Where as i checked for other KF i can see the missing currency conversion types.
    Did any one faced such issue...? please throw some light on this issue.

    HI,
    Goto RSA1 ,
    double click on you KF info Object ,
    there you can see the unit 0currency is been selected , Only those key figure which has been assigned 0currency can only be converted in Bex query.  
    Regards
    BVR

  • Currency conversion type with variable for target currency

    Hi,
    I use a currency conversion type with a bex variable for target currency in a query in order to convert a Key Figure. It works fine but instead of short text description there's the technical description of the variable in the selection screen. How can i change the description of the variable ?
    For information, in the bex, we can't see the variable in "variable sequence". I use BI 7.0
    François.

    Hi,
    The problem was that in the maintenance of the currency translation type the option  Target Currency from Variable” was checked. As a consequence in the properties of our key figure the drop-down-list Target Currency was set to  from variable” with no chance of changing it (it was grey).
    What we can do was to choose the option  Target Currency Selection with Translation” instead of  Target Currency from Variable”. Now, in the properties of the key figure we can choose the variable in the dropdown-list Target Currency and tick the option “Variable Entry”. As a result, the variable shows up in the query properties and we can change its arrangement.
    Regards,
    Siva Patil.

  • Currency conversion with the wrong exchange rate type

    Hi,
    I need a currency conversion in my bex query. I have defined a currency translation key with a assignment to the exchange rate type "M".
    When I check the results in the query it works with exchange rate type "EURX".
    Exchange rates are in the TCURR.
    Can anyone help me.
    Thanks in advance
    Jürgen

    Hello,
    We just had the same issue, and in checking the Currencies: Translation Ratios in transaction OBBS, I noticed that the currency translation key in question was set up with an entry of "EURX" in the "Alt. ERT" column.
    I copied the line and created a new entry with a "Valid From" date of the current month, but without the "EURX" Alt. ERT alternate and that seemed to solve it. 
    Anything entered with a date after the new Valid From date would use the manually entered exchange rate, while anything with a prior date continued to use the EURX rate.
    It appears to me that the "Alt. ERT" functions more as an override than an alternate, so if you want the system to actually use the "M" rate, I believe you have to ensure there is nothing in the "Alt. ERT" column.
    I hope this helps.
    Blaine

  • Currency Conversion type not in Query

    Hi,
    I have created a Currency Conversion Type using transaction RSCUR.
    In the query i want to convert a particular column to target currency by using this curr conversion type.
    But in the column properties under the conversions tab, the conversion type does not appear in the drop down.
    Kindly suggest.
    regards,
    Vedaas

    If you have followed the links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/462fe790-0201-0010-3ca4-adfd89e4f9f2
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/287bab90-0201-0010-f48e-cc55b0cd13d0
    Then log on and off the Query as it may be due to a refresh issue you can't see it.

  • Currency conversion Type

    Hi experts,
    I created a currency conversion type in transaction RSCUR. My problem is I don't see this in BEx query designer. I used an existing one as template and experienced the same. Did I miss something or is it a system bug?
    For your info we are running BI7 SP6
    Regards
    Aban
    Edited by: Abolfazl Hassanzadeh on Feb 18, 2011 2:47 PM

    Hello Vikas,
    Please don't post the same question multiple times. You have alread posted the same question 3 times here.
    Please see the other thread that you have posted for answers.
    Thanks
    Chandran

  • Currency conversion type by customer exit variable doesn't work

    Hi all.
    In my query I need amounts by quarter, applying quarters last date rates as currency conversion.
    Query has Year parameter. Based on this parameter, by customer exits I calculate every quarters last date and use them as currency conversion types.
    The problem is that query DOESN'T APPLY currency conversions!
    I checked TCURR table - currency conversions do exist for applied days
    I checked my customer exits - the date calculation works fine
    I suppose where is something wrong in query processes (customer exits/currency conversions) sequence before running it.
    Someone knows anything 'bout that?

    Check these docs.. and check again.
    [Creating Currency Translation Types|http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6813e07211d2acb80000e829fbfe/content.htm]
    [Use Variables for Currency Conversion|http://www.scribd.com/doc/7061035/How-to-Use-Variables-for-Currency-Conversion]

Maybe you are looking for

  • Calendar functioms

    Hey guys I need an help regarding Calendar functions. As i am beginner in netweaver... i was able to display the system date n time but the problem is that i want the previous and next week dates. the code which i have done is as follows which moves

  • Upgrade scenarios

    Hi experts! Where can I find a list of possible upgrade scenarios like the "System Switch Upgrade" for instance? Need to evaluate different possibilities to upgrade our system. Thanks and best regards, Matthias

  • Any Expert on Date and Calendar????

    Once I set my own calendar .. why it's not keeping my calendar and printing the date and time onwards from my set date time... I just print only one time the date/time but later in my thread, it prints OS date and time....? Any Ideas?? import java.ut

  • Printing Directory

    I am trying to create a Phone Directory for my neighborhood. I have this information in a Numbers document. I created a Pages document in the format I wanted for the directory using the "mail merge" for the fields from the Numbers document. However,

  • Is it (still) possible to set a grid behind the artwork but above the artboard?

    Is it me, or has this changed in CC 2014? I used to be able to turn the artboard off (Ctrl+Shift+H) and use the grid (Ctrl+') freely throughout the workspace - behind the artwork I am drawing. However now I am forced to turn off "Grids in background"