Move minus sign(-) from end to start of field

Hi,
How to Move minus sign(-) from end to start of field. i e if       var = 120-, i want to display it as -120.
if any one has the code , send me.
Thanks in advance
Krishna.

Check the code, i hope it serves your purpose...
data:
var(10),
length type i.
var = '300-'.
write var.
length = strlen( var ).
length = length - 1.
replace first occurrence of '-' in var+length(1) with ''.
concatenate '-' var into var.
write:/ var.
Reward points if useful, get back in case of query...
Cheers!!!

Similar Messages

  • Shifting -ve sign from end to start in Keyfigure

    Hi,
    I am exporting BI data to external Flat files--
    There i need to shift some of the -ve signs of the field values which are existing at end to the starting point of the field value--
    Ex: 20098- to -20098.
    for that in the routine i am writing code as below:
    if result_fields-keyfigure LT 0.
           shift result_fields-keyfigure RIGHT CIRCULAR.
         endif.
    This coding was working fine earlier.
    But now it throws error msg saying keyfigure has to be of string type to carry on this operation.
    is there any way i could acheive the above said result?
    Simran

    Hi Sunmit,
    Thanks for the reply.
    Yes i did the same-- ( Operated number as char but the -ve sign remains as it was)
    I am using new open hub destination object and transformation to acheive the same.
    In the open hub detination we maintain the fields what we want to have in flat file . There you have in the field definition tab and there is a column conversion routine.
    Against the fields names for which i want to shift the -ve sign, i had created conversion routine and declared this particular number as char instead of using template of infoobject
    When i run DTP, to my surprise the result is as same as before ---
    are these conversion routines are not supported in opne hub destination objects????
    There must be some proviosion that SAP must have provided . Otherwise you cannot shift -ve sign for external systems just sounds absurd for me as no one uses the -ve sign after the number
    Any clues?
    Edited by: S Simran on Feb 11, 2009 10:25 AM

  • Display minus sign from "$-" while printing the discounted amount

    Hi,
    We are trying to print the discount amount today using following function: <?xdoxslt:pat_format_number(sum(LINE_TOTAL_ADJ_AMT),'¥##,##0','ja-JP')?>
    Since the discount is negative amount always, we show it as '-¥', but the user wants to see it as '¥-'.
    Please to understand how can achieve that?
    Thank you for your help in advance,
    Saroj

    Check the code, i hope it serves your purpose...
    data:
    var(10),
    length type i.
    var = '300-'.
    write var.
    length = strlen( var ).
    length = length - 1.
    replace first occurrence of '-' in var+length(1) with ''.
    concatenate '-' var into var.
    write:/ var.
    Reward points if useful, get back in case of query...
    Cheers!!!

  • 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

  • Issue with Minus sign in ALV

    Hi,
    I have a report program where the prices will be getting displayed. In the out put the last four fields of ALV is having values -235.52; -145.25; -457.25; -417.25. In the foreground execution, the output is proper. But in the background(spool), the same output is getting displayed as 235.52;145.25;-457.25;-417.25.
    The first two values 235.52 and 145.25 are getting displayed with out minus sign.
    Note: All the above fields are of same data type.
    What could be the possible issue here? Please provide your valuable inputs.
    Thanks,
    Viswanath A

    Hi, Below is the fieldcatalog code and is common for all 4 fields.
    WHEN 'CPP_FKBTR'.
            wa_fieldcat-col_pos              = 40.
            wa_fieldcat-seltext_l            = 'Commitment for past period'.
            wa_fieldcat-seltext_m            = 'Com past per'.
            wa_fieldcat-reptext_ddic         = 'Commitment past period'.
            wa_fieldcat-ddictxt   = 'L'.
            wa_fieldcat-no_out   = 'X'.
            MODIFY lv_fieldcat FROM wa_fieldcat.
    Thanks

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

  • Accessing the minus sign... Euclid Symbol Bold from InDesign

    I am working on a project for a client. I am using InDesign CC. Text is coming from Word on Windows.
    They are using MathType for equations and expressions. I want to be able to use the same minus sign in other places, but am getting an en dash.
    The Euclid Symbol minus sign has rounded ends, like the +, =, <, >, etc. The en dash has squared ends.
    I have no issues with the other operator symbols... just the minus sign.
    How do I get access to the minus sign?
    Currently using the TTF version of Euclid Symbol.
    Thanks

    Select Glyphs from the Type menu and see if there is a glyph you want in that font. If not, you may need a different font (possibly an OT Pro version).
    Oh, and there's also this.

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

  • The movie I purchased from my Apple TV is not on my acct when I signed on my mac book pro. Is there something else I have to do to have my movie library updated on my macs?

    The movie I purchased from my Apple TV is not on my acct when I signed on my mac book pro. Is there something else I have to do to have my movie library updated on my macs?

    Welcome to the Apple Community..
    You can re-download content purchased from the iTunes store (availability varies depending on location) using the purchased option from the Quick Links section in the top right corner of the iTunes homepage in your iTunes application on your computer.

  • Can we move back an instance from end to previous activity?

    Hi,
    Using Oracle BPM WL 10.3 MP2, Can we move back an instance from end to previous activity? If yes are there any ways to make this happen? I guess that instances which are aborted cannot be brought back from end activity? but not sure.
    Any ideas / suggestions?
    Thanks,
    -Sree

    If the instance was aborted due to an exception, you could have an exception handler which would allow you to handle the error, and then retry if desired...
    However, once the instance is at End, its done...
    -Kevin

  • Is it possible to move my iTunes from the old laptop to the new one (including all the music files and playlists) without having to start all over again with a blank iTunes?

    Is it possible to move my iTunes from the old laptop to the new one (including all the music files and playlists) without having to start all over again with a blank iTunes?

    yes
    You will need to copy the whole iTunes folder which is in your user profile on the old computer in Music folder.
    Before you do it make sure iTunes are updates on the old computer and it works without any problems.
    This will copy all your media, music, movies (provided you did not change the default location).
    After the migration you will need to sing in to Apple store again with your Apple ID
    and also authorize your new computer (both done from the tom menu bar in Store.
    Once you are done please deauthorize your old computer (the same menu path) if you are not planning to use it anymore.
    Any problems post here.

  • I want an app to close or browse through open apps at the same time by double tapping the home button i can find the open apps with the minus sign on it and dont move

    I want an app to close or browse through open apps at the same time by double tapping the home button i can find the open apps with the minus sign on it and dont move

    Try a reset: Press the Sleep/Wake button and the Home button at the same time for ten seconds until the Apple logo appears. Note: No data will be lost

  • Why can't I move a song from my iPhone (bought in the iTunes Store) to my PC?

    Right, so - I hear a song I like, start up iTunes on my new iPhone 4S, and download it from the store. No problem. Then I get home, connect my phone to my PC and... find that iTunes will not, under any circumstances, allow me to move my newly-purchased song to my hard-drive. I can find the song just fine, under 'Devices', so it's not like iTunes doesn't know it exists. My PC is registered as a 'legal shared platform' or whatever you call it, so there shouldn't be any problems with the DRM.
    I even started up my iTune Store Account via the iTunes on my PC, and found the song again. Sure enough, it still remembers that I've bought it. But there's no option to re-download it. And the program simply refuses to move the file from my phone to my hard-drive in any way. Drag-and-drop just gives an 'Ø' sign, copy-and-paste does nothing. I can get iTunes to PLAY the song just fine, but only from my phone.
    ...the really strange thing is that LAST time I bought a song from the iTunes Store, on my phone, iTunes AUTOMATICALLY downloaded it to my hard-drive as soon as I plugged in my phone. No interaction needed on my part. And now it won't do it no matter how much I ask. Temperamental system...
    EDIT: Managed to get it transfered by selecting 'Transfer Purchases' from the right-click menu of the iPhone-icon in iTunes... but I still don't understand why the song refused to sync normally or be moved manually. Meh.
    Message was edited by: BlakeTheDrake

    You cannot mve the songs manually from iphone to your computer.
    The way you do this is exactly what you did :  File>Transfer Purchases

  • In making a "highlights" movie, using clips from different imported iMovie events, can I delete the larger iMovie event file from the Events browser and still work w the smaller clips in the Projects browser w/o having the larger files still loaded?

    I have sucessfully imported 150 Sony digital 8mm movies (each one hour in length) into iMovie as 150 iMovie events. I have since successfully converted them from their original 13 Gb (.dv) file to an exported smaller 1.3 Gb (.4mv "large file") movie that I am happy with, using the iMovie projects browser. So now I have 150 " .4mv" movies on my internal HD as well as about half of my original raw data " .dv " movies on my internal hard drive.
    Due to their large size (over 2 Tb), I do not have all the larger raw data (.dv) files on my 2Tb internal drive, just about half of them. What I want to do now is to create a new project in the Projects browser for each of my kids, and reload, starting with Tape #1, each of these larger files and do a highlights movie for each of my kids, wherein I pick out smaller clips from each 1 hour .dv iMovie event and paste them into the appropriate kid's Highlights project in the Projects browser.
    Here's my question: If I load the first 5 large files back onto my internal HD, and paste in various shorter clips into each of my kids' Highlights project, and then if I delete those first 5 large files (they are backed up on 2 other 3Tb external HDs), can I keep doing this (reloading the next 5 large .dv files to work with), and ultimately take each of my kid's Highlights project and export as a .4mv movie EVEN THOUGH the earlier large .dv files are no longer on my internal HD, OR does my iMac need to have all these larger files loaded on my internal HD for me to eventually export each of my kid's Highlights project to a .4mv movie?
    I have a 2011 era 27" iMac desktop w 2Tb HD internal and 250 Gb flash drive, and Lion OSX and iMovie 11.

    Thanks. I tested it out and you were correct. I loaded 2 .dv movies from my external HD back onto my internal HD, and got them re-imported into iMovie, took a few short clips from each of the 2 iMovie events and pasted them into a new project in the Project Browser. Then I deleted these 2  "source clips" from my internal HD, closed iMovie and then re-opened it and found that iMovie would NOT export the smaller clips for a "highlights" .4mv movie without the "source clips" being available.
    I read your link on Quicktime. It talks about mostly trimming, which is what I did with each iMovie event before I took each one as a project to export as a smaller .4mv file. But if I use Quicktime (do I need QT Pro or basic), what advantage is it to me to use QT over iMovie (I must admit I am a novice at iMovie and have never used QT or QT Pro as a tool)? Will it then convert any edits I make to a .m4v movie or do I need iMovie to do that?
    Does QT allow trimming multiple segments out of a movie during one edit session, or can you only do 1 at a time? By that I mean that, for example, when I use Sonys Picture Motion Browser for my .mts movies, you can only set one Start and one End point for each edit/trim you do: it does not allow you to set multiple Start Stop points like iMovie allows in its Event or Project browser. You can only do one "trim" at a time, save it and then reopen to do another trim. not very useful.

Maybe you are looking for

  • HT4314 How to create several game center accounts using one apple id?

    I have both ipad and iphone. How can i play with my wife/son via game center?

  • Stopping Managed servers in 10.3

    We are testing a couple of scenarios by having various cases case1:Start Managed Server when the admin server is Running(passed) case2:Stop Managed Server when the Admin Server is Running(passed) case3:Start Managed Server when the Admin is not Avail

  • Extract DDL for all objects separately !

    Hi All I have a huge DB having 3000 tables (having indexes,triggers,synonym), 1200 functions/procedures, 1000 views etc. I need to extract only metadata and put into a version control repository. I need to extract all objects (tables,procs,functions,

  • Legit Download or Scam

    Greetings, I am interested in purchasing a new version of cs6 master collection, and have found one being offered online for 800 euro, with the download being advertised as off of the adobe site. More clearly, after the download, it appears the purch

  • WPA2 EAP-PEAP error, may be Windows Server 2008 or...

    I've studied posts like /t5/Connectivity/Not-able-to-connect-to-company-WLAN-WPA2-AES-PEAP-with-E71/m-p/420301/highlight/tru... , updated firmware, no joy. On E71, get WLAN: EAP-PEAP authentication failed In the event log of the domain controller+NPS