Amount Field format problem

Hi,
I am uploading G/L entry using STD program RFBIBL00.
In input excel file I am getting amount as 1000.1
When i upload excel to Internal table field (Type C) it is 1000.1
I am passing this value as it is to BBSEG-WRBTR.
Program creates BDC Session. But when I execute BDC session in foreground/backgorund, the amount field show 1000,1
and gives error "Input should be in the form __.___.___.__~,__"
My current decimal notation at user level is 1,234,567.89
I tried passing amount to BBSEG-WRBTR in all possible formats but no use.
If i pass amount without decimal. i.e 1000, it works fine.
BBSEG-WRBTR is char16 field.
Any idea, what could be the problem?
This is very urgent.
Thanks &  regards,
Umesh

I am pasting code.
Whatever commented, all tried.
FORM convert_amount  USING    p_dcpfm   TYPE xudcpfm
                              p_in_amt  TYPE c
                              p_waers   TYPE waers
                     CHANGING p_out_amt TYPE wrbtr_bi.
Input amount will be in 99999.99 format
  DATA: lv_amount TYPE wrbtr.
  lv_amount = p_in_amt.
  p_out_amt = lv_amount.
CLEAR p_in_amt.
WRITE: lv_amount CURRENCY p_waers TO p_out_amt.
CONDENSE p_out_amt.
WRITE p_out_amt TO p_out_amt LEFT-JUSTIFIED.
CASE p_dcpfm.
   WHEN ''.    "1.234.567,89
     TRANSLATE p_out_amt USING '.#'.
     TRANSLATE p_out_amt USING ',.'.
     TRANSLATE p_out_amt USING '# '.
   WHEN 'X'.   "1,234,567.89
     TRANSLATE p_out_amt USING ', '.
     CONDENSE p_out_amt NO-GAPS.
   WHEN 'Y'.   "1 234 567,89
     TRANSLATE p_out_amt USING ',.'.
     CONDENSE p_out_amt NO-GAPS.
ENDCASE.
ENDFORM.                    " convert_amount

Similar Messages

  • How to maintain the amount field format after GUI_DOWNLOAD

    Hi everyone.
    I have this problem on my object.
    The format of field ERFMG in table AUFM is 3.921,569.
    After I SELECT it INTO an internal table it becomes like this 3921.569
    I would display this internal table in ALV and its ok. Its format is 3.921,569 The format is also not changed when I download it into an excel file using LIST -> EXPORT -> LOCAL FILE -> SPREADSHEET.
    However my program should automatically download to local if the user tick a checkbox in the selection-screen. It will use function module GUI_DOWNLOAD. When this is used, the format of ERFMG changes to 3921.569 again, since it is using my declared internal table.
    How will I use GUI_DOWNLOAD without changing the format of amount fields like ERFMG? What are my other options to do this?
    The Decimal Notation in my User Profile is already set to 1.234.567,89
    Thank you in advance.

    Hi Cris,
    To get the output in the user format for the decimals, try the following code.
    data: wg_dec(7) type p decimals 2.
    data: wg_dcp type usr01-dcpfm.
    data: wg_dec_str(10) type c.
    wg_dec = '111135.67'.
    select single dcpfm from usr01
            into wg_dcp
           where bname = sy-uname.
    move wg_dec to wg_dec_str.
    if wg_dcp ne 'X'.
      replace all occurrences of '.' in wg_dec_str with ',' .
    endif .
    write:/ wg_dec, wg_dec_str.
    I dont feel there is any other option where you can change the decimals format as per the user profile.
    While giving the output of decimal values in a list, the system automatically displays it in the profile set by the user.
    This code will help you to set the decimal value as '.' or ',' as per the user profile.
    Note: It wont add the unit separator for hundreds and thousands. Again you have to do that manually.
    Hope this proves of some help to you.
    Regards,
    Pulkit

  • Number formatted Amount field not working in Excel 2010

    Hi,
    We have BI reports in EBS 11.5.10.2 designed using word 2007 RTF templates. The output is selected to write to Excel so that they can calculate on amount fields. Recently we upgraded to Office 2010 and the amount filed which has number format when downloaded to Excel will not allow to use functions like Sum. If i deleted the table column and add the column back, then it works. Is anyone runing into similar issues....

    Interesting to note this is still a problem, but even more interesting is as to why Excel works fine the first time you bring in the xsd, but not after you save it.  I found information that says it's related to resolving externally referenced xsds,
    which is fine, but again, why does it work the first ime and not the second?   If it were a problem with external xsds then it should never work at all so I think that answer is bogus.
    Something has to be getting corrupted on the save and it's not important enough to MS to spend the time to fix it.

  • Smartform: Formatting Problem with QUAN-Field

    I want to print a smartform and get exception 1 (formatting error). With function SSF_READ_ERRORS I get an error table. There is on entry: errnumber = 020011, msgid = SSFCOMPOSER, msgty = E, msgno = 601, msgv1 = wa_outtab-menge.
    It seems to be a formatting problem with field WA_OUTTAB-MENGE. But in the structure this field is referenced correctly.
    Does anybody know a solution?

    I solve this kind of problem in my SmartForm.
    Try this:
    Go to "Global Definitions" Node, then "Current/Quant.Fields" tab and set these values:
    Field Name:      WA_OUTTAB-MENGE
    Reference Field: WA_OUTTAB-MEINS
    Data Type:       QUAN
    Best Regards,
    Eduardo Ribeiro.

  • Amount field in smartform

    Hi Experts,
    I am developing smart form for invoice.In output it is displaying amount field like this
    123.44,65 instead of 123,44.65.(I.e full stop is coming in place of comma and vice versa).
    please help me.
    Thanks,
    Santosh

    Hi
    In order to convert the amount field  we need to check first user settings . Even though the User setting value is 'X' .
    The amount will not display correclt .
    For this proper soultion is change the format according to country settings .
    for that we need to give the syntax set country countryid.
    this syntax will look into T005X if the country id is avaliable  it will fetch the decimal notation provided.
    if not provided you need to provide the syntax
    SET COUTNRY SPACE . Here space will check the user settings and change the correct settings.
    Please  provide the SET COUNTRY SPACE before where you are trying to display . ie using flow logic -> program lines
    or in driver program  where you are trying to calculate .
    I have done the same thing when i had this problem for Purchase order smartform.
    Thanks
    Hariharan.

  • Transfer amount fields to app. server using fieldsymbol

    Hi,,
    I am facing a strange problem while using fieldsymbols .Here is my requirement.
    I have a custom table records ( which also contains amount fields ) in fieldsymbol , which i need to transfer to application server . But when i am trying to transfer to file , using  Transfer <final> to p_file , amount fields are not getting converted to characted format and program is going to shortdump. After that i tried assigning this <final> to another fieldsymbol , of type c (using casting ) , records were able to transfer to file but the amount fields are not being converted to readable format (i.e unknown symbols , like #p## ) .
    I even tried SAP_CONVERT_TO_TEX_FORMAT to convert the contents to text format but i am unable to transfer with fixed length to application server file..
    As it is a dynamic program , i am using fieldsymbols instead of internal tables.
    Can anybody please help me transferring amounts also to appl .server file , with fixed length..
    Thanks in advance..

    Hi
    The <field symbols> doesn't change the format of the field, so you need to convert it in char format before transfering it to file.
    DATA: WA TYPE STRING.
    MOVE <FINAL> TO STRING.
    TRANSFER WA TO P_FILE.
    Max

  • Alignment required in to display the  Amount field

    Hi Friends,
    kindly help me facing problem in to display the amount using decimal places also
    nedd to display the Pretax and aftertax amount for that purpose
    written below code . 
    it is picking amount fields but the amount is printing like this
    pretax                  aftertax
    $ 34.67               $     0.00
    $ 21.64               $   120.90->
    I need to display amount fields in order like, thens, hundreds, thousands like.
    read table lt_final into ls_final with key bplan = 'PRD'.
       if ls_final-pretx = 'X'.
         pretax = ls_final-eecst.
         write pretax to lv_pre.     "#EC UOM_IN_MES
         concatenate c_dollar lv_pre into lv_dollar.
          shift lv_dollar right deleting trailing space.
    *Pretax totals
         lv_pretax = lv_pre.
         read table out_pay1 with key name = 'PRETAX'.
         check sy-subrc = 0.
         out_pay1-value = lv_dollar.
         modify out_pay1 index sy-tabix.
         clear out_pay1.
       else.
         aftertax = ls_final-eecst.
         write aftertax to lv_after. 
         concatenate c_dollar lv_after into lv_dollar1.
          shift lv_dollar1 right deleting trailing space.
    Aftertax totals.
         lv_aftertax = lv_after.
         read table out_pay1 with key name = 'AFTERTAX'.
         check sy-subrc = 0.
         out_pay1-value = lv_dollar1.
         modify out_pay1 index sy-tabix.
         clear out_pay1.
       endif.
    Thanks,
    Sai

    Hi Daya,
    I would like to print two amount values with decimals.
    like :  like Pretax      after tax
                                   $      0.00
          $   3.45             $  120.67
          $   0.00             $      0.00
    I created using right justification one paragraph format with two tabs
    60.00              ch           Right
    68.00              ch           Right
    But my program output is comming like this.
    any one please help me.
    Program output:
    Pretax               after tax
                                   $    0.00
          $   3.45           $  120.67
          $   0.00             $    0.00
    Thanks,
    Sai

  • User defined function to check the NULL and 0.00 value in a Amount field

    Hi Experts,
    I have one scenario in which i have amount field in Data type.
    I have to create one UDF which will do the following thing.
    1. If the amount field is Null it should throw an exception in mapping.
    2.If the amount field is 0.00 it should throw an exception in mapping.
    3. For all other cases it should pass the amount value to the target.
    Can anyone provide me the code For this UDF.
    Thanks in advance.

    Hi,
      You can add this logic to the UDF. Here var1 is the input string.
    java.math.BigDecimal b=new java.math.BigDecimal(var1);
              if(b.compareTo(new java.math.BigDecimal("0.00"))<=0)
                   //write your logic for values less equal to zero
    One small request, if you think your question has been answered, properly and correctly, could you please kindly if possible close down this thread. It helps people who look for solutions to similar problem.
    regards
    Anupam

  • DIsplaying WRBTR (AMOUNT FIELD)WITHOUT  DECIMAL PLACES

    Dear all,
    I am facing a problem in displaying amount field  in alv report. I have two currency keys (US dollar and Japan yen). if it is japan yen I should not have to show decimal places and if it is US dollar I should show decimal places.
    How can I do it in a alv report if I have only one output amount field?
    thanks
    Ranjan.

    Hi chittaramjan,
    1. use this kind of funda (just copy paste in new program)
    Important things
    a) one extra field in internal table
      declared in the same exact fashion
    waers LIKE tcurc-waers,
    b) Populate this field
    c) REST THE System will take care
       (based upon country settings)
    2.
    REPORT abc.
    TYPE-POOLS : slis.
    DATA : alvfc TYPE slis_t_fieldcat_alv.
    DATA  : BEGIN OF itab OCCURS 0,
            f1  LIKE P0008-BET01,
            waers LIKE tcurc-waers,
            END OF itab.
    START-OF-SELECTION.
      itab-f1 = '-4.15'.
      itab-waers = 'KRW'.
      APPEND itab.
      itab-f1 = '4.68'.
      itab-waers = 'GBP'.
      APPEND itab.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name     = sy-repid
          i_internal_tabname = 'ITAB'
          i_inclname         = sy-repid
        CHANGING
          ct_fieldcat        = alvfc.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program      = sy-repid
          it_fieldcat             = alvfc
        TABLES
          t_outtab                = itab
        EXCEPTIONS
          OTHERS                  = 2.
    regards,
    amit m

  • Error in Report: Next to amount field i could see 'ERROR' word in report

    Guys,
    Problem in Report: Next to amount field i could see 'ERROR' word in report
    Eg: Invoice Amount  : "1200ERROR"  it should be like "$1200".
    Pls help where do i need to check.
    Thanks

    Ajeet wrote :
    Hi,
    It can heppens if all the records getting aggregated in the report are of different currencies and not belonging to one currency.
    Do a currency conversion for the key figures and make them all with same currency.
    See if the records in the cube for the selection which you have given in the report gives you records with different currency and if it is true then as above said.
    Thanks
    AJeet
    Are you sure ???
    The mixed unit values will be displayed as * (by default unless its changed).
    ERR comes if unit is not maintained.

  • Amount File Formatting in XSL mapping

    Hi Guru(s):
    I have an XSLT mapping within an File to BPM scenario. The Flat file has an amount field of 13 characters, and reads a value like 16.10, followed by trialing whitespace to fill out the 13 positions.
    I am able to read this file properly with a file adapter (have content conversion), which I am mapping to a BPM input.
    I have an XSLT mapping that trasnfrms the file output to the BPM input. After the transformation, sometimes, the <SignedAmount> attribute has a non-conforming output, something like: 1610.0000000000002
    Is this a bug in XSLT. How can this be resolved.
    BTW: I am using XI3.0 SP14.
    XSLT Code snippet:
    <SignedAmount>
    <xsl:choose>
       <xsl:when test="DebitCreditIndicator[1]='D'">
        <xsl:value-of select="number(ChargeAmount[1] * '100')"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="number(ChargeAmount[1] * '-1'  * '100')"/>
      </xsl:otherwise>
    </xsl:choose>
    </SignedAmount>
    However, I get to see different behaviors for different nodes on the output.
    In particular, note the second ISEG node:
    - <ISEG>
      <SignedAmount>79</SignedAmount>
      </ISEG>
    - <ISEG>
      <SignedAmount>1610.0000000000002</SignedAmount>
      </ISEG>
    The Actual Output of the file adapter looks fine as below:
    <Detail>
      <ChargeAmount>0.79</ChargeAmount>
    </Detail>
    <Detail>
      <ChargeAmount>16.10</ChargeAmount>
    </Detail>
    Thanks
    Feroz

    Why don't you try formating the number with XSL?
    <xsl:template match="/">
    <html>
    <body>
    <xsl:value-of select='format-number(500100, "#.00")' />
    <br />
    <xsl:value-of select='format-number(500100, "#.0")' />
    <br />
    <xsl:value-of select='format-number(500100, "###,###.00")' />
    <br />
    <xsl:value-of select='format-number(0.23456, "##%")' />
    <br />
    <xsl:value-of select='format-number(500100, "#######")' />
    </body>
    </html>
    </xsl:template>
    http://www.w3schools.com/xsl/func_formatnumber.asp

  • Error when displaying amount field in HTMLB Tableview

    Hi all,
       I am displaying some 'X' table in HTMLB Tableview and it has one amount field.But reference(currency) field of that amount field is in other table . I know it gives the error.
    Please tell me there is any other way to resolve this problem with out adding reference(currency)field in the same table?
    Thanks and Regards ,
    Harikrishna .

    Hi Hari,
    But reference(currency) field of that amount field is in other table . I know it gives the error.
    It will not give any error , you can use the currency key field of other table or structure .
    Alternatively you can use  predifined type DEC instaed of CURR  .
    Regards,
    Anubhav

  • Payment check amount field

    Hi;
    I've already made a Z for payment check and works fine, but we have notice something when preview the checks in the spool, some checks in the amount (in numbers) field "*****999,999.99" sometimes it´s moves like this:
    1) example                                    "......******999,999.99"
    2) example                              ".............******99,999.99"
    3) example                                   "....******999.99"
    and so....
    in DEV we made a lot of test printing in paper the payment check an worked fine, but the problem is in QAS.
    How can i get that the amount doesn´t move in the sapscript...?
    Thanks on advance,
    David Fúnez
    Tegucigalpa, Honduras
    Edited by: David Funez on Feb 23, 2012 9:27 PM
    Edited by: David Funez on Feb 23, 2012 9:27 PM

    Hi David,
        create a SIGN aligned tab for that amount field. The tab is nothing but the position in the form from where the printing of that particular field should start.
    This should solve your problem.
    Please revert if you still face any problems.
    Regards,
    Praveenkumar T.

  • Format problem when export to RTF

    Hi,
    Iam creating a RTF template, when export to pdf everything working fine. However, when i export to RTF(word) alot of document properties got lost such as :
    font size default to 12 when it's blank line; page number are not re-start for multi sections; table properties not holding, header, footer and edge margin are not holding, etc...... Is there any way to fix these. I tried to create a word macro to fix some of the format problems, but the macro have to run manually instead of initialized form a text field option on exit. Any idea on how to fix or work around would be appreciated.
    Thanks,
    Tam

    im2famous4u wrote:
    Do you know if and when Pages will provide support for tables in rtf format? (My school requires that I send all assignments rtf format.)
    As Yvan points out, no one here can write what they know about it, and the vast majority of us know nothing about it.
    You cannot take any decision based on the assumption that Pages will one day support tables in RTFs, because it may never happen. If you need both RTF and tables, the only option is another tool (like NeoOffice, TextEdit, MS Office and so on).

  • Thousand Separator is Not Appearing in Amount Fields iRecruitment

    Hey Guys,
    My requirment is to show comma as thousand Separator for example 10,000 but its showing 10000.
    I am facing this issue in all amount fields in iRecruitment like Vacancy Page (Min Propose and Max Propose) and Offer Page.
    I set the below profile options
                  Currency:Thousands Separator = Yes
               ICX: Numeric Characters = 10,000.00
    and
             Preferencess > Regional Section > Number Format  = 10,000.00
    I am using EBS 12.1.3 and i cleared cashe but still no effecet. Is there any other setting need to be done?
    Please Help
    Regard
    Mazhar Hussain

    i am also thinking same about it, but right now my CSI is has been expired so i cnt log SR that why i asked here if someone even experience it.
    Regards
    Mazhar Hussain

Maybe you are looking for

  • PLEASE HELP! Hooking up WRT54G2 to a Verizon GT704-WG

    I have searched here and google, no luck. Here is what I am trying to do. I have Verizon DSL in a two story house, Verizon only issues and uses one modem/router (Actiontec GT704-WG). I have no houses near me within 1500 feet. It is a wireless router

  • Material Availability Report for Sales Order

    Hi, Is there any report which gives me for a sale order line item which is either pending or not yet picked in delivery, but for which stock is not available. If such report is not available then what to we do for getting the same? Regards, Ajit

  • How do I save documents in 2009 Pages for my new IMac

    I have a new 10.10.2 iMac and cannot open saved documents from older version of pages. Is there a way to convert them?

  • Finding iWeb domain.sites2

    Long story short, my computer fried and I was able to get a carbon copy of the hard drive. Immediately I searched forums on how to restore an iWeb site and read to find the domain.sites2 file in the iWeb application support file. Problem is, I'm not

  • Application Builder - Installer - Missing Files

    Hello, I have a very large project and I want to create an installer. I have prebuilded the exe and all the necessary files and added them to the new project as files. Somehow, when I want to create a new installer, I can not see my exe files (added