Minus Sign in front

Hello all,
I have a requirement where in I need to bring the minus sign in front for the amount field in ALV Grid Display.
I used the FM CLOI_PUT_SIGN_IN_FRONT, but after I pass back the values, the sign gets set at the end. Moreover, I cannot create a character filed because the business might want to do sum on it.
Please advice.
Regards,
Salil
P.S. the below piece of code
DATA : gv_bill_rev  TYPE string,
         gv_balance   TYPE string.
  LOOP AT gt_master INTO gs_master.
    gv_bill_rev = gs_master-bill_rev.
    gv_balance  = gs_master-balance.
    CLEAR : gs_master-bill_rev,gs_master-balance.
    CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
      CHANGING
        value = gv_bill_rev.
    CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
      CHANGING
        value = gv_balance.
    MOVE : gv_bill_rev TO gs_master-bill_rev,
           gv_balance  TO gs_master-balance.
    MODIFY gt_master FROM gs_master INDEX sy-tabix
                                    TRANSPORTING bill_rev balance.

You can directly specify an edit mask for output.
Field EDIT_MASK in the field catalog is a 60 character field in which you can specify an edit mask.
fieldcat-edit_mask = 'V___.__'
The V at the left indicates that you want the sign to appear at the left.  The _ will be replaced by the values of the number.  Put as many underscores as required.  You may also want to specify commas (,), if desired, for thousand's separators and a period (.) for the decimal point, if needed.
Alterntively, if an appropriate conversion exit exists to put the sign in front, you can assign the conversion exit in the field catalog table.
Field CONVEXIT in the field catalog can be used to specify the name of the conversion exit.
Brian
Edited by: Brian Sammond on Jan 27, 2009 8:08 PM
Simplfy example edit mask because forum was displaying it funny

Similar Messages

  • - minus signs appearing in Query

    Hi
    Certain key figures get minus signs in front of them in one of our queries. When the data is browsed in the Infocube / ODS, there is no minus sign.
    We have checked the +/- symbol in 'sign change' for the key figures in Bex but no matter what setting I choose, I still get the minus sign displayed.
    Anyone have any ideas?
    Thanks
    Conor

    Hi,
    edit the query properties. Goto Tab Page: Value Display.
    Display of +/- Signs
    Here you specify how the minus sign is displayed. The following display options are available for negative values:
    ● Before the Number -123.45: The minus sign is positioned before the value (default setting).
    ● After the Number 123.45-: The minus sign is positioned after the value.
    ● In Parentheses (123.45): Negative values are displayed in parentheses.
    http://help.sap.com/saphelp_nw70/helpdata/EN/1e/99ea3bd7896f58e10000000a11402f/frameset.htm
    Hope this helps.
    Regards
    Andreas

  • Minus sign in smartforms

    I want minus '-' sign in front of amount
    currntly it is showing 99999.45-
    but i want -99999.45.
    please help....

    use Fm CLOI_PUT_SIGN_IN_FRONT
    DATA: WA_VALUE(6) TYPE C VALUE '20.00-'.
    CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
    CHANGING
    value = WA_VALUE.
    WRITE: / WA_VALUE.
    or
    gv_netwr2 = gv_netwr .
      concatenate '-' gv_netwr2 into gv_netwr2.
      condense gv_netwr2 no-gaps.

  • Display of minus sign

    Well I want to display minus sign in front of credit amount.
    though i have multiplied the amount by -1. it shows the minus sign after the amount. i want to display it before the amount. is there any function for it.
    i'm making a classical report using se38.

    Hi ,
    execute the code and check the output.
    data : val1 like vbap-netpr.
    val1 = '12345.21'.
    val1 = val1 * -1.         "ur value
    write:/ val1.               " negative at the end
    data : val(13) type c.   " declare a char variable
    move val1 to val.        
    write:/'Still', val.
    CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
      CHANGING
        value         = val.          "sign is put ot front.
    write:/'Now', val.
    regards,
    vijay

  • MINUS SIGN IN FRNT OF AMOUNT INSTEAD OF LAST

    HI
    I want minus '-' sign  in front of amount
    currntly it is showing 12345.45-
    but i want -12345.45.
    pls help me on this
    Regards
    Rajan.

    >
    prashanth kishan wrote:
    >
    Can you send me a sample code
    > Fortunately or unfortunately, it never came
    >
    > pk
    Cause i gave him a hint to use SPILIT also
    May be other wise he would come
    Cheers

  • Minus sign at the end of the value, Need to get Preceeding minus sign.

    Hello gurus,
    I am using following code in web dynpro to get data from a FM and downloading it to excel.
    for the numeric values I am getting minus sign at the end of the value in excel. but If I display the value in alv, it is coming fine. Please let me know where I am going wrong.
    ex: 4568-
          CALL FUNCTION 'Z_EXTRACT'
            EXPORTING
              extract   = z_extract
            TABLES
              it_data       = tab_et.
          DESCRIBE TABLE tab_et.
          IF sy-tfill GT 0.
            CLEAR: text, xtext.
            DATA :    v_fore9ldepl(17)      TYPE n.
            LOOP AT tab_et INTO rec_et.
             MOVE:
              WRITE:  rec_et-fore9ldepl TO v_fore9ldepl DECIMALS 3.
              CONCATENATE  text '1'
                                rec_et-z0g_cwwter                          
                                v_fore9ldepl
                     cl_abap_char_utilities=>newline INTO text SEPARATED BY ','.
                      cl_abap_char_utilities=>newline INTO text SEPARATED BY
                      cl_abap_char_utilities=>horizontal_tab.
            ENDLOOP.
            CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
              EXPORTING
                text   = text
              IMPORTING
                buffer = xtext.
            CLEAR:  filename, wa_files.
            CONCATENATE 'EXTRACT'   '.XLS' INTO filename.
            wa_files-content = xtext.
            wa_files-filename = filename.
            APPEND wa_files TO files.
      DATA izip TYPE REF TO cl_abap_zip.
      DATA output_file TYPE xstring.
      CREATE OBJECT izip.
      LOOP AT files INTO wa_files.
        izip->add( name = wa_files-filename
                    content = wa_files-content ).
      ENDLOOP.
      output_file = izip->save( ).
      CALL METHOD cl_wd_runtime_services=>attach_file_to_response(
      EXPORTING
      i_filename = 'TEST.ZIP'
      i_content = output_file
      i_mime_type = 'ZIP/APPLICATION'
           i_in_new_window = abap_false
      i_in_new_window = abap_true
      i_inplace = abap_false ).

    Hi,
    In the Context attribute tyr to use the properties of formatting where you can have the MINUS sign in the front of the value..
    If this is working fine then when you use any standard export of ALV the same (AS iS) is shown in Excel right...
    Regards,
    Lekha.

  • I transferred data from my external hard drive to my restored Mac Book Pro via migration assistant and now my external hard drive in time capsule has red minus signs. How do I get rid of that without getting rid of any of my data?

    I used Migration Assistant to transfer my data from my external hard drive via Time Capsule to my restored Mac Book Pro. When I now go into Time Capsule I there are red minus signs in the corner of all the folders that are contained in my back up. How do I get rid of this and access my previous back-ups?

    Select the drive and Finder > Get info and at the bottom "ignore permissions on this volume"
    You can copy the files, but the ownership on the files still belongs to the other user account, once your done copying, then perform a #6 Reset Users Permissions and that will set all the ownership to that account.
    ..Step by Step to fix your Mac
    Another method is to copy the entire folder, then change it's permissions.

  • Sign in front of numeric/currency field in ALV grid/list

    Dear all,
    We need to display sign in front for numeric/currency values which will
    use the sub-total functionality. Currently there is no option for doing
    this in ALV output options.
    Is this possible?
    regards
    Nitesh

    Hi,
    Please go throw below links ,
    may be it will solve u r problem
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    Regards
    Suresh.d

  • I increased my font with zoom for the first time & got it too large. It will not decrease using Control & minus sign.

    I use Firefox 4. Windows XP. I have tremors & must have accidentally clicked on something that made it open up with weird colors like it was in safe mode. It was in 8-bit so put it back on 32-bit and 1280 x 1024 pixels. Then the font was so small it is almost unreadable. Tried to change it in Firefox Tools, Options, & Content. This did not work. I then used Zoom after checking in Help but got the font so large I can't view my email right. It will not decrease when trying Control with the minus sign as suggested.

    Did you change the resolution in Control Panel > Display ?
    What is the native resolution of your video display (monitor)?

  • HT5137 I updated to ios7.0.2, when I double click on home button it brings up an app list but when I hold my finger on an icon it won't show any with a minus sign, is it no longer necessary to close apps?

    In ios 7.0.2, when you double click the home button it brings up the icons but won't allow you to show them with minus signs, is it no longer necessary to do this?

    jim96776 wrote:
    is it no longer necessary to do this?
    It was never necessary except in certain unusual circumstances.

  • Iphone 5 - can't delete albums in the albums no minus sign when in edit

    I need to free up storage on my Iphone 5...when I am in ALBUMS ...I chose EDIT and NO MINUS sign appears to the left.  I have old photo albums from a blackberry torch and photos from various camers got loaded up I am guessing through Itunes on a PC that no longer works.  I do not want these photos on my phone I have them stored on a external drive.  I love my phone I just don't want all these darn photos taking up so much room.  What the heck can I do??? ahhh! HELP

    You need a 3rd party iPhone file browser such as TouchCopy. See: https://discussions.apple.com/docs/DOC-3141. This covers more than photos, but it should still be useful.
    Note, however, that if the photos were taken with a higher resolution camera than the iPhones the images that you copy back to your computer will be lower quality than the originals, as images in the Photo app are optimized for the iPhone's screen.

  • Before I upgraded my iPad mini, you could turn off apps to save battery power by double clicking the control button and then holding your finger on the app button until the minus sign appeared.  That doesn't work anymore.  How do you turn off the apps wit

    Before I upgraded my iPad mini, you could turn off apps to save battery power by double clicking the control button and then holding your finger on the app button until the minus sign appeared.  That doesn't work anymore.  How do you turn off the apps with ios7

    Now you swipe downward, the app will appear and you delete, keep scolling to the right as in the past.  With the new operating system you also swipe downward to get the search bar to find an app

  • Minus Sign in the Downloaded DME file using F110 Transaction

    Hi All,
    From the F110 Transaction I navigate to the DME Administration from the menu bar in order to download the DME file into my system. I could open the txt file that is downloaded. Now my requirement is to add a minus sign to the invoice amount of the txt file.
    I tried debugging the program to find out where the data is populated but was unable to. I can see the FM GUI_DOWNLOAD that downloads the file but the internal table contains hexadecimal data.I don't understand how this is converted to the text data.
    I'm unsure of what to do.... Any body has any suggestions.
    Regards,
    Shipin Paul

    Hi Anmol,
    Your answer helped me a lot. I am really thankful. But my issue is not solved.
    I went to the DMEE Transaction and gave the correct format and the tree type as input.
    Inside the format i went into the amount element as you have mentioned and included an exit module with the respective coding.
    Then i execute the transaction F110 with the Run date and Identification.
    I then navigate to the menubar Enviroment->Payment Medium->DME Administration so as to download it into my system as notepad.
    I select one of the entries and press the download button. But it does not stop at the exit which i included in the DMEE Transaction
    even though i have created a breakpoint there..
    Do you have any idea about this.
    Regards,
    Shipin Paul

  • '-' minus sign on the left side of the value

    Hi all,
    My requirement is to put the minus sign appearing the amount field
    on the left hand side instead of right as it appears in the database fields.
    Is there any direct functionality for the same instaed of using concatenation .

    use an edit mask
    edit: Didn't read well. Where are you trying to put the sign? a database table? ALV? others?
    TYPE-POOLS: SLIS.
    types: begin of this_Type,
    one type p,
    two type p,
    end of this_Type.
    data itab type table of this_type with header line.
    data: field_cat type sLIS_T_FIELDCAT_ALV,
         wa_fcat like line of field_cat.
    itab-one = '-1'.
    itab-two = '-2'.
    append itab.
    wa_fcat-fieldname = 'ONE'.
    wa_fcat-edit_mask = 'V_______'.
    append wa_fcat to field_cat.
    wa_fcat-fieldname = 'TWO'.
    wa_fcat-edit_mask = 'V_______'.
    append wa_fcat to field_cat.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK              = ' '
    *   I_BYPASSING_BUFFER             =
    *   I_BUFFER_ACTIVE                = ' '
    *   I_CALLBACK_PROGRAM             = ' '
    *   I_CALLBACK_PF_STATUS_SET       = ' '
    *   I_CALLBACK_USER_COMMAND        = ' '
    *   I_STRUCTURE_NAME               =
    *   IS_LAYOUT                      =
       IT_FIELDCAT                    = field_cat
    *   IT_EXCLUDING                   =
    *   IT_SPECIAL_GROUPS              =
    *   IT_SORT                        =
    *   IT_FILTER                      =
    *   IS_SEL_HIDE                    =
    *   I_DEFAULT                      = 'X'
    *   I_SAVE                         = ' '
    *   IS_VARIANT                     =
    *   IT_EVENTS                      =
    *   IT_EVENT_EXIT                  =
    *   IS_PRINT                       =
    *   IS_REPREP_ID                   =
    *   I_SCREEN_START_COLUMN          = 0
    *   I_SCREEN_START_LINE            = 0
    *   I_SCREEN_END_COLUMN            = 0
    *   I_SCREEN_END_LINE              = 0
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER        =
    *   ES_EXIT_CAUSED_BY_USER         =
      TABLES
        t_outtab                       = itab
    * EXCEPTIONS
    *   PROGRAM_ERROR                  = 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.
    Edited by: Ramiro Escamilla on Jan 8, 2009 11:49 AM

  • HT5137 Words with Friends has frozen. After double clicking the home button, swiping or pressing the icon does not bring up the minus sign.

    On my IPad Words With Friends has frozen. I have double clicked on the home button and identified the WWF icon. When I press and hold or swipe vertically the icon darkens but does not shake or bring up the minus sign. Any suggestions?

    Force close apps
    1. Double tap the home button to bring up the multi-tasking view
    2. Swipe the app's windows upwards to close
    3. The app will fly off the screen
    http://support.apple.com/kb/ht5137

Maybe you are looking for

  • Phone wont connect to apple server when setting up

    I got a new phone mailed to me, I put my sim card in it and I am trying to go through the setup process (via cellular connection). it looks like I have service bars, but the phone keeps telling me it cant connect to the apple server

  • While PO

    while doing P.O """"Material not subj. to inventory mgmt. in plant AHI"""........... (Pl. check your input...(There is no data for plant AHI (plant/storage location stock view) in the material master record. "") in mmo1( i have mainted )  ... data 1

  • API Help -- Extract method results in Catstrophic failure!

    Hi all, We're trying to implement the HFM api to pull data out into a CSV. When we run HsvData.Extract, the call returns an exception: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) I'm not sure what this means and I can't f

  • OBIEE Backup

    Question: When backing up OBIEE repository and additional XML files does OC4J need to be stopped also or is it just the BI server, Presentation services and Java Host. Thank you in advance for your response.

  • IBook G4..a faster one aftr a few weeks!!

    hey... I got my ibbok last december...it was workin fine till ystrday, but suddenly has become awfully slow in all aspects since this morning... cant it be faster...can i do someothing to make it fast as it was weeks ago wen i bought it new....i dele