How to get a minus sign with the cost  field in ALV.

Hi ,
How to get a minus sign with the cost field in ALV.
The Ouput will be displayed like  Rs -1500 instead of 1500-
I can't use concatenate also as i may have to use the sum functionality of ALV .
Cheers
Sunny

Hi sunny,
1. The OTHER FIELD
   has to be character field of say length 15.
2. Write the original numeric value to
   this character field (in a loop)
3. But simply writing won't help.
4. use this kind of logic.
5.
REPORT abc.
DATA : m TYPE i.
DATA : chr(15) TYPE c.
m = -100.
WRITE m TO chr.
IF m < 0.
  SHIFT chr RIGHT BY 1 PLACES.
  CONDENSE chr.
  CONCATENATE '-' chr INTO chr.
ENDIF.
WRITE chr.
regards,
amit m.

Similar Messages

  • How to convert trailing minus sign into the leading minus sign

    Hi
    Can any plz tell me How to convert trailing minus sign into the leading minus sign? I mean in PI the amount filed shows like 150.00- i want to convert that into -150.00.
    Thanks
    Govinda

    Hi Shabarish,
    The code works but what if the input is something like [   10.000-] i.e. with some spaces before 10.000- and the output as per your code comes as [-     10.000]. How do we tackle such cases if there is inconsistency in data i.e. some values come as [    10.000-] i.e. spaces before the number and some values as [12.000-].
    The output of this will come as
    [-    10.000]
    [-12.000]
    How to make it as
    [-10.000]
    [-12.000]
    Regards,
    Shaibayan

  • How to get a specific layout with the available layout managers?

    Hi
    Not done java GUI's (approximately 5 and a half years) for a while (I havn't even touched java for ages until a few months ago), and I am a little embarrased by how much I have forgotten.
    After tring unsuccessfully several times with TableLayouts and GridBagLayouts to produce this [ [http://i32.tinypic.com/fl94kp.png] ] sort of layout, I have decided I am either being incredibly stupid, or It's a rather difficult thing to do.
    (Sorry about the crudeness of the drawing)
    Please can someone point me on the right track as to what combination of layout managers + components I should be using to achive this, or even be super kind and post a code snippet for it.
    Preferably, I would like to use just the default layout manages / components that come with java, which will allow me to continue working on the GUI in netbeans without it complaining, but I'll use external libraries if absolutely nesecarry.
    Thanks
    A completely unrelated side note, but where the heck have all my past posts and dukes gone. :(
    Edited by: DarthCrap on Aug 2, 2010 5:14 PM

    Yes, A BorderLayout did solve my problems. It appears I was being stupid after all. :)
    @Encephalopathic. Using a gridbaglayout does indeed help with the centering issue for the smaller panel on the right. I had just worked that out myself when you posted. I had been reluctant to try the gridbaglayout for that, because it caused me a load of pain when I tried using it for the original problem.
    Thanks

  • How to get rid of decimals in the formula field?

    Hello,
    I'm using CR 2008.
    How to get rid of the decimals in the formula field? I have a field with this formula:
    "<b>" & ProperCase({DevelopmentTracking_SELECT.GameType}) &
    "</b>" & "<br><i>" &
    ProperCase ({DevelopmentTracking_SELECT.CustomerName}) &
    "</i><br>" &
    ProperCase({DevelopmentTracking_SELECT.PlannerID}) &
    "<br>" & ProperCase({DevelopmentTracking_SELECT.Forms}) &
    "<br>" & ProperCase({DevelopmentTracking_SELECT.Notes}) &
    "<br>" & "Concepts: " & ToText(int({DevelopmentTracking_SELECT.Concepts}))
    The field {DevelopmentTracking_SELECT.Concepts} is already an Integer in the database, so it shouldn't have any decimals, for some reason CR add them. It's easy to format a stand alone field, but how to do this in the formula?
    I tried the int() function, but it didn't work. The Round(field, 0) function didn't work either - still see the numbers like 12.00 instead of 12.
    I would appreciate your help.
    Thank you,
    Peter

    I've found the solution, this way it worked:
    "Concepts: " & CStr({DevelopmentTracking_SELECT.Concepts}, 0)

  • How to get my photos printed with the full image?!

    I just bought iLife and when I select certain cropped photos to print, the top of someone's head gets cut off in the the photo. If I change sizes of prints or rotate the photo, it cuts off different amount of head but never gives the full image. I did not have this problem with iphoto before I installed this new version. I need to have access to printing photos. I use Canon MP500, ibook G4 and Airport Express for wireless printing. I think the prob is iLife cuz it didn't do this before in iPhoto and I have no prob with other applications. Help!!!!!!

    Select the photo you want to print, and click on Edit. Then click on Crop, and a drop-down menu will appear. Use this menu to select the photo size that you want to print. Then use the cropping frame to get the photo the way you want. It is important to select the correct size of the printed photo because the ratios of length to width are not the same from one size to another. For example, a 4 x 3 is closer in shape to a square than is a 5 x 7. You might have to try different photo sizes from the drop-down menu to get he result you want.

  • How to get users to start with the first episode?

    I checked my stats today and found that the most recent episode of my podcast is the one the has been hit waaay more than any of the others. But I'd really prefer listeners hit the first episode first. Do other podcasters find this? Is it worth re-ordering the dates in the feed to get the fist episode to come up first in the list?
    G4   Mac OS X (10.4.3)  

    Actually, you can change the order of items in the RSS feed without changing any of the dates or other info that is within a given item.
    Select the episode you want first, cut it and then paste it at the top of the list right after the general feed info. Re-order all your episodes this way (oldest at the top, newest at the bottom). This way, if someone double-clicks the name of your feed episode 1 will be the one they get.
    Also, in many podcast lists your episodes are listed in the same order in which you have placed them in your RSS feed
    So you just re-arrange the items, but don't change the info in the items.
    G5 dual 2.7 Mac OS X (10.4.2)
    G5 dual 2.7   Mac OS X (10.4.2)  

  • How to get save button for saving the layout in OO ALV

    Hi all,
    When I execute my report an OO ALV, I want to save the layout and make it default.Please tell me how to do it.
    I am using the below code.
    *Call ALV
      CALL METHOD c_alvgd->set_table_for_first_display
        EXPORTING
          is_layout                     = gd_layout
          i_save                        = 'X'
        CHANGING
          it_outtab                     = it_ekko
          it_fieldcatalog               = it_fieldcat
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    even after passing i_save eq 'X', it is not showing save option in the layout.
    please help.
    thanks,
    Siddhartha Prakash

    Hi,
    You need to pass the call back program name also.
      CLEAR wa_variant.
      MOVE sy-repid TO wa_variant-report.
      CALL METHOD wcl_alvgrid1->set_table_for_first_display
      EXPORTING
        I_BUFFER_ACTIVE               = space
        I_BYPASSING_BUFFER            = c_x
    *    I_CONSISTENCY_CHECK           =
    *    I_STRUCTURE_NAME              =
        IS_VARIANT                    = wa_variant   "variant options
        i_save                        = c_x
        I_DEFAULT                     = c_X
        is_layout                      = wa_layout
    Thanks,
    Vinod.

  • '-' 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

  • I need any help i can get, im having trouble with the app find my iphone. I have lost my iphone, checked on the computer, and somehow, took it away so how do i get it back??

    Help
    I need any help i can get, im having trouble with the app find my iphone. I have lost my iphone, checked on the computer, and somehow, took it away so how do i get it back??

    If you are saying that after signing into iCloud it is telling you device is not found, it could be for any number of reasons. If the battery is dead, if the SIM has been removed, or if someone else has the phone and they have restored it, it will not be shown. Also, if you located it once and then sent a remote wipe, it disables the abililty to locate the phone with Find My iPhone.

  • What does this mean and how do I fix it? Error ITMS-9000 "Invalid Code Signing The executable ´viwer.app/ viewer´ must be signed with the certificate that is contained in the provisioning profile"

    What does this mean and how do I fix it? Error ITMS-9000 "Invalid Code Signing The executable ´viwer.app/ viewer´ must be signed with the certificate that is contained in the provisioning profile"

    If you had Firefox save your Yahoo password, first try deleting that here:
    orange Firefox button ''or'' classic Tools menu > Options > Security > "Saved Passwords"
    The "signed out" message seems to be related to how Yahoo authenticates you. Some users have reported that disabling automatic proxy detection solves the problem, and it also resolves an issue of getting logged out every few minutes, if you have ever experienced that.
    To make the change:
    orange Firefox button ''or'' classic Tools menu > Options > Advanced
    On the "Network" mini-tab, click the "Settings" button, then choose "No Proxy" and OK your way back out.
    If your work connection requires you to use a proxy server, try the "Use system settings" option instead.
    Does that help?

  • I had to wipe out my laptop, I am waiting to get my serial number back. I need to know how I download Logic Pro 9 with the codes I already have.

    I had to wipe out my laptop, I am waiting to get my serial number back. I need to know how I download Logic Pro 9 with the codes I already have.

    If you bought the boxed set of Logic Studio 2.0  which includes LP9, then you cannot  download it. You must use the disks that came as part of the boxed set... to install from.
    If you bought the App Store version of Logic Pro 9 then go to the Mac App Store App,  Sign into the Store using the same Apple ID you used to purchase LP originally, look under the Purchase Tab and you shouldl find LP9 ready and waiting for you to download and install.

  • When I try to sign in to iTunes, it tells me that my Apple ID has not yet been used with the iTunes Store. How do I use my account with the iTunes Store?

    When I try to sign in to iTunes, it tells me that my Apple ID has not yet been used with the iTunes Store. How do I use my account with the iTunes Store?

    Hello Daijalove97,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    Using an existing Apple ID with the iTunes Store and Mac App Store
    http://support.apple.com/kb/HT2589
    To use your Apple ID at the iTunes Store
    Open the latest version of iTunes.
    Choose Store > Sign In from the Store menu.
    Enter your Apple ID and password, then click Sign In.
    Click Review when asked to review your information.
    Enter your billing information, a credit card will be required.
    Click Continue when you're done entering your credit card and billing information.
    Best of luck,
    Mario

  • My laptop died so I've installed itunes onto another PC and my music is all on an external hardive which is connected to the new PC. How can I sync my ipod with the new itunes and get all the music onto itunes?

    My laptop died so I've installed itunes onto another PC and my music is all on an external hardive which is connected to the new PC. How can I sync my ipod with the new itunes and get all the music onto itunes?

    You might consider itunes match for moving CDs you've copied into your itunes library if you dont have a way to use home sharing.
    iTunes match is an optional service offered by apple that costs about $25 a year.  It scans your music library and if it finds music that is already in apple's itunes catalog it'll automatically "unlock"/"store" these in the cloud for you.  Items that it does not find in the catalog it'll upload and store these in the cloud for you and you can download them on your devices.  See http://www.apple.com/itunes/itunes-match/

  • 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.

  • Question when I log into Firefox, the screen scrolls down and I have to use the side-bar to go back up to type my query into the 'search' window. How can I stop that and get Firefox to start with the 'search' window accessible? With thanks, Peter

    Question
    when I log into Firefox, the screen scrolls down and I have to use the side-bar to go back up to type my query into the 'search' window. How can I stop that and get Firefox to start with the 'search' window accessible? With thanks, Peter

    See this. <br />
    https://support.mozilla.com/en-US/kb/Firefox+hangs#Hang_at_exit

Maybe you are looking for

  • Bug in 5500 sport software

    I find bug in Agenda application software. Many function dont't work correctly. I write to Italy support to explain the bug and they reply me to call telephon number that I have to pay to speak. Is this commercial policy of Nokia ? Thank you.

  • HT4060 My iPad 2 is taking forever to charge. What is happening?

    My iPad 2 is charging slowly. Why is that?

  • ABOAutoOrderSalesCopy

    Siebel 7.8.2.5 - Sales You can create an Order by clicking on "Auto Order" button in the Quote Applet. This method is called "ABOAutoOrderSalesCopy" and is a vanilla method and the methods are not exposed to edit. It calls a WF called "SIS OM Quote T

  • Negetive Invoice Value in Custom ODS

    Hi Friends, We are loading the delta data from 2LIS_13_VDITM ( Delta is ABR  ) to one custom Infocube & one custom ODS parllely. For some new invoices created in R/3 , ODS is showing negative invoice qty &value, but cube is showing correct positive i

  • TS4268 How do change your phone number associated with iMessage on iPad?

    when ipad was set up wrong phone number was entered for imessages and facetime. How do you edit or delete it and enter correct phone number?