Convert char to currency

Hi all,
i searched alot but couldn't find solution.
i have l_value char(45) field value has 4560
I need to convert this into vbak-netwr field in sales order user exit MV45AFZZ
when i assign vbak-netwr = l_value.
I am getting 45.60 in vbak-netwr field.
when i try same login in report progam it is working fine but not in user exit.
any suggestions?
Giri

Sample program to convert Char to Curr.
data: curr type kna1-umsa1,
      char(254) type c.
data: temp type p length 15 decimals 2.
char = '1,405.25'.
REPLACE ALL OCCURRENCES OF '.' IN char WITH space.
REPLACE ALL OCCURRENCES OF ',' IN char WITH space.
CONDENSE char NO-GAPS.
temp = char.
curr = temp / 100.
write: 'CHAR = '.
write :/ char.
write:/ 'CURR = '.
write: curr.
<< Removed by moderator >>
Regards,
Uttam Agrawal
<< Removed by moderator >>
Edited by: uttamagrawal on Feb 22, 2011 9:21 AM
Edited by: Neil Gardiner on Feb 22, 2011 9:01 PM

Similar Messages

  • Converting CHAR(21) to CURR(15) - CRM system

    Hello,
    (I have read many threads about this "conversion from CHAR to CURR" topic, but none of them were able to answer my question).
    I am basically trying to convert a CHAR(21) to CURR(15).
    What I have learned is: CURR(15) needs the format: 3423.23. In other words, there shouldn't be any commas and the decimal separator should be a dot. So, I have seen a lot of algorithms that convert various CHARs to this format and it works fine.
    However, the problem is the regional settings. My input CHAR will depend on the regional settings of the user.
    Example: Here is what the pricing returns to me in the CHAR format depending on the user settings:
    DE: 1,214.99 EUR
    EN: 1.214,99 EUR
    So, there is no actually fixed format that I receive.
    Is there a function module/method that takes into account this user settings and does the conversion (in the CRM system)?
    Thanks,
    Guven.

    Hi
    Get data from user master record(USR01 table) where BNAME = sy-uname.
    check the decimal format, based on it convert u r currency. the decimal format will
    available in field DCPFM.
    Regards,
    raghu.

  • Convert Char to Date format - Evaluate

    Hi,
    Could anyone provide us the Evaluate formula to convert Char to Date format
    2009-06-20 should be converted to 06/20/2009
    Regards,
    Vinay

    Hi,
    Refer the below threads...
    Re: How to convert string to date format?
    how to convert character string into date format????
    Regards,
    Chithra Saravanan

  • Convert char to ascii code and vice versa

    HI
    Is there any function module to convert char to ascii code and vice versa.
    Thanks in advance

    Hi,
    be careful if you have unicode running in your system. URL_ASCII_CODE_GET is platform-dependent so it will return the internal HERX representation of the character in your system - which is hopefully and in most cases ASCII.
    Under unicode, we use double-byte characters here. I tried this function and the result CHAR_CODE is '00' regardless what character I specify for TRANS_CHAR. But the coding is so simple I corrected resultig in this sample code:
    [P]
    convert p_form to ASCII (internal) representation
      DATA:
        l_ofs TYPE syfdpos,
        l_len TYPE sy-linsz,
        l_ascii TYPE i.
      FIELD-SYMBOLS:
        <x> TYPE x.
      l_len = STRLEN( p_ascii ).
      DO l_len TIMES.
        l_ofs = sy-index - 1.
        ASSIGN p_ascii+l_ofs(1) TO <x> CASTING.
        l_ascii = <x>.
        WRITE: l_ascii.
      ENDDO.
    [/P]
    Here, for each character of string p_ascii, the internal (ASCII) representation is determined and written to the output list.
    Regards,
    Clemens

  • Convert Char to Date in SQL Server

    Hello Experts,
    I am trying to convert Char to Date but getting error in Universe designer. Can anybody advise please?
    Thanks,
    Ravi

    Hi,
    Try with CAST() and CONVERT() functions. For more information refer use this url : http://msdn.microsoft.com/en-us/library/ms187928.aspx.
    It is more easy to get solution if you can post your query.
    Cheers,
    Suresh Babu Aluri.

  • Convert char to dec

    Dear all ,
        I have to convert char to dec , my requirement is to covert  12344434 to 123444.34 .
    note i don't want 12344434 to 12344434.00 .
    Thanks in advance
    Debesh

    You can try like this.
    DATA : v_tot_len TYPE i,
            v_off_len TYPE i.
    DATA : v_off_text(50) TYPE c,
            v_dec_text(2)  TYPE c,
            v_fin_text(50) TYPE c.
    PARAMETERS : p_input TYPE text20 OBLIGATORY.
    START-OF-SELECTION.
    v_tot_len = STRLEN( p_input ).
    v_off_len = v_tot_len - 2.
    v_off_text = p_input+0(v_off_len).
    v_dec_text = p_input+v_off_len(2).
    CONCATENATE v_off_text v_dec_text INTO v_fin_text SEPARATED BY '.'.
    Here I am inputting the text to be converted.

  • Convert char * to LPCTSTR

    How I can convert char * to LPCTSTR.
    I reading msdn but I don't know nothing sensible to do.
    Thx for all hepl.

    If your program is not using Unicode as the default, then "char *" is the same thing as LPCTSTR; the compiler will see the same thing, the only difference is that the preprocessor replaces LPCTSTR with "char *".
    Your program however is probably using Unicode as the default. If so, then you need to convert the non-Unicode "char *" string to a Unicode string. There are many ways to do that and the most convenient solution for you depends on what your program is already using. If your program is using MFC then there is a MFC solution. If your program is using the CLI (.Net) then there is a different solution using that. If your program uses the C++ standard classes (std namespace) then there is a solution using that. There is also a solution using the C runtime and anotehr using the Windows SDK.

  • Function module for converting the foreign currency to words

    hi,
    can anybody tell me about the function module for converting the foreign currency to words format.
    Like 25.50 USD
    should be "Twenty Five Dollar & Fifty Sents."
    foreign currency can be anyone like USD, JPY, EUR etc.
    Regards
    Nitin Varshney

    Hi,
    Try using the FM SPELL_AMOUNT
    Check this wiki
    [SPELL_AMOUNT|https://wiki.sdn.sap.com/wiki/display/Snippets/SpelltheAmountenteredin+words]
    Regards
    Sarves

  • Function modules for converting Char value to hexadecimal value

    Hi All,
    Function modules for converting Char value to hexadecimal value.
    Thanks in advance

    Hi,
    use this function module:
    <b>RSS_UNIQUE_CONVERT_TO_HEX</b>
    regards
    Debjani
    Rewards point for helpful answer

  • Alternate Exchange Rate Type Not Picked while converting from Document Currency to Group Currency

    Hello Gurus,
    We have setup an alternate Exchange Rate type MNB for rate M for the postings happening in Hungary. Local currency is HUF. Group currency is USD.
    If the document currency is, lets say, EUR, latest MNB rate is correctly picked up (EUR to HUF) and postings are correctly converted into local currency (HUF).
    Although, for the same document, when a group currency is being calculated (EUR to USD), exchange rate type M is being picked up. Same happens if  document currency is HUF. Even then, the conversion is based on exchange rate type M.
    Is this a normal SAP behavior? How to prevent/correct this? This is also throwing off balances when we check in FAGLB03 or BSEG values in local and group currencies. In OB22, we have local currency1 and local currency 2 setup with exchange rate type M and we may not want to make any changes there as it is setup at global level.
    Do we need to run any valuations after the fact? if so, how?
    Thank you for your inputs in advance.
    Regards,
    Sagar

    Hi,
    You mentioned that "in OB22, we have local currency1 and local currency 2 setup with exchange rate type M". Then, I'm wondering how MNB is picked up for the first local curr. conversion to HUF? It should be 'M' instead. There must be some settings in your instance for such behavior. Can you check that?
    Actually, Group Curr. conversion happens with the rate defined for 2nd Loc.Curr.in OB22 which is 'M' in your case. Therefore, all the transactions are converted with M instead of MNB.
    Since you can't change OB22 per global co.policy, the exch.rate defined in OBA7 will overrule OB22. However, you've to make sure it's set up for all doc.types which are affected and posted in different curr. than HUF.
    As a workaround, another thought would be to maintain the same conversion rate for both exch.rate types MNB & M, for eg. HUF > USD rate is the same both exch.rate type MNB & M. This way, you ensure all transactions are posted with correct exch.rate irrespective of whatever rate type is used.
    From business, & global org. perspective, I'm sure they are sending the 'M' exch.rates to all their sister concerns monthly, so they would like to consolidate results as per standard rate in their system. Then, why ,as a local company, would you like to fiddle with standard process? It's a management decision, please run them through again before going ahead.
    Thanks,
    Nirav

  • Converting CHAR or CLOB to BLOB in Oracle9i

    Hi!
    I want to convert CHAR or CLOB to BLOB.
    I am working with Oracle9i Database.
    Oracle9i Supplied PL/SQL Package Release 2 (9.2) does'nt support DBMS_LOB.CONVERTTOBLOB procedure.
    How I can convert CHAR or CLOB to BLOB in Oracle9i?
    Valery

    Hi Valery,
    For conversion to blob, just try the utl_raw package.
    I use utl_raw.cast_to_raw quite often.
    Or have a look at:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:437819871174
    Good luck,
    Jan-Marcel

  • Currency INR convert in EURO currency in MIRO

    Hello MM Sapperu2019s,
    Let me know the reason from forum when I enter the tax code in MIRO autoamcaally the Currency INR convert in EURO currency. Please provide your inputs what could be the reason for this and how I can resolve this case.
    Cheers,
    Kumar.S

    HI,
    Because your main vendor has currency EURO so its coming there  and IN po your currecny will be EURO
    check vendor currency
    If you don want it thne
    do following
    in MIRO after execution before giveing PO number chnage currency to INR and enter and then give PO number it will not chnage then
    Regards
    Kailas Ugale
    Edited by: kailasugale on Feb 9, 2012 11:51 AM

  • Function module - convert to local currency

    Dear all,
    I need to use a function module to convert to local currency a document that has been posted in foreign currency, which function module can I use? I tried convert_to_local_currency but I dont get any output...
    Else I need a function module to reverse a GL document, which function module should I use?
    Thanks and best regards!

    Hi,
    Please use the following linke and see if this helps.
    Re: FI Reverse Document BAPI
    Regards
    K.R

  • How to convert char to curr ?

    Hi gurus.
    Forgive me for the silly question.
    I have a problem with data conversion from char to curr with 2 decimal places.
    This is the scenario, I have a Z transaction which receives an excel file containing data from invoices and when the field contains a value such as 35,0 the program records the value 3.50 in the destination variable. But when the value is 35,45, it works.
    Here is the piece of code:
    WHEN '0007 '.
            TRANSLATE USING ITAB-VALUE. " '.
            ITAB-VALUE USING TRANSLATE',.'.
            CONDENSE ITAB-VALUE NO-GAPS.
            WA_OPER_MENORES-VL_BRUTO = ITAB-VALUE.
    If I format the column in the excel file for numeric value with 2 decimal places also works, because when the value is formatted 35,0 change to 35,00. But I can not tell all the users hey formatt your files before upload to SAP.
    To test I generate a simple report that reads the excel file and makes the conversion of the columns, like the code above, so I had no problems. I think there should be some configuration that has been changed in the transaction, but I'm new in ABAP, I come from "Java World" and I have no idea that could be.
    I could just use a quick and dirty solution, adding a zero at the end of the column, when there is the 2 decimal places, but I prefer a clean solution.
    Guys, is there any function module or class that does that kind of data conversion? If not, you could tell me what is the best practice to solve this problem?
    thank you very much,
    Ronaldo S. Vieira

    Follow this example to convert Char to Curr and Vice-Versa
    DATA iamnt(17) TYPE c VALUE '243567.00'.
    DATA eamnt TYPE p DECIMALS 2.
    DATA oamnt(17) TYPE c.
    MOVE iamnt TO eamnt.
    WRITE eamnt TO oamnt.
    WRITE oamnt.

  • FM for convert to local currency other than CONVERT_TO_LOCAL_CURRENCY

    Does anyone know any other FM which converts into local currency???
    But it should be other than CONVERT_TO_LOCAL_CURRENCY..

    Hi Ajay,
    Just you can check it out in SE37.
    CONVERT_TO_LOCAL_CURRENCY_N
    CONVERT_TO_LOCAL_CURRENCY_O.
    CONVERT_TO_FOREIGN_CURRENCY
    Chk this Link
    convert to local  currency
    Reward Points if Useful
    Regards
    Gokul

Maybe you are looking for

  • Home Hub 3 reporting muliple SSID

    Hopefully someone can help to save me having to contact BT (un)help desk! I'm having problems getting my laptop to talk with my HP printer wirelessly; the printer IS connected to my network - HP printer setup software confirms this but then the lapto

  • Why don't some of my .ttf fonts appear in the font menu?

    Hello, I have a number of .ttf fonts installed on my system (located in Win7/Windows/Fonts folder) which do not appear in Flash or other Adobe applications such as InDesign. I did try putting them in the Fonts folder of these programs instead of the

  • RE:Migration of KM content

    Hi Experts I want to migrate KM content from development to production server (EP7).Will the metadata propeties get migrated if i use  ICE protocol.I also need to migrate the properties related to search.  Will i be able to achieve this through ICE p

  • Variable entry for replacement path

    Hi Guys, This is my scenario. I have query A which uses a set of results from query B via replacement path. I have a mandatory variable entry for Query A which I have used also for query B. I was under the impression that when I made a user entry for

  • Screen Flicker with new Retina Display iPad?

    New iPad Retina Display seem to flicker when scrolling through Aps when I am downloading an Ap. This does not occur with either my iPad 1 or iPad 2.