Format Currency field with $ sign and condense

I want to format the currency field output by appending '$' sign to it and removing the gaps so that the '$' sign occurs immediately before the amount. Can anyone tell me how to do it so that it displays like given below in ALV. Thanks.
Before                    
   $____25.00           
  $__130.00        
$___1000.00       
After
$25.00
$130.00
$1000.00
Edited by: Sheetal on May 27, 2009 12:23 PM

Hi Sheetal,
You can try this-
1) copy currency field to a text field.
2) Append $ to the field. CONCATENATE can be used on text fields.
3) Remove any spaces by using CONDENSE.
Of course you can combine step 1 and 2 depending on the logic you choose.
There are of course many other ways and you may have found out some yourself. The above steps can help.
Regards,
Nimish

Similar Messages

  • How to create Using Formatted Text Field with multiple Sliders?

    Hi i found the Java Sun tutorial at http://java.sun.com/docs/books/tutorial/uiswing/components/slider.html very useful, and it tells how to create one Formatted Text Field with a Slider - however i need to create Formatted Text Field for multiple Sliders in one GUI, how do i do this?
    my code now is as follows, and the way it is now is scroll first slider is okay but scrolling second slider also changes value of text field of first slider! homework due tomorrow, please kindly help!
    // constructor
    label1 = new JLabel( "Individuals" );
    scroller1 = new JSlider( SwingConstants.HORIZONTAL,     0, 100, 10 );
    scroller1.setMajorTickSpacing( 10 );
    scroller1.setMinorTickSpacing( 1 );
    scroller1.setPaintTicks( true );
    scroller1.setPaintLabels( true );
    scroller1.addChangeListener(this);
    java.text.NumberFormat numberFormat = java.text.NumberFormat.getIntegerInstance();
    NumberFormatter formatter = new NumberFormatter(numberFormat);
            formatter.setMinimum(new Integer(0));
            formatter.setMaximum(new Integer(100));
    textField1 = new JFormattedTextField(formatter);
    textField1.setValue(new Integer(10)); //FPS_INIT
    textField1.setColumns(1); //get some space
    textField1.addPropertyChangeListener(this);
    //React when the user presses Enter.
    textField1.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),  "check");
            textField1.getActionMap().put("check", new AbstractAction() {
                public void actionPerformed(ActionEvent e) {
                    if (!textField1.isEditValid()) { //The text is invalid.
                        Toolkit.getDefaultToolkit().beep();
                        textField1.selectAll();
                    } else try {                    //The text is valid,
                        textField1.commitEdit();     //so use it.
                    } catch (java.text.ParseException exc) { }
    label2 = new JLabel( "Precision" );
    scroller2 = new JSlider( SwingConstants.HORIZONTAL, 0, 100, 8 );
    scroller2.setMajorTickSpacing( 10 );
    scroller2.setMinorTickSpacing( 1 );
    scroller2.setPaintTicks( true );
    scroller2.setPaintLabels( true );
    scroller2.addChangeListener(this);
    textField2 = new JFormattedTextField(formatter);
    textField2.setValue(new Integer(10)); //FPS_INIT
    textField2.setColumns(1); //get some space
    textField2.addPropertyChangeListener(this);
    //React when the user presses Enter.
    textField2.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),  "check");
            textField2.getActionMap().put("check", new AbstractAction() {
                public void actionPerformed(ActionEvent e) {
                    if (!textField2.isEditValid()) { //The text is invalid.
                        Toolkit.getDefaultToolkit().beep();
                        textField2.selectAll();
                    } else try {                    //The text is valid,
                        textField2.commitEdit();     //so use it.
                    } catch (java.text.ParseException exc) { }
    // State Changed
         public void stateChanged(ChangeEvent e) {
             JSlider source = (JSlider)e.getSource();
             int fps = (int)source.getValue();
             if (!source.getValueIsAdjusting()) { //done adjusting
                  if(source==scroller1)   {
                       System.out.println("source ==scoller1\n");
                       textField1.setValue(new Integer(fps)); //update ftf value
                  else if(source==scroller2)     {
                       System.out.println("source ==scoller2\n");
                       textField2.setValue(new Integer(fps)); //update ftf value
             } else { //value is adjusting; just set the text
                 if(source==scroller1)     textField1.setText(String.valueOf(fps));
                 else if(source==scroller2)     textField2.setText(String.valueOf(fps));
    // Property Change
        public void propertyChange(PropertyChangeEvent e) {
            if ("value".equals(e.getPropertyName())) {
                Number value = (Number)e.getNewValue();
                if (scroller1 != null && value != null) {
                    scroller1.setValue(value.intValue());
                 else if (scroller2 != null && value != null) {
                    scroller2.setValue(value.intValue());
        // ACTION PERFORMED
        public void actionPerformed(ActionEvent event) {
        if (!textField1.isEditValid()) { //The text is invalid.
            Toolkit.getDefaultToolkit().beep();
            textField1.selectAll();
        } else try {                    //The text is valid,
            textField1.commitEdit();     //so use it.
        } catch (java.text.ParseException exc) { }
             if (!textField2.isEditValid()) { //The text is invalid.
            Toolkit.getDefaultToolkit().beep();
            textField2.selectAll();
        } else try {                    //The text is valid,
            textField2.commitEdit();     //so use it.
        } catch (java.text.ParseException exc) { }
    ...

    if :p3_note_id is null
    then
    insert into notes (project_id, note, notes_month, notes_year) So, p3_note_id is NULL.
    Another option is that you have a trigger on table NOTES that generates a new note_id even for an update.

  • Currency field with Decimals in ALV

    Hi,
    Im having a problem with display of currency field wityh decimals.
    My currency field is declared as type  dmbtr ( whis is currency field data element in standard).
    I have some amount say 1589.00 which is Korean currency. But this Korean currency doesn’t have any decimals.
    (My source field is always 2 decimals irrecpective of curency. It will store as below,
    if value 100 JPY--> TABLE STORE 100.00
             200 SGD --.> 200.00
             500 KRW  --> 500.00
    sO MY source field always maintained with 2 decimals)
    In alv im using the  currency field so that it displays the correct decimals.
          wa_fcat-cfieldname  = 'WAERS'.
          wa_fcat-ctabname    = 'IT_FINAL_ALV'.
          wa_fcat-datatype = 'CURR'.
    Now IN alv it displays 158,900 which is not correct.
    My requirement is I have display this value as 1589 for Korean currency(as it doesn’t have any decimals)
    ( I observed that the value is always stored with 2 decimals in database field)
    if value 1589.00 and output currency is JPY(japan) IT HAS TO Display 1589.000.
    Can anybody give any hint..?
    Message was edited by:
            agrud agrud

    please  try like this  it should work..
    fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15. 
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    reward  points if it is usefull .....
    Girish

  • How to add Currency field with dropdown on screen layout (module pool)

    I need to add a field called <b>Currency( field label )</b> with <b>dropdown (like SKB1-WAERS). </b>
    The <b>field label</b> and <b>input output field </b> should default as being hidden and
    sould be visible only when other field value ( on the same screen ) should match with the value in the database table . 
    Could you please suggest me how to create dropdown
    and give this functionality with coding ?
    Thanks in advance.

    Hi,
    In the field attributes of the SKB1-WAERS..in the group attributes..give a group name G1..Add the same G1 for the field lable also.
    Then in the PBO of the screen..
    ***Check the conditions..when other field value (on the same screen) matches
    ***with the value in the database table.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'G1'.
        SCREEN-INPUT = '0'.
        SCREEN-INVISIBLE = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
    Thanks,
    Naren

  • Currency issue with PS and SD

    All Experts,
    Have some issue with USD and CAD currency with PS and SD
    We are using a group currency in the controlling area (type 30 set as USD).  In addition we have object currency turned on for the Controlling Area so we have company currency in parallel for each company assigned to the controlling area.  Within CO everything is working fine, the issue appears to be when the CO-PS planned amount is passed to the sales order EK01 condition.  In this case, CO-PS has both object currency and controlling area currency but it uses the controlling area currency as the amount passed to the sales order. 
    Any Help?

    Hi Kishore.,
               Please go throgh this Please check this links perhaps they may help.
    http://help.sap.com/bp_imcv1500/IMC_US/HTML/preconfigured_scenarios.htm
    ETO:
    http://help.sap.com/bp_imcv1500/IMC_DE/HTML/E83_EN_DE.htm
    http://help.sap.com/bp_bblibrary/500/HTML/E46_EN_DE.htm
    MTO:
    http://help.sap.com/bp_bblibrary/500/HTML/V66_BB_EN_US.htm
    http://help.sap.com/bp_imcv1500/IMC_DE/HTML/E70_MTOQuotProc_EN_DE.htm
    PS - SD integration are on
    1.Billing pan, at each WBS element, network and Activity level.
    2. DIP profile which is assigend to item category. DIP for resource related quotation works only with ECP ( easy cost planning).
    3.sales pricing - generally, there r 2 types of sales pricing in PS . lumpsum contract and unit rate contract.
    4. BOS - bill of Services. which has to be activated. It is industry specific solution. If BOS is activated you also have integration for vendor RFQ and Analysis.
    5. resource related Billing
    REWARD if helpfull
    Thanks & Regards
    Narayana

  • How to add a dollar sign $ to a formatted currency field

    Any idea how to add a $ sign to a formatted field?

    Hi Kim,
    Right click on the field and click on Format Field.
    In the !Format event type: $@_$_.
    This should place a $ before your output value.
    James.

  • Custom Table Currency field with 5 decimals

    Hello,
    I have created a custom table and it has a field for 'US Plan Cost'. The users wanted it with 5 Decimals. I have created a custom domain and custom data element of DEC Type with 5 Decimals.
    Domain: ZCOST: Data Type: DEC, No. of Characters: 11, Decimal Places: 5.
    However When I am trying to create entries in the table though, it's giving me error: Input must be in the format _____,_____,_____,_____~._____
    The entry that I am creating is: 1.23450.
    I dont know what went wrong? Can anybody please help me?
    Thanks Much.

    Are you doing this with SM30?  or from a program?  If a program, be sure your data value is precisely '1.23450'. It sounds like you're inputting something else...
    Or, post code?

  • Union two tables with diffrent count of fields with null and float value

    Hello,
    i want to union two tables, first one with 3 fields and second one with 4 fields (diffrent count of fields).
    I can add null value at end of first select but it does not work with float values in second table. Value form second table is convert to integer.
    For example:
    select null v1 from sessions
    union
    select 0.05 v1 from sessions
    result is set of null and 0 value.
    As workaround i can type:
    select null+0.0 v1 from sessions
    union
    select 0.05 v1 from sessions
    or simple change select's order.
    Is any better/proper way to do this? Can I somehow set float field type in first select?
    Best regards,
    Lukasz.
    WIN XP, MAXDB 7.6.03

    Hi Lukasz,
    in a UNION statement the first statement defines the structure (number, names and types of fields) of the resultset.
    Therefore you have to define a FLOAT field in the first SELECT statement in order to avoid conversion to VARCHAR.
    Be aware that NULL and 0.0 are not the same thus NULL+0.0 does not equal NULL.
    In fact NULL cannot equal to any number or character value at all.
    BTW: you may want to use UNION ALL to avoid the search and removal of duplicates - looks like your datasets won't contain duplicates anyhow...
    Regards,
    Lars

  • Problem formatting date labels with DateTimeAxis and parseFunction

    I'm working with a line chart that gets its data from a MySQL
    database and
    I'm using a DateTimeAxis to try to display the date on the
    x-axis. The date
    is formatted in the database as "YYYY-MM-DD" - however when I
    run the
    application I am only seeing the date displayed as MM/YY. I
    am using a
    parseFunction as follows:
    public function myParseFunction(s:String):Date {
    var a:Array = s.split("-");
    var newDate:Date = new Date(a[0],a[1]-1,a[2]);
    return newDate;
    I was trying to experiment with setting dataUnits to days or
    weeks but it
    doesn't seem to change. Can anyone figure out what I'm doing
    wrong?
    Thanks,
    -Dan
    The code for the line chart is:
    <mx:LineChart x="10" id="linechartHist"
    dataProvider="{dataProvider1}"
    showDataTips="true" width="100%" height="100%" y="10">
    <mx:horizontalAxis>
    <mx:DateTimeAxis displayName="Date" title="Date (Month)"
    parseFunction="myParseFunction" dataUnits="days"/>
    </mx:horizontalAxis>
    <mx:horizontalAxisRenderer>
    <mx:AxisRenderer canDropLabels="true"/>
    </mx:horizontalAxisRenderer>
    <mx:verticalAxis>
    <mx:LinearAxis title="Price" id="vAxis"
    labelFunction="vLongLabels"
    interval="10"/>
    </mx:verticalAxis>
    <mx:series>
    <mx:LineSeries displayName="MSFT" yField="MSFT"
    xField="date"/>
    <mx:LineSeries displayName="PG" yField="PG"
    xField="date"/>
    <mx:LineSeries displayName="NTDOY" yField="NTDOY"
    xField="date"/>
    </mx:series>
    </mx:LineChart>

    Hi
    Try using "sv_SE" locale.

  • Best external hard drive format for use with mac and windows?

    This is more of an apple operating system combined with windows operating system question, but being that my OS will upgrade an fluctuate there is not option to choose in the operating system section.
    Anyways to the question(s)
    This whole prbolem came about when my computer started having issues, I want to back it up and whether I can continue to use my laptop or not I will still be owning an apple in the future. I went to buy a hard for back up and got told that it is not as easy as one would think to transfer files from mac OS to windows OS and vice versa. I have a mac, my boyfriend has a windows computer; we share files. Mostly I just copy his files, but once in a while I give him files too. I have read up and talked to people and only found one solution so far to format the external drive to fat 32 or exfat. I think only mac has the exfat option, but works well between both OSs, correct me if I am wrong.
    What is the difference between fat 32 and exfat?
    A user posted some good info about formatting. More specifically .Drives, partitions, formatting w/Mac's + PC's
    https://discussions.apple.com/docs/DOC-3044
    If I do not want to use fat32 or exfat is there a format type that works great for mac saving that I can still at least save files to that were originally on a windows computer? Such as I copy his files from his external drive to my computer and then save them to my external drive.
    Is there a better format for file sharing between mac and windows that does not set a 4GB limit?
    And a silly question, Can you dual format a hard drive?
    Note: This format is for an external hard drive.

    I still do not know which format would be the best. That is so that I can use it easily between mac OSX and windows. Is FAT32 the only true option? How limited is it? I heard it is limited to 4GB file size for windows and 32 GB for Mac. Are there other sources I have not found with more concrete information on the limitations of this format?
    I really do still need this information and I need to back up my drive before I can take the computer in for service.

  • How to sort a character field with numbers and letters on the end

    I have an internal table with character field which has data like this after I sort it.  This is not what I expect from the sort.:
    13A
    15A
    29A
    30A
    31A
    33A
    123A
    125
    62 
    76 
    94A
    I expect this, which is sorted number first, then alpha.  Any ideas how to get this sort?:
    13A
    15A
    29A
    30A
    31A
    33A
    62 
    76 
    94A
    123A
    125

    Thanks for the suggestions.  After reading the suggestions and reviewing some other post threads, here's what I did to get the sort to work:
    Add a dash - to the end of any record that did not have an alphabet character at the end.  This way, all records have at least one non-numeric character at the end.  Then I overlayed zeros  '0000000'  over each record.  Then I sorted the table.  Afterwards, I removed the dashes and zeros.
    The long way around, but it worked for me.  Since the internal table is processed in memory, it doesn't add much overhead to the run time.

  • Calculate  field with netprice and quantity.

    Hello,
    I'm facing a problem making a calculation of 2 fields : there's a quantity (type vbap-kwmeng) and I want to multiply it with a value of type vbap-netpr.
    Problem is that he uses the decimal seperator not as a decimal seperator.
    E.g. : 10.000 * 1.000 gives not 10.000 but 10.000.000. The only solution found is changing the arithmic operator of the program, but that's not an option, since it is coded in a user exit..
    Someone out there who can help ?

    Hi,
    the output you are getting is correct to my knowledge as in german language the numbers are separated denoted by '.' instead of ',' and for decimal they denote ',' instead of '.'
    thats why you get the values in this way.
    otherwise....
    check if this code works....
    just before the calculation write the code given below
    set country 'IN'.
    I think this will work out.
    Regards,
    Siddarth

  • Portable Hard drive formating for use with windows and mac operating system

    Just bought a verbatim sure fire 500g 800 firewire portable hard drive for my new macbook pro. I have not did bootcamp yet because I am deciding on wether to use Vista or the new windows 7 that will be coming out soon. The drive is already formated HFS+, how do I format the drive so I can write both windows and mac files to it. Help!!!

    how do I format the drive so I can write both windows and mac files to it.
    Either format it to MS-DOS from the DIsk Utility, or install a tool such as MacDrive into Windows and keep the drive in its current format, or install the NTFS-3G driver into Mac OS X and format the drive to NTFS in Windows.
    (45687)

  • Help with sign and replacestr functions in SQL

    I am trying this:
    In a full name if the Middle Initial is null then add an additional space between the First name and last name else select the full name itself.
    For to check for the spaces I am subtracting first occurrence of space - second occurrence of space using instr function
    I have to use sign function to check for "-value", if the value is -ve then don't do any thing and if it is equal to 0 add one more space to the name.
    But how can i use decode here to select the original column if sign is a negative value.
    My sql:
    IIF(SIGN(INSTR(o_full_name,' ')- (INSTR(o_full_name,' ',1,2)))=0,REPLACESTR(1,o_full_name,' ',' '))
    gow can i use decode in place off IIF

    this examples might help if the names are in separate columns.
    SQL> create table telephone_list
      2  (first_name     varchar2(20),
      3   middle_initial varchar2(2),
      4   last_name      varchar2(20));
    Table created.
    SQL> insert into telephone_list
      2  values
      3  ('Scott',null,'Tiger');
    1 row created.
    SQL> insert into telephone_list
      2  values
      3  ('John','T','Perl');
    1 row created.
    SQL> insert into telephone_list
      2  values
      3  ('Kim',null,'Molit');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from telephone_list;
    FIRST_NAME           MI LAST_NAME
    Scott                   Tiger
    John                 T  Perl
    Kim                     Molit
    SQL> select decode(middle_initial,null,first_name||' '||last_name,
      2                                    first_name||' '||middle_initial||' '||last_name)
      3         full_name
      4    from telephone_list;
    FULL_NAME
    Scott Tiger
    John T Perl
    Kim Molit
    SQL> is the name in one column only? please post a sample data. thanks.

  • Add new fields with EEW and assign a standard check table?

    Hi,
    I would like to add more language fields to a BP - Sold-to (Organization). As I see, one possibility is to use EEW.
    Is it then possible to link this field to an existing check table in order to get the existing langauge codes by default?
    Thanks in advance!
    //a

    Hi,
    Actually i am working on the similar task. I added 2 custom fields in order item level using EEWB. I added the check table to my custom field but for some reason it wouldn't show up. So i added the values to the DOMAIN assigned to the custom field and the values showed up on the screen in the seatch help.
    I am actually still trying to find other possibilities. I will let you know if i find any.
    Hope this helps you,
    Karuna.

Maybe you are looking for