Delete spaces on the right of a string of characters

Hi,
I'd like to know how to delete space on the right of a string of characters and ONLY the ones on the right in order I can get the real length of the string (I don't want to condense the spaces between words even though there's more than one).
data: text(20).
text = 'SAP Forum'
In this case, if I use both DESCRIBE LENGTH and DESCRIBE OUTPUT LENGTH, the result will be 20, but the real length is 9.

Use STRLEN( ), as described by the other posters.
To delete space chars on the right of a string, use following static method:
CALL METHOD cl_abap_string_utilities=>del_trailing_blanks
  CHANGING
     str = lv_text.

Similar Messages

  • Using IOS 7.1.2 on Safari when I leave the focus on a input on my webpage and rotate my device from Horizontal to vertical, I see a black space on the right and the page is not displayed properly. Any solutions to this problem?

    iOS Version: 7.1.2
    Browser: Safari
    I have a sample log-in page with two input fields and a submit button. When I focus on any of the input fields in landscape mode and rotate my phone and come to the portrait mode I see a weird black space towards the right of my page. Screenshots attached below:
    My page code below:
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
        <title>IOS Test</title>
        <style type="text/css">
            a, abbr, acronym, address, applet, article, aside, audio, b, blockquote, big, body, center, canvas, caption, cite, code, command, datalist, dd, del, details, dfn, dl, div, dt, em, embed, fieldset, figcaption, figure, font, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, html, i, iframe, img, ins, kbd, keygen, label, legend, li, meter, nav, object, ol, output, p, pre, progress, q, s, samp, section, small, span, source, strike, strong, sub, sup, table, tbody, tfoot, thead, th, tr, tdvideo, tt, u, ul, var
                background: transparent;
                border: 0 none;
                font-size: 100%;
                margin: 0;
                padding: 0;
                border: 0;
                outline: 0;
                vertical-align: top;
            ol, ul
                list-style: none;
            blockquote, q
                quotes: none;
            table, table td
                padding: 0;
                border: none;
                border-collapse: collapse;
            img
                vertical-align: top;
            embed
                vertical-align: top;
            article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, meter, nav, output, progress, section, source, video, div
                display: block;
            mark, rp, rt, ruby, summary, time
                display: inline;
            input, textarea
                border: 0;
                padding: 0;
                margin: 0;
                outline: 0;
            iframe
                border: 0;
                margin: 0;
                padding: 0;
            input, textarea, select
                margin: 0;
                padding: 0;
            body
                font-family: Arial, Myriad Pro, Trebuchet MS, sans-serif;
                font-size: 100%;
                background: #F5F5F5;
            a
                text-decoration: none;
            a:hover
                text-decoration: none;
            img, object, embed, video
                max-width: 100% !important;
            .clear
                display: block !important;
                width: 100% !important;
                clear: both !important;
            .body
                position: fixed;
                width: 100%;
                top: 0;
                left: 0;
                overflow-y: scroll;
                -ms-overflow-style: -ms-autohiding-scrollbar;
                -webkit-overflow-scrolling: touch;
                -ms-touch-action: pan-y;
                -ms-user-select: none;
                z-index: 0;
            .body > *
                -webkit-transform: translateZ(0px);
            .header
                background: #fff;
                text-align: center;
                border-bottom: #45A116 solid 8px;
                padding: 5% 10%;
            .content
                width: 70%;
                position: relative;
                margin: 20% auto 10% auto;
                text-align: center;
            .content input
                display: block;
                background: #E6E6E6;
                border-radius: 15px;
                border-bottom: #A8A8A8 solid 3px;
                margin-bottom: 5%;
                width: 96%;
                padding: 4% 2%;
                text-align: center;
                color: #595959;
            .content a
                display: inline-block;
                padding: 2% 10%;
                color: #fff;
                background: #45A116;
                margin-top: 5%;
                border-radius: 5px;
                border-bottom: #2C690E solid 3px;
                -webkit-transition: all 0.1s linear;
                -moz-transition: all 0.1s linear;
                -ms-transition: all 0.1s linear;
                -o-transition: all 0.1s linear;
            .content a:active
                background:#368011;
        </style>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script>
        <script type="text/javascript">
            function adjustBody() {
                var wh = $(window).height();
                $(".body").css({
                    "height": wh + "px"
            $(document).ready(function () {
                adjustBody();
                $(window).resize(function () {
                    adjustBody();
        </script>
    </head>
    <body>
        <div class="body">
            <div class="header">
                <img src="sampleImage.png" alt="Sample Logo" />
            </div>
            <form action="" method="get" id="sampleForm">
            <div class="content">
                <input type="email" value="User Name" onblur="if($(this)[0].value == ''){$(this)[0].value = 'User Name';}"
                    onfocus="if($(this)[0].value != '' && $(this)[0].value == 'User Name'){$(this)[0].value = ''};" />
                <input type="password" value="Password" onblur="if($(this)[0].value == ''){$(this)[0].value = 'Password';}"
                    onfocus="if($(this)[0].value != '' && $(this)[0].value == 'Password'){$(this)[0].value = ''};" />
                <a href="javascript:void(0);" onclick="$('#sampleForm').submit();">Login</a>
            </div>
            </form>
        </div>
    </body>
    </html>
    Does anyone have any solutions to this problem?
    Regards,
    Mayank Tripathi

    ALWAYS SAVE YOUR idevice USING ICLOUD !!!! IT SAVES ... ALL !! (includings apps data, but the apps themselves ! USE IT ! i done this...)

  • Why is there a huge white space to the right of the board when I play Lexulous on Facebook?

    I play Lexulous (a form of Scrabble) on Facebook. For months now, whenever I play the game, there is a huge white space to the right of the board, like a whole other window. Only with this app. I tried another browser, same thing, and it also does it on my laptop (MacBook Pro). I asked the Lexulous help desk and attached a screenshot; they had no idea what would cause that to happen. I asked a couple of my regular opponents and they are not seeing it. It's really annoying because if I accidentally touch my mouse to the bottom scroll bar, the board slides offscreen to the left.
    Sorry if this is the wrong forum for this question, but I'd like to fix it.

    If you are using Safari to connect to Facebook, try this on one of the Macs.
    From the Safari menu bar click Safari > Preferences then select the Extensions tab.
    If there are any installled, turn that OFF, quit and relaunch Safari and try that game.

  • Too much white space to the right when previewing it in my phone using inspect. Why?

    Using edge reflow to create a responsive landing page and inspect to connect to my device.
    I tried to preview it but there's so much white space to the right which i can scroll horizontally through the screen.
    my width is 100%  even my container. why is that? Chrome preview is looking fine btw.
    thanks for whoever can give me an answer advance!!

    How does your page look when you make the canvas narrow in Reflow?
    Vic

  • Space to the right of the trackpad...

    I got my MacBook less than a month ago and I noticed that the space to the right of my tackpad (where my wrist rests while I'm tying) feels loose. It's hard to explain, but when I lift my right hand up from typing I hear a "click" type sound. It almost feels as if there is too much space between the case and the components inside. Does anybody else have this problem? Is it worth sending it in to get repaired?

    I actually did take it to an apple store today. I was shocked to see how rough the Mac Genius treated my computer. He slammed down the top and took it to the back. He came back out and said since it was a cosmetic issue, there's nothing he could do. This is ticking me off...
    Also, is anybody aware if apple is able to send out a new replacement computer, and then have me send this defective one back? I really can't afford to have much downtime without my computer for my profession.

  • Contribute 6.5 moves editing space to the right of the screen.

    Contribute 6.5 moves editing space to the right of the screen. Recently updated to 6.5 from CS5.
    We are currently expanding our website and the issue we are experiencing happens on the demo site. CS 6.5 opens the old site fine.
    When the pages were opened in CS4 prior to the upgrade the editing space was in the center where the body of the page would normally appear. Now, when I open the pages and the entire "body" is shifted into a narrow ~100 pixel column to the right of the website. This is inconsistent at best. Sometimes the page when edited will open normally, others it will not. Sometimes the header will appear as a graphic, and others it appears as text. All pages open and function properly in CS4.

    The short of time dos not bode well
    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar          

  • Browser extra space to the right of page

    Hi,
    I hope someone may be able to help, I have noticed the website in the link below has about an inch of extra space to the right of the page.  The header and footer containers are all set to fit the browser width so I'm baffled as to why this extra space is visible.  I removed the image but it didn't make any difference.
    HOME  |  Total Clothing Solutions
    Thanks in advance

    Thank you so much, you were spot on ! it was the search bar!
    Thanks again

  • How to join regions without deleting notes in the right region.

    How to join regions without deleting notes in the right region?
    Every time I try to join two regions, the notes in the right region are cut, even though both regions are on the same track and are touching each other. 
    This is so frustrating. I searched on some other sites and Garageband Help section, but for some bizarre reason, I can't find any explanation of this basic topic.
    Tony

    Tony, the two Regions in your screenshot (green, yellow) are Take Regions (they have a Take number in the reft upper corner), which are Regions that contain multiple Regions and you can select any one to be the active (played) Region. You cannot merge those Regions. You have to delete the unwanted Regions inside first. click on the number, select the Region you want and then click again and select "Delete unused Takes"
    If you don't want to create Take Regions, select the "Cycle Recording" checkbox in the Preferences ➤ General Window
    Hope that helps
    Edgar Rothermich
    http://DingDingMusic.com/Manuals/
    'I may receive some form of compensation, financial or otherwise, from my recommendation or link.'

  • Spare space on the right.

    Seems that there is a bug relating the sizing of panels and sub panels.
    I've a main panel, containing other two panels, each of them containing
    several gadgets.
    The main panel has an orizontal boxlayout arrangement so it should
    arrange the other two panels side by side.
    The left subpanel has a gridbag layout, and the right one has
    a vertical box layout.
    What i see is that there is spare space to the right of the second panel
    I can see it giving the panels different backgrouns colors.
    Any suggestion ?
    I can post the code if wanted.
    Regards
    Maurizio

    Don't mind, it was my fault.
    I've added an invisible box to the right of the right panel

  • HT1937 i have old email address that is being used on my apple id and i do not know password I also have another apple id created but when I go to the istore it shows my pld account and i cannot delete and setup the right one

    i have old email address that is being used on my apple id and i do not know password I also have another apple id created but when I go to the istore it shows my pld account and i cannot delete and setup the right one

    No, "My Number" was not listed in my Phone menu, I had to manually type it it.  Is there a way for that number to automatically be listed in that "My Number" spot?  Would that maybe have something to do with my phone number not being listed as an option in the "Send and Receive" spot under messaging???

  • Google Plus notification pull-down bar white space on the right

    Google+ notification pull-down bar shows white space on the right side witch is not suppose to be there.
    I have Google Chrome installed and do not have this problem.

    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies do the following:
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    Further information can be found in the [[Clear your cache, history and other personal information in Firefox]] article.
    Did this fix your problems? Please report back to us!

  • White space on the right of a swf

    Hello,
    I would like to ask you for help. I googled around for the last 2 hours, tried several things but cannot solve my problem.
    Please have a look at http://stupavanew.beus.sk. The problem is with the flash banner at the top. It was created with a utility for creating banners and displays in firefox without any problems. In IE 8 there is white space to the right and I cannot get rid of it anyhow :-( Could you please help me?

    I am viewing it with IE8 and cannot see any white space to ther right.  There is a thin white border around the entire banner, so if you can show a screenshot of that section of the page it will be easier to confirm if what is seen is intended.

  • Add zeros on the left in a string of characters

    Hi,
    I'd like to add zeros on the left in a string of characters. Example:
       Char10: 8572   --->  Char10: 0000008572
    I'd like to know if there's a standard instruction for this, or a quick way to do it.
    Thanks in advance,
    Gerard

    Try this
    *& Report  YCHATEST                                                    *
    REPORT  YCHATEST                                .
    data : l_char(10) value '8275'.
    write : / l_char.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = l_char
    IMPORTING
       OUTPUT        = l_char
    write : / l_char.
    Message was edited by: Sekhar

  • How to pad spaces at the end of a string

    Hi All,
    I am new to ABAP and need help to achieve this functionality
       I have to build a string with fixed lenth . my input string
      is always lesser than equal to X . I need to calculate and
       add that many spaces at the end of the input string .
      I tried to do this and getting the following error
        please help on this :
      if strlen( t_resultc ) < 525.
      RFILL(t_resultc,' ',525)
      endif.
      Error : Comma without preceding colon(after RFILL(T_RESULTC ?)
    Q: Can I use RFILL with out Select statement in a ABAP program
    Thanks & Regards
      KLK

    Hi,
    Try the following code but kindly make a note..
    Note:-USE quote like this  ` `, Instead of normal single quotes ‘ ’
    WHILE strlen( T_RESULTC ) < 525.            “Check the length   
       CONCATENATE  T_RESULTC ` ` INTO T_RESULTC. ”Add spaces at the end   
    ENDWHILE.
    Hope this helps,
    Andrew

  • Unwanted white space to the right of the page

    On my side the web pages scrolls too far to the right, with lots of unwanted white space.
    I went to the original Dreamweaver template, and compared codes, but can't seem to find a way around the excessive white space. I thought at first the  div.toplogo was the culprit, and adjusted it several ways, but no luck.
    My site is www.JFKTech.info
    Has anyone had a similar problem?
    Any help would be greatly appreciated.

    This is a duplicate post.  See my answer in your other discussion.
    http://forums.adobe.com/message/6076792#6076792
    Nancy O.

Maybe you are looking for