How to format a currency value

Hi,
I have an internal table with a field of type cosp-wtg001 (data type CURR length 15). Field works fine (it stores well the value and this sort of things) but when I store internal table into a file (with GUI_DOWNLOAD function) negative values appears with the minus operator at the end of the number. For example:
3400- instead of -3400.
But I need that the operator appears before the value (I need -3400 instead of 3400-).
How can I do this?
thanks in advance

Hi Javier,
Use this formatting for your internal table.
data : ws_temp type p decimals 2,
data : begin of i_t_amount1 occurs 0,
qsshb like bseg-qsshb,
end of i_t_amount1.
data : begin of i_t_amount2 occurs 0,
qsshb(15) like c,
end of i_t_amount1.
loop at i_t_amount1.
move corresponding it_amount1 to it_amount2. 
IF it_amount2-qsshb+15(1) = '-'.
ws_temp = it_amount2-qsshb
ws_temp = ws_temp * -1.
it_amount2-qsshb = ws_temp.
ENDIF.
append i_t_amount2.
endloop.
Download the second internal table.
Check this post if required.
Re: +/- Indicator (Leading - sign)
http://help.sap.com/saphelp_erp2004/helpdata/en/ff/4649baf17411d2b486006094192fe3/frameset.htm
Hope that helped.
Thanks,
Susmitha

Similar Messages

  • How to format negative currency values (remove () )?.

    Hi, I have a field that ocasionally can contain negative raw values.
    What happens is, when a negative raw value is fed to the field, the field looks like this:
    ($999.999,00)
    And I'd like it to look like this:
    -$999.999,0
    Any ideas how to do this?, I couldn't find any option in the patterns section.
    Thanks!.

    If you use num{$zzz,zzz,zz9.99} as your display pattern you will get the negative sign after the dollar sign:
    $-999 999,00
    Commas, periods and spaces are put in depending on the locale you choose. The example above is French(Canada). I'm not sure what locale would use periods to separate thousands.
    Kyle

  • How to enter the currency value Flex mobile

    Hi, friends, I type from Brazil
    how to enter the currency value in textinput
    format BR ( Brazil )?:
    Thank's

    Hello Ashok,
             Using the same BAPI , set the field R_3_USER of the tables parameter TELEFONDATA to 3 to save the mobile number.
    Hope it helps.
    Thanks,
    Sriram S

  • How to format table column values to currency?

    All,
    I have bound a context attribute (type - string)  to a table column (TextView) which is used to display currency.
    It displays the value as 123456789.00
    How do I format the value as 123,456,789.00?
    Is there any FM available to format?
    I don't want to change the above context attribute type to CURR.
    Thanks
    Thruna

    >I don't want to change the above context attribute type to CURR.
    Why not?  That is the correct thing to do. That way you get formatting, sorting, even the correct decimal position and notation for different currencies and user settings.
    If you must go with string for the context attribute then I still assume your source data is type CURR.  When you 'move' this content into the string of the context attribute use the WRITE statement.  This will format the currency variable for output.

  • How can i get currency values from flatfile to function module

    Dear All,
               I have to take  currency values from flat file and i have to assign those flat file value to function module .
    Eg: "Convert_to_local_currency".  I need technical code how to calculate those amount in work area and how to assign those amount value function module. 
              I need sample program for currency conversion from flat file to function module.  My requirement is based on flat file amount i have to calculate in work area and assign those work area to function module. 
    With Regards,
    Baskaran

    Hi Satish or Baskaran,
    First conform in which format the flat file is present, as abhi mentioned if it is there in notepad
    try to use F.M GUI_UPLOAD as shown below...
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
    FILENAME = 'C:\Desktop\rpf1.TXT'
    TABLES
    DATA_TAB =  ITAB.
    Now loop at ITAB Into Work_area and press the respect currency fields which you want and in the same way
    if the file is in EXCEL format use F.M ALSM_EXCEL_TO_INTERNAL_TABLE
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename = P_FNAME
          i_begin_col = 1
          i_begin_row = 1
        TABLES
          intern = ITAB
    LOOP AT ITAB INTO WA.
    CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
            EXPORTING
              foreign_currency = wa-waers
              local_currency   = wa-waers
               IMPORTING
              local_amount     = tvals-gross.
        ENDIF.
    endloop.
    And as mentioned loop the records into work area and process the currenct field which is present in the
    ITAB according to its field name. And make sure within the loop you call your function module.
    Regards
    VEnk@
    Edited by: Venkat Reddy on Dec 9, 2009 5:51 PM

  • How to apply unique currency values in the report?

    Hi Guys,
    I have a report showing that different currency values.I would like to have same currency values throught out the report.And one moew query i am also getting the zero's in the report so how i can supress zeros in the report?
    Thanks

    Hi,
    For unique currency, go to RSCUR, give the currency translation type and click Display.
    You will enter into Edit currency conversion type screen.
    Go to currency tab screen and select the source currency from data record as you are getting multiple currencies, and in target currency select appropriate option as per your requirement.
    Save it and come back to query designer, go to properties of that KF, you have a conversions tab. there select the conversion type and target currency.
    And regarding suppressing zeros, goto properties of the query, click on Rows/ columns tab.  Under this you will find the option to supress zeros and effect on rows and columns.
    Hope this will help you.
    Regards,
    Praveen

  • Currency value

    Hi
      I would like to know, how the daily  changing currency values are stored in SAP(US Dollar) and in which table its store and how its get updated.Can any one explain briefly.
    Regards
    Arunkumar

    hi arun,,,,
    its simple and cant be brief anymore.
    1,)SPRO > SAP Netweaver> General Settings --> Currencies....it is the way to go the table
    2.)TCURR is the table for storing .
    3.) Updates in the table TCURR
    thanxs and regards
    sachin sharma
    njoy!!

  • How to format model attributes

    I have staffNumber attribute as model attribute which is of type IntegerObject(not premitive int) . In inputTextbox it appears as 3,172 instead of 3172 . How to format Integer object values so that I can display values without comma . I know that , we can create a simple type in dictionary , select format for premitive integer type in representation . However I don't want to do that .
    Pl help
    Bhat

    I was fed-up and ultimately had to use this code at every integer attribute of model nodes
    wdContext.nodeXXX.getNodeInfo().getAttribute("eoStaffno").getModifiableSimpleType().setFormat("##########");
    I wanted a global function to change locale settings
    like if I do
    NumberFormat nf = NumberFormat.getInstance(Locale.getDefault());
    nf.setGroupingUsed(false);

  • How to display currency values in indian format

    hi all,
       When I am displaying Currency values as output , those are displaying in U.S. format (ie.1,234,000.00) , But I need to display those in Indian Rupee format (i.e 12,34,000.00).
    Plz any one can help me that how to display this
    thank you,
    regards
    Hanuma

    Hi Hanuma kumar, please try this code.
    REPORT ZAMOUNT_CONVERSION.
    DATA : RESULT1(20).
    PARAMETERS : NUM TYPE P DECIMALS 2.
    DATA : num2 type STRING.
    DATA :  col_amt(20) type n,"15
             col_b type i,
             num_1(20) type C,"15
             Length type i.
    num_1 = num.
    write : 'default format      :',num.
    uline.
    skip.
    IF ( num >= 999999999 ).
           write num_1 using edit mask 'RR__,__,__,__,______' to col_amt.
           CONDENSE col_amt.
           length = STRLEN( col_amt ).
           if length = 16.
             REPLACE first OCCURRENCE OF ',' in col_amt with space.
             write :/'amount indian format:',col_amt.
           else.
           write :/'amount indian format:',col_amt.
           endif.
    ELSEIF NUM < 999999999 AND NUM >= 9999999.
           write num_1 using edit mask 'RR__,__,__,______' to col_amt.
           condense col_amt .
           length = STRLEN( COL_AMT ).
           if length = 13.
             REPLACE first OCCURRENCE OF ',' in col_amt with space.
             write :/'amount indian format:',col_amt.
           else.
             write :/'amount indian format:',col_amt.
          endif.
    ELSEIF NUM < 9999999  AND NUM >= 99999.
           write num_1 using edit mask 'RR__,__,______' to col_amt.
           condense col_amt .
           length = STRLEN( COL_AMT ).
           write :/'amount indian format:',col_amt.
    ELSEIF NUM < 99999.
       data : dumy(10) type c.
       dumy = num .
       CONDENSE dumy.
       length = STRLEN( dumy ).
         if length <= 6.
           write :/'amount indian format:',num.
           else.
           write num_1 using edit mask 'RR__,______' to col_amt.
           write :/'amount indian format:',col_amt.
          endif.
       ENDIF.
       uline.

  • Formatting Currency Value

    hi,
    In my page i have a table that displays values from the database. To do this, i have created a VO programmatically, since the VO has to change dynamically.
    In my database one of my column is of type NUMBER and shows the value like 10000.00. What i want is when i display this value in my OAPage, i want it to be formatted to 10,000.00. I dont have any EO, i have created the VO also programmatically.
    I have a basic idea that i have to use decimalFormat for this, but i am not know where and how should i use it.
    Please help me regarding this.
    Thanking you
    ri

    Hi,
    Using OATotalRowBean, i have wrriten the following statements to format the total values displayed in each and every column of a table whose Totalling is set to true.
    OATableBean tableBean = (OATableBean)webBean.findChildRecursive("Table");
         if(tableBean != null)
              OATotalRowBean totalRowBean = (OATotalRowBean)tableBean.getColumnFooter();
    System.out.println("Formattotal : "+totalRowBean);
    if (totalRowBean != null)
    oracle.cabo.ui.validate.Formatter formatter = new OADecimalValidater("#,##0.00;#,##0.00","#,##0.00;#,##0.00");
    totalRowBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);
    In the guide its mentioned to use getColumnFooter method of a tablebean. Even the example uses like the above. But when i do a dot after the tableBean ie in its intellisense the getColumnFooter() method is found striked. Still if i use it as above to format the total value, nothing is being formatted in my page and the variable totalRowBean returns a null value. I dont know where and what is wrong with this.
    Please help me in formatting the total value of table's each and every column to currency as formatted in the column values.
    Thanking you
    ri

  • How to format the value in narrative ?

    Hi Experts,
    In BIEE 11,
    How to format the value in narrative , such as separator.
    In table or pivot property, I have set the separator for measure , but in narrative, the format will be disappeared. So how to implement this requirment?

    I had this problem with 11.1.1.6.0
    If you want this format as the default display format for this column everywhere, then you can save that format as default display format for the column or data type (Lower right corner of data format tab: "Save as Default" button, "Save as the system-wide default for "Table"."Column"). When I had the problem the narratives did use the default display format.
    Another workaround could be a direct database call to convert the data to a string. For example, in Oracle
    EVALUATE('TO_CHAR(%1,%2)' AS CHAR(30), “Table".“Column" ,'$9,999.00')
    but you may need to set EVALUATE_SUPPORT_LEVEL in your nqsconfig.ini, and this ties you to the database technology.

  • In fact it's about mac:excel, how convert in a cell a number written in text format into a value?

    in fact it's about mac:excel8 or 11 in OSX10.7.4,
    how convert in a cell a number written in text format into its value?
    cheers francois

    Hi francois,
    If I copyone of them and do a past special/value, it does not work.
    Try just Paste instead of Paste Special > Value
    I know your question is about Excel, but this works in Numbers:
    Copy 1 234 567 (with spaces) and Paste (not Paste Special) into a Cell in a Numbers Table. The result is 1234567 and it behaves as a number. A formula will consider it to be a number:
    You asked Wayne: what do you mean by "to reference a cell" ??
    The reference is from Cell A2 to Cell A1 through a formula, such as: =A1+1
    Regards,
    Ian.

  • How to map single input value to Two columns of Database table using format file of Bulk Copy Process

    Hi All,
    Am using OPENROWSET to load the file data into table, here the problem is i need to map same input value to two different columns of table, As format file doesn't allow the duplicate numbers am unable to insert same value to two columns, please help me to
    find a solution for this. 
    i can use only OPENROWSET because i need to insert some default values also which come based on file. only the problem is how to map same input value to two different columns of table. please give me the suggestions.
    Thanks,
    Sudhakar

    From what you say:
       INSERT tbl(col1, col2)
          SELECT col1, col1
          FROM   OPENROWSET(....)
    But I guess it is more difficult. You need to give more details. What sort of data source do you have? What does your query look like? The target table?
    Erland Sommarskog, SQL Server MVP, [email protected]
    Hi Erland,
    Thanks for your response
    my source file is text file with | symbol separate for ex:
    1002|eTab |V101|eTablet|V100|Logic|LT-7|Laptops|SCM
    Database table have columns like
    column1,column2,column3...etc, now i need to insert same value from input file into two columns for ex:
    the eTab value from text file has to be insert into column2 and column3 of
    table
    we cannot change format file like below one
    for the above situation how can we insert eTab into column2 and column3
    Thanks,
    Sudhakar.

  • How to convert a string to a currency value ? getting a dump with exception

    Hi,
    I am getting a exception not caught in CX_SY_CONVERSION_NO_NUMBER.
    I am trying to convert a string value with ',' to a currency value.
    I tried using Replace and Condense. But the error still persists.
    Is there a FM or a casting that I can use?
    Cheers
    Kiran

    Hi,
    Sorry I got my question wrong. I have a problem - that when I'm trying to pass a value from a string to a currency field.
    But, the currency field is a field symbol.
    so, I have
    data abc type string.
    abc = "5345"
    <curr_val> = abc.
    now <curr_val> = 0.000
    Please suggest.

  • How to avoid the duplicate values, I do not want the duplicate............

    i have one database table called "sms1" that table is updated every day or on daily basis it has the following fields in it:
    SQL> desc sms1;
    Name Null? Type
    MOBILE NUMBER
    RCSTCNATCNATCNATCNAWTHER VARCHAR2(39 CHAR)
    SNO NUMBER
    INDATE DATE
    From this table the is one column "RCSTCNATCNATCNATCNAWTHER VARCHAR2(39 CHAR)" . I am splitting it into different columns like :
    SQL> desc smssplit;
    Name Null? Type
    R VARCHAR2(2 CHAR)
    C VARCHAR2(2 CHAR)
    S VARCHAR2(1 CHAR)
    TC VARCHAR2(3 CHAR)
    NA VARCHAR2(3 CHAR)
    TC2 VARCHAR2(3 CHAR)
    NA2 VARCHAR2(3 CHAR)
    TC3 VARCHAR2(3 CHAR)
    NA3 VARCHAR2(3 CHAR)
    TC4 VARCHAR2(3 CHAR)
    NA4 VARCHAR2(3 CHAR)
    WTHER VARCHAR2(10 CHAR)
    SNO NUMBER
    INSERTDATA VARCHAR2(25 CHAR)
    Now I am written a procedure to insert the data from "Sms1" table to smssplit table...
    CREATE OR REPLACE PROCEDURE SPLITSMS
    AS
    BEGIN
    INSERT INTO scott.SMSSPLIT ( R,C,S,TC,NA,TC2,NA2,TC3,NA3,TC4,NA4,WTHER,SNO)
    SELECT SUBSTR(RCSTCNATCNATCNATCNAWTHER,1,2) R,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,3,2) C,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,5,1) S,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,6,3) TC,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,9,3) NA,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,12,3) TC2,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,15,3) NA2,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,18,3) TC3,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,21,3) NA3,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,24,3) TC4,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,27,3) NA4,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,30,10) WTHER, SNO
    FROM scott.SMS1 where SNO=(select MAX (sno) from SMS1);
    END;
    Now in order to update the second table with data from first table on regular basis I have written a job scheduler and I am using oracle 9.0. version...
    DECLARE
    X NUMBER;
    JobNumber NUMBER;
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    job => X
    ,what => 'scott.SPLITSMS;'
    ,next_date => SYSDATE+1/1440
    ,interval => 'SYSDATE+1/1440 '
    ,no_parse => FALSE
    :JobNumber := to_char(X);
    END;
    Now this job scheduler is working properly and updating the data for every one minute but it is taking or updating the duplicate values also ..like example:
    R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
    INSERTDATA
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:49:16
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:49:16
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:50:17
    R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
    INSERTDATA
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:50:17
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:51:19
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:51:19
    R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
    INSERTDATA
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:52:20
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:52:20
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:53:22
    R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
    INSERTDATA
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:53:22
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:54:45
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:54:45
    Now I do not want the duplicate values to be updated ...and want them to ignore them.....
    please I need a help on this query........How to avoid the duplicate values............

    Look at the posts closely:might not be needed if formatted ;)
    create or replace procedure splitsms as
    begin
      insert into scott.smssplit (r,c,s,tc,na,tc2,na2,tc3,na3,tc4,na4,wther,sno)
      select substr(rcstcnatcnatcnatcnawther,1,2) r,
             substr(rcstcnatcnatcnatcnawther,3,2) c,
             substr(rcstcnatcnatcnatcnawther,5,1) s,
             substr(rcstcnatcnatcnatcnawther,6,3) tc,
             substr(rcstcnatcnatcnatcnawther,9,3) na,
             substr(rcstcnatcnatcnatcnawther,12,3) tc2,
             substr(rcstcnatcnatcnatcnawther,15,3) na2,
             substr(rcstcnatcnatcnatcnawther,18,3) tc3,
             substr(rcstcnatcnatcnatcnawther,21,3) na3,
             substr(rcstcnatcnatcnatcnawther,24,3) tc4,
             substr(rcstcnatcnatcnatcnawther,27,3) na4,
             substr(rcstcnatcnatcnatcnawther,30,10) wther,
             sno
        from scott.sms1 a
       where sno = (select max(sno)
                      from sms1
                     where sno != a.sno
                   ); ---------------> added where clause with table alias.
    end;Regards
    Etbin

Maybe you are looking for

  • Nokia C5-03 and Mac OSX Lion - Problems copying files to phone in Mass Storage mode

    Whenever I try to load more than one file from my iMac (early 2008, OSX Lion 10.7.2) to my new Nokia C5-03 in Mass Storage mode -since the files are MP3s and Multimedia Transfer doesn't seem to work at all, I keep on getting asked which transfer mode

  • Photos not syncing after update to photo app

    photos not uploading to photo app after update, I have over 10,000 photos that are trying to upload and the last import says 2013 instead of last week.   I have a MacBook pro and my icloud sharing is on and I purchased more space so that is not the p

  • Problems compiling Zaptel package [SOLVED-ISH]

    Hey guys, I'm on an Arch64 system and I'm having problems compiling Zaptel (a dependancy for Asterisk). Here's the pastebin of the errors I get from the Zaptel makefile: http://pastebin.com/776475 Here's my analysis so far: There's a line in the Make

  • Safety days supply not followed due to change in Means of Transport in SNP

    Hello All, I am facing a strange issue regarding the SNP heuristics and means of transport. We observed that the system was not respecting the safety days supply. For example if we had a receipt in bucket 'N' and there is a violation of safety days s

  • Calling custom Infotype method from Webdynpro Abap

    Hi Experts, I am working on an application where i need to call a method of a custom defined infotype. I have done this --> 1. Create a custom infotype 9111 2. SAP creates a class of that infotype ZCL_HRPA_INFOTYPE_9111 3. Inside this method there ar