Amount to internal format

I want to convert the amount to its equivalent internal format..
For example, my amount may 200,000.000USD.. I want to get its equivalent internal format.. Is there a FM to do this?
i GUESS i can use this FM , CURRENCY_AMOUNT_DISPLAY_TO_SAP..but this FM requires my input in DEC11_4 format.. how do I handle the amount that i have in character format or with decimal places more than 4 ?
Please confirm

You can do something like this.
report zrich_0001.
data: amount(15) type c value '200,000,000.000'.
data: xusr01 type usr01.
select single * from usr01 into xusr01
               where bname = sy-uname.
case xusr01-dcpfm.
  when  'X'.
    translate amount using ', '.
  when  ' '.
    translate amount using '. '.
    translate amount using ',.'.
  when  'Y'.
    translate amount using ',.'.
endcase.
condense amount no-gaps.
write:/ amount.
Regards,
Rich Heilman

Similar Messages

  • External/internal format of amounts in Dynpros

    Hello,
    If you enter amounts with currency JPY in a database table via generic maintenances view (sm30), they are automatically transformed into the internal format (with 2 decimal places).
    I want to use this "effect" for my own dynpros. Does anyone know where this conversion takes place (PBO/PAI Modules, Includes) or know what settings I have to take into account?
    Thank you.
    Tanja

    This should happen based on conversion exit associated with the screen-field/dictionary-element.
    You can use the same dictionary element (Tcur*-field) for your screen and most likely it won't need anything else. Conversion exit like this one is applied at the 'domain' level (underlying the data element).

  • Where i could get know each order types's internal format

    Dear expert,
    Whcih table or from where could i get to know the internal format for each sales doc type...
    For example:
    KM equals to CQ
    TA equals to OR..
    Etc...
    For my Z customrized order type, does there also have one internal format order type??
    Because we are using LSMW to upload open Sales orders....The order type has to be indicated as internal format...
    Thank you very much.

    dear hoo laa,
    let me divide you question into three parts:
    1.A.this is to inform you that there is no different formats for each sales document type.
    one single format for all but here basing on the control features of that particular sales document types proto types are different.
    Eg:  base model is one and the same. like bajaj 110cc, 125cc, 150cc, 180cc, 200cc, 220cc.  here we are having only one blue print for all models but proto types are different.
    2.
    For my Z customrized order type, does there also have one internal format order type??
    2.A. the sales order which you have copied from.
    3.Because we are using LSMW to upload open Sales orders....The order type has to be indicated as internal format...
    3.A. it depends on your requriment how the sales orders are uploaded because you know which field to consider and which field not to consider while uploading.
    hope this is help ful for solving your issue.
    regards,
    balajia

  • O/P taking Internal format while downloadin to MHTML document

    Hello all,
    I am having one report in PS module. The O/P is displayed in ALV and it is Properly alligned.
    First field is PROJECT Definition from PROJ table.
    It is PSPNR.  The o/p it shows is proper in Character format.
    When we try to download the o/p in MHTML format the PSPNR i.e. Project Definition takes Wrong Data type.
    It is picking up internal format of PSPNR i.e. NUMC(8).
    The user wants it in Character format as it is in ALV.
    Can anybody of you do have the solution for this?
    Best Regards,
    Harish

    This issue has been resolved.
    Hence I am closing it.
    Thanks and regards,
    Harish

  • SWL SC only considers partial amount of Internal Order

    Greetings, Experts.
    We are using SRM 4.0 - Classic and use Portal for creating SC.
    We have an Internal Order no. 1111 in the backend with original budget as 1000 GBP and unassigned budget as 700 GBP (1000 less 300 assigned to already created PO's). The Internal order is created for Controlling Area CA01 which has PDR as the currency.
    We create SHOP WITH LIMIT (SWL) SC in USD currency with this internal order as account assignment. Reason of using USD (instead of GBP which is the Internal order currency) is - we want PO in USD because Vendor currency is USD. The resultant PO will have account assignment = F(order) and Item Cat=D (service).
    For simplicity sake assume that 700 GBP = 1200 USD.
    When we specify limit amount as 1200 USD in SWL SC, the system throws error that this amount exceeds the budget. Not only this, say for any amount more than 300 USD, the system keeps on throwing this error and we can not create the SC.
    In essence, we can not use the full unassigned amount to crete SWL SC.
    The system allows to create SC if Limit amount is less than 300 USD.
    We have tested -
    1) If we create SHOP SC (as against SWL), the system allows full unassigned amount of internal order.
    2) If we create stand-alone PO in the backend, the system allows full unassigned amount of internal order.
    Please help in resolving - why the system does not allow full unassigned amount of internal order while creating SWL SC?
    Thanks and regards
    Vilas

    Hi
    <b>Please go through the following SAP OSS Notes -></b>
    Note 640369 - Incorrect values in dropdown in account assignment details
    Note 1027656 - Simplified pricing:wrong price calculation in SC using prod.
    Note 1038241 - Simplified pricing: Follow-on note to note 1027656
    Note 1034949 - Wrong price in SC when a product has multiple conditions
    Hope this will help.
    Regards
    - Atul

  • IPhone doesn't recognize numbers in international format

    There's a problem now that arised in Egypt.
    Before 2 days then numbering scheme was that mobile numbers are 10 digits:
    3 digits for network code & 7 digits for number.
    Now what happened that numbers had just exteneded to be 11 digits:
    3 digits for network code & 8 digits for number.
    in old scheme that iPhone successfuly recognized the mobile number:
    012 3456789 same as +2012 3456789.
    Now in new scheme doesn't do this. calls are sent in local format : 012 34567899 but msgs are received in international format +2012 34567899.
    We need help in solving this issue. I'm using iPhone 4 with software 4.3.3

    Dear's
    Vodafone has finally conformed the problem, and it's even writen in El masry El yoom yesterday.
    Fix will be avaliable within the comming 7 to 10 days from Apple. may be with the new IOS 5?.
    Thanks

  • Converting WBS element from internal format

    HI,
    I have data from R/3 rolling into ODS from datasource and it comes in as the SAP WBS internal format 12345 instead of AZ/12678/10000/2000 etc.
    The WBS field on the datasource already contains a conversion routine but is there any way that I can get this data in the correct format when inserting into the ODS or when it comes into original datasource?
    Thanks

    Thanks but I dont want to use it in the query I want to use it in the ODS as a lookup between another ODS which holds the WBS in the correct format.
    So I have one ODS with the correct format, I want to use the WBS here to go to another ODS and use that WBS to look up the same value in ODS 2 and return a field from that where WBS1 = WBS2, unfortunatley I have teo different formats.

  • How to convert "any" date format to internal format

    Hi,
    I want to convert any date format  to internal format. Is there any function module ?
    The date formats could be:
    DD.MM.YYYY
    MM/DD/YYYY
    MM-DD-YYYY
    YYYY.MM.DD
    YYYY/MM/DD
    YYYY-MM-DD
    Thank you,
    Surya

    Hi,
    Check this sample program..It will convert sap supported external format to the internal format..
    PARAMETERS: v_char(10).
    DATA: v_date TYPE sydatum.
    DATA: v_period TYPE usr01-datfm.
    Get the format.
    DD.MM.YYYY
    IF v_char+2(1) = '.'.
    CONCATENATE v_char6(4) v_char3(2) v_char(2) INTO v_date.
    ENDIF.
    MM/DD/YYYY
    IF v_char+2(1) = '/'.
    CONCATENATE v_char6(4) v_char(2) v_char3(2) INTO v_date.
    ENDIF.
    MM-DD-YYYY
    IF v_char+2(1) = '-'.
    CONCATENATE v_char6(4) v_char(2) v_char3(2) INTO v_date.
    ENDIF.
    YYYY.MM.DD
    IF v_char+4(1) = '.'.
    CONCATENATE v_char(4) v_char5(2) v_char8(2)  INTO v_date.
    ENDIF.
    YYYY/MM/DD
    IF v_char+4(1) = '/'.
    CONCATENATE v_char(4) v_char5(2) v_char8(2)  INTO v_date.
    ENDIF.
    YYYY-MM-DD
    IF v_char+4(1) = '-'.
    CONCATENATE v_char(4) v_char5(2) v_char8(2)  INTO v_date.
    ENDIF.
    WRITE: / v_date.
    Thanks,
    Naren

  • Convert to internal format

    Hi!
    nice question popping up again and again:
    When entering any text value on a screen (dynpro) field, it is automatically converted to ABAP internal format.
    This is done according to the technical characteristics defined in the underlying domain.
    If a conversion routine is specified for the domain, it will be processed. I.e. conversion exit 'ALPHA' will used the function module 'CONVERSION_EXIT_ALPHA_INPUT'.
    Many (or most) domains are not connected to conversion routines. Date and numeric values are converted according to the user and/or language settings for external representation of dates and numeric values.
    But: There seems to be no way to call those conversion routines from ABAP programs.
    Why not?
    regards,
    C.

    Hi,
    To convert dates or numeric values in user-specific format you can use WRITE stmt.
    data: odate(10),
          onum(20),
          value type p decimals 2 value '123456.78'.
    write sy-datum to odate.
    write value to onum.
    Svetlin

  • Convert date to internal format

    Hi,
    I am getting date in the format as detailed below:
    10/16/2005, 6/16/2005, 10/6/2005 - MM/DD/YYYY
    I have to convert it to the internal date format.
    Please help with the code.
    Thanks
    SAPBW

    Hi,
    Use Function module <b>CONVERT_DATE_TO_INTERNAL</b>.
    It will consider all types of date formats 10/16/2005, 6/16/2005, 10/6/2005 etc. Whether you will give 1 or 2 digits to month or date. You can also give 2 digits to year even then it will converts to internal format.
    <b>You need to give dates in User defined format otherwise it generates an exception DATE_EXTERNAL_IS_INVALID.</b>
    DATA V_EXT_DATE(10) VALUE '10/06/2005'.
    DATA V_DATE TYPE SY-DATUM.
    CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
      EXPORTING
        date_external                  = V_EXT_DATE
      IMPORTING
        DATE_INTERNAL                  = V_DATE
      EXCEPTIONS
        DATE_EXTERNAL_IS_INVALID       = 1
        OTHERS                         = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    WRITE:/ 'INTERNAL FORMAT OF DATE IS: ', V_DATE.
    Thanks,
    Vinay
    Thanks,
    Vinay

  • FM to convert functional location to internal format

    Hi all,
    Is there any fucntional location that converts a funcitonal location to internal format?
    Eg: Input to FM is : METER7
    Output from FM should be : ?0100000000000000759
    Please let me know.
    Thanks & Regards,
    Srilakshmi B

    Try following code.
    CALL FUNCTION 'CONVERSION_EXIT_TPLNR_INPUT'
        EXPORTING
          INPUT                      = l_floc
      I_FLG_CHECK_INTERNAL       = 'X'
       IMPORTING
          OUTPUT                     = l_floc_int
    EXCEPTIONS
      NOT_FOUND                  = 1
      OTHERS                     = 2.
    Hope it helps..
    johnson zavier

  • Oracle Error 1801 - "Date format is too large for internal format"

    We have an application deployed under WebLogic and are using the Oracle JDBC drivers to talk to the DB. It appears that when under heavy load and trying to hit a stored procedure we get "Action:EnrollParticipant,Error
    type:Application error,doing:writeEmpUpdate,dbcode:-1801,ssn:xxxxxxxxxx". The dbcode of 1801 is a "Date format is too large for internal format". Has anyone had this happen, or know what the solution might be?

    We have an application deployed under WebLogic and are using the Oracle JDBC drivers to talk to the DB. It appears that when under heavy load and trying to hit a stored procedure we get "Action:EnrollParticipant,Error
    type:Application error,doing:writeEmpUpdate,dbcode:-1801,ssn:xxxxxxxxxx". The dbcode of 1801 is a "Date format is too large for internal format". Has anyone had this happen, or know what the solution might be?

  • In scripts i want to display the total puchage order amount in text format

    Hi to all,
    Here my requirement is to display puchage order number,date,amount for individual order and total purchage order amount in same window in decimal format and i want to display this purchage order total amount in text format in another window ,is it possible or not
    please give solution asap urgent.
    regards,
    surya.

    Hi Surya
    It is possible ....jst call the routine in script..
    /:PERFORM SPELL_AMOUNT IN PROGRAM ZXYZ
    /:USING &REGUD-SWNES&
    /:USING &REGUD-WAERS&
    /:CHANGING &WORDS&
    /:CHANGING &DECIMAL&
    /:CHANGING &WAERS&
    /:ENDPERFORM
    P1 <C1>&WORDS& AND &DECIMAL&
    ....and write the code in  tht routine program....
    data: it_spell like spell.
    data: swnes type regud-swnes,
          waers type regud-waers,
          var1(20) type c,
          var2(20) type c.
    *&      form  spell_amount
          text
         -->input      text
         -->output     text
    form SPELL_AMOUNT  tables  input structure itcsy
                               output structure itcsy.
      read table input index 1.
    input = swnes.
      replace all occurrences of '*' in input-value with space.
      shift input-value left deleting leading space.
      translate input-value using ', '.
      condense input-value no-gaps.
      split input-value at '.' into var1 var2.
      condense: var1, var2.
      swnes = input-value.
      read table input index 2.
      waers = input-value.
      call function 'SPELL_AMOUNT'
       exporting
         amount          = swnes
         currency        = waers
      filler          = ' '
         language        = sy-langu
       importing
         in_words        = it_spell
       exceptions
         not_found       = 1
         too_large       = 2
         others          = 3
      if sy-subrc eq 0.
        refresh: output.
        output-name = 'WORDS'.
        condense waers.
        case waers.
          when 'USD'.
            concatenate it_spell-word 'DOLLARS' into
             it_spell-word separated by space.
          when 'EUR'.
            concatenate it_spell-word '' into
             it_spell-word separated by space.
           concatenate var2 'euros' into var2 separated by space.
          when others.
        endcase.
        output-value = it_spell-word.
        append output.
        output-name = 'WAERS'.
        output-value = waers.
        append output.
        condense waers.
        case waers.
          when 'USD'.
            concatenate var2 'CENTS***' into var2 separated by space.
          when 'EUR'.
            concatenate var2 'EUROS' into var2 separated by space.
          when others.
        endcase.
        output-name = 'DECIMAL'.
        output-value = var2.
        append output.
      endif.
    endform.                    "spell_amount
    this will give output as TEN DOLLARS & 20 CENTS....
    u can change the code as per ur requrement...
    Reward if Helpful....
    thnx
    Rohit

  • Convert amount to XUDCPFM format in RFC

    Hi experts:
      We are using a RFC to get invoices and amounts from SAP to be displyed in a web (not webdynpro, just JAVA and HTML). 
      The problem is the numeric format. In SAP amounts are stored as xxxx.yy (using dot as decimal separator) but displayed in the format in table USR01 field XUDCPFM (in our case,  ' ' as we are in Spain, which means 1.234,56).
      We want the data to be displayed in the web in the same format as in SAP, and my questiobn is: does anybody know the function or method used in SAP to convert the amount to the format in XUDCPFM field?.
    Thanks in advance for your help.
    Regards,
    Carlos.

    Hi Rajan:
      Thanks for your answer.
      This works to change the format the amounts are displayed in SAP, but not the format returned by the RFC.
       What I would like to know is how SAP changes the amount format from 1234,56 (as stored in DB) to 1.234,56 (as displayed in SAP). 
    Regards,
    Carlos.

  • Reg : FM to convert to internal format

    Hi All
    For numeric values, I want to know if there is any function module to convert user entered values to the internal format as per user setting.
    Thanks in advance
    -jawahar

    Hi Ravi
    There is a particular way numeric values ( i mean, quantities like net weight and gross weight)gets stored as per the user setting. Like in india 3,000.00 , in US
    they follow 3.000,00. Is n't it? Our thousands separator ',' for us is decimal point for them.
    Whichever way user enters, I want to convert to the internal format as per user setting.
    for this do we have to manually code anything  or any standard FM is there for this?
    If we have to code anything for it, How to go about it?
    Am I clear for u? if not pls don't hesitate to ask me
    Thank u for responding

Maybe you are looking for

  • Supress Vendor name in std report S_ALR_87012103 - Vendors: Items

    Hi , I am using report 'S_ALR_87012103 - Vendors: Items -> List of Vendor Line Items' to list the vendor open items and in the output the vendor name with address is displayed, I want to supress name and address so that when I download to excel it wi

  • Table for accounts receivable

    Hi experts, Which table stores accounts receivable and accounts payable data mainly? prasad

  • Need help converting SQL "OVER (PARTITION BY   )" to JPQL equivalent - JPA

    Having trouble converting this query: select sdi, val, vldtn, TO_CHAR(sdt, 'yyyy-mm-dd hh:mi:ss AM') from select sdi, val, vldtn, sdt, max(sdt) over (partition by sdi) as MaxDate1 from r_ins ) x where x.sdt = x.MaxDate1 and sdi in (1234,2345,3456,456

  • EventHandler not executes for more of an user

    Hi Guys, I have three eventhandlers Post-Process, generator user login, associate the user manager and changer user status, from OIM 11g. When executes my HR reconciliation, and exists a new user to be created, is executed all eventhandlers normally,

  • Plz help with BDC coding

    Hi, In the QM view of mm02 I have 5 rows containing inspection types 1,2,5,7,15. When I do the BDC recording to delete insp type 5, the BDC cursor is on position (03) RMQAM-SELEKT(03). How do I write the BDC code to select the row based on inspection