RIGHT DELETING TRAILING SV_SPACE

SHIFT GT_T_DATA-EBELN  RIGHT DELETING TRAILING SV_SPACE.
in the above line GT_T_DATA is an internal table , I am not able to understand the meaning of RIGHT DELETING TRAILING SV_SPACE . Please help me in this issue .
Sabyasachi

Check it.I am sending it from SAP HELP.
Variant 4
SHIFT c LEFT DELETING LEADING c1.
Variant 5
SHIFT c RIGHT DELETING TRAILING c1.
Effect
(Variant 4/variant5). Shifts the contents of c to the left or right for as long as the string begins or ends with a character contained in c1.
If c does not begin or end with a character from c1, it remains unchanged.
Example
DATA: ALPHABET(15) VALUE '     ABCDEFGHIJ',
      M1(4)        VALUE 'ABCD',
      M2(6)        VALUE 'BJJCA '.
SHIFT ALPHABET LEFT DELETING LEADING M1.
The field ALPHABET remains unchanged.
SHIFT ALPHABET LEFT DELETING LEADING SPACE.
The field ALPHABET now has the following contents:
'ABCDEFGHIJ     '.
SHIFT ALPHABET RIGHT DELETING TRAILING M2.
ALPHABET now has the following contents:
'      ABCDEFGHI'.
Note
Performance:
For performance reasons, you should avoid using SHIFT in WHILE loops.
The runtime required to shift a field with length 10 by one character to the right or left requires about 5 msn (standardized microseconds). A cyclical shift requires around 7 msn. The runtime for the ... LEFT DELETING LEADING ... variant is around 3.5 msn, for ...RIGHT DELETING TRAILING... around 4.5 msn.

Similar Messages

  • 'SHIFT variable RIGHT deleting trailing space' not working

    I have a character field in a transaction that occasionally gets populated with a value that has a space at the end or at the beginning or both. This is causing the dataload to fail. I added code below to remove these spaces from the end and beginning-
    SHIFT <variable> RIGHT deleting TRAILING space.
    SHIFT <variable> LEFT deleting LEADING space.
    The SHIFT LEFT works perfectly and deletes the space at the begining of the value but SHIFT RIGHT does not delete the space at the end for some reason. I tried defining the variable as a char (16), string but nothing seems to make it work.
    Note: I cannot use CONDENSE because the value can have spaces in between that we cannot delete.
    Any ideas why shift right wouldn't work?

    Hi Maanasa,
                           First of all Shift works only with string datatype. So transfer the contents of that character field into a string datatype and do the shift operation.
    Declare a string variable of that type. Data v_str type string.
    Pass the contents of the character field into the string.
    And do the shift operation on the string and pass the value of the string back to the character field.
    Shift v_str by 1 places right.
    Please try this.
    Thanking you,
    Jerry

  • How to delete trailing zeros from a quantity field to display in ALV?

    Hi there,
    i am retrieving the field LGMNG from LIPS table, which is of type QUAN(13). All LGMNG values there are stored as
    1,000
    20,000
    50,000 etc.
    But i want my values to be displayed as
    1
    20
    50 etc.
    i have tried the " shift v_variable right deleting trailing '0'" but it does not work.
    also, if the value of LIPS_LGMNG =  0,000, i need those columns in ALV empty(that is no zeros or comma displayed)
    can anyone please help?
    Thanks a lot,
    Mee

    hi,
    use this it will solve your problem, just write down this on your Fieldcatalog.
       WA_FIELDCATALOG-FIELDNAME = 'VALUE7'.
       WA_FIELDCATALOG-SELTEXT_L = 'Contribution EE(due)'.
      WA_FIELDCATALOG-DATATYPE = 'INT2'.           " it will remove trailing zero
      WA_FIELDCATALOG-DECIMALS_OUT = 0.
       APPEND WA_FIELDCATALOG TO IT_FIELDCATALOG.
       CLEAR WA_FIELDCATALOG.

  • How to delete trailing zeros after decimal ?

    Hi,
    i want to delete trailing zeros after decimal.
    Example:
    if it is 22.000 then output will be 22
    if it is 22.010 then output will be 22.01.
    plz let me know hw to do this ?

    DATA:
      lv_decimal TYPE f DECIMALS 3,
      lv_string  TYPE string.
    lv_decimal = '22.010'.
    WRITE lv_decimal TO lv_string.
    SHIFT lv_string RIGHT DELETING TRAILING '0'.
    CONDENSE lv_string NO-GAPS.
    * now no trailing zeros are in the decimal stored in LV_STRING
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Jan 30, 2008 12:10 PM

  • How to delete trailing zeros after the decimal point in the ALV sum

    Hello Expert,
    In my alv output, I need to sum up one column, but in the sum result, I don't want to display zeros after the decimal point.
    for example,
    If the sum is 134.00, I only want to display 134 on the alv.
    Does any expert have idea about it?
    Thanks in advance,
    best regards, Johnny

    Hi ,
    Use following
    SHIFT variable RIGHT/LEFT DELETING TRAILING '0'.
    For more variations ,
    just write SHIFT and press f4 , it will show you the information you need.
    Hope this is helpful,
    Regards,
    Uma Dave

  • Right deleting

    Hi experts,
    I have itab like this.
    MENGE
    1.000
    1.000
    2.000
    Here, Iam trying to delete .000
    why shift deleting trailing 0 is not working??
    how to delete this??
    thanks
    kaki

    Hi kaki,
    1. It won't work because
       menge itself (by definition)
       has 3 decimals.
    2. Instead use another vartiable
    type i.
    3.
    report abc.
    data : menge like ekpo-menge.
    data : m type i.
    menge = '1'.
    m = menge.
    write :/ menge.
    write :/ m.
    regards,
    amit m.

  • How to delete trailing spaces or invalid characters

    Hi experts,
    I am loading data into a DSO. But in the activation it is showin error. Data is coming upto New data table. After that it is showing error as:
    =============================================
    Value 'Eversafe ' (hex. '204576657273616665 ') of characteristic 0CUSTOMER contains invalid characte .
    Diagnosis
        Only the following standard characters are valid in characteristic
        values by default:
        !"%&''()*+,-./:;<=>?_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.
        Furthermore, characteristic values that only consist of the character #
        or that begin with ! are not valid.
        You are trying to load the invalid characteristic value Eversafe &
        (hexidecimal representation 204576657273616665 ).
    System Response
    Procedure
    Procedure for System Administration
        Try to change the invalid characters to valid characters.
        If you want values that contain invalid characters to be admitted into
        the system, make the appropriate setting in BW Customizing . Refer to
        the documentation describing the requirements for special characters and
        the possible consequences.
    ===========================================
    After i edit this in psa it is showing another record as error.
    I think we have to delete the trailing spaces. If this is the case anyone please provide me how to write routine in the transfer rules to delete the trailing space.
    Full points will be assigned.
    Thanks & Regards,
    V N.

    Hi Venkat,
    Thanks for your reply.
    How can i know what are the extra invalid characters to be permitted.
    And also i am getting a message while activating the DSO as follows:
    ============================================
    Activation of M records from DataStore object ZDSO_OO3 terminated
    Process 000033 returned with errors
    =============================================
    Please help me to solve this issue.
    Thanks & Regards,
    V N.

  • How to trim / delete trailing space

    My file contention conversion for recordset struture 'DT_INTERFACE_in_s' in recevier communication channel is below:
    DT_INTERFACE_in_s.fieldNames     zdata1, zdata2,FILE_NAME
    DT_INTERFACE_in_s.fieldFixedLengths     4,1000,0
    DT_INTERFACE_in_s.fixedLengthTooShortHandling     Cut
    DT_INTERFACE_in_s.ignoreRecordsetName     True
    DT_INTERFACE_in_s.fieldContentFormatting     Trim
    DT_INTERFACE_in_s.lastFieldsOptional     Yes
    DT_INTERFACE_in_s.fieldSeparator     
    DT_FMS_INTERFACE_in_s.endSeparator     'nl'
    The content of zdata1 and zdata2 are sent to receiver. But there are 1000 characters for zdata2. I want to delete the trailing space of zdata2.  Pls. help

    Hi,
    This is because you are using fieldFixedLengths. So PI adds trailing spaces to match your configuration for the field to be 1000-characters long. Simply switch to fieldSeparator to have the fieldContentFormatting = Trim working fine.
    I am also not sure if this is the configuration for sender or receiver channel. You are writing about the receiver, but some parameters you use are specific for sender only. Please refer here if required:
    [Converting Text Format in the Sender File/FTP Adapter to XML|http://help.sap.com/saphelp_nwpi71/helpdata/en/44/6713ec3f914ddee10000000a1553f7/content.htm]
    [Converting XML in the Receiver File/FTP Adapter to Text Format|http://help.sap.com/saphelp_nwpi71/helpdata/en/44/686e687f2a6d12e10000000a1553f6/content.htm]
    Hope this helps,
    Greg

  • DMEE : Delete Trailing spaces in the output file..

    Dear Friends
    I am using a DMEE Tree t generate a payment file.
    Everything is fine except that teh bank requires the trailing spaces to be deleted.
    i.e. I am getting an output like below but with spaces in place of dots
    :50H:/09618078222002EUR....................<CR/LF>
    Sana'a............................................ <CR/LF>
    :70:DMEE-TEST14.................<CR/LF>
    Note:The dots represents spaces which I want to remove. The dots are added to show you the output...
    The <CR/LF> is printing at the end of the field length. I mean if the field is 34 Chr long then the
    <CR/LF> is getting printed at 35th Char irrexpective of teh field contents...
    But the bank requires in the below format. i.e. remove the spaces thats all.
    :50H:/09618078222002EUR<CR/LF>
    Sana'a<CR/LF>
    :70:DMEE-TEST14<CR/LF>
    Can anyone help.
    I am working on SAP 4.6C
    Help will surely be reawrded....

    Hello Sam,
    I DO NOT know if i can make you understand the logic, but will give it a try )
    The <CR/LF> is printing at the end of the field length. I mean if the field is 34 Chr long then the
    <CR/LF> is getting printed at 35th Char irrexpective of teh field contents...
    You define an element of length 35 char, then in the "Mapping Procedure" select the "Own Mapping (Atoms)" & set the "Atom Handling" as 01 (Concatenate values in element).
    Then create the ATOMS: one with the value "DMEE-TEST14" & the other atom with the value "<CR/LF>
    ". The output will be a concatenation of the two fields )
    Did you get what i wanted to tell you )
    BR,
    Suhas

  • Mac's keyboard left to right Delete ?

    When a PC person types a mistake they can delete letters from left to right or right to left using backspace or delete keys ! The Mac keyboard only has delete which deletes from right to left! How can a Mac person use the keyboard to delete from left to right ?

    I don't know how old your Mac keyboard is, but all recent (last few years) Mac keyboards have had a forward-delete key. Under the F14 key, there's the help key, then below that is the forward delete key.
    Interestingly, why would you post this queston in an iPhoto 6 discussion board? Oh well fortunately the question was simple enough.
    Cheers

  • How to delete Trailing zeros in a string array

    I am reading data from RS232 port and storing the values in an array of 16 nos. Then converting the array of numbers into string using 'number to fractional string" function with precession 2  and sending the data string to Table. I am printing this table further for report generation.
    I am unable to remove the trailing zeros as i am defining precession 2 which is not needed for all the numbers in the table.
    Please help me how to remove the trailing zeros after decimal point which is very much necessary for report generation.
    regards
    Prasanna Kumar N M

    Use format into string in a FOR loop with a format specified of %#f. See attached example (LabVIEW 7.0)
    Message Edited by altenbach on 10-14-2006 05:40 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    AutoFormat.vi ‏17 KB
    AutoFormat.png ‏3 KB

  • HP dv-5-1108ax: some keys on keyboard not working - left, right, delete, pg up, pg down

    I have looked on multiple different forums and websites to find a solution to my problem but havnt been successful yet. About a month ago the following keys stopped working:leftright arrowdeletepg downpg upend insert I am running vista and have not made any changes that I can think of that would cause this problem. I have tried the following:running the computter in safe mode to see if the keys work - unsuccessfulusing the onscreen keyboard - all of the keys workIf anyone has a solution please let me know. Your help would be greatly appreciated.

    I also have simillar problem, following keys on my keyboard doesn't work
    left arrow keyright arrow key insertdeletehomeendpg uppg dn
    Here is the image (the keys encircled as red don't work).

  • I want to remove Trailing zeros from a charecter value

    Hello ,
              i want to remove trailing zeros for a prticular value.Following is my code :
    DATA: V_FLOAT TYPE F VALUE '4.8240000000000000E+03',
               V_CHAR(25) ,
               P10_4(10) TYPE P DECIMALS 4.
    CALL FUNCTION 'CEVA_CONVERT_FLOAT_TO_CHAR'
    EXPORTING
    FLOAT_IMP = V_FLOAT
    FORMAT_IMP = P10_4
    ROUND_IMP = ' '
    IMPORTING
    CHAR_EXP = V_CHAR.
    SHIFT V_CHAR RIGHT DELETING TRAILING '0'.
    WRITE : V_CHAR ."NO-ZERO.
    <u><b>Output:</b></u>
    if we pass the value '1.3000000000000000E+01' it should be 13.0
    ex2: '1.3400000000000000E+01' it should be 13.4
    ex3:'4.8240000000000000E+03' it should be 4824
    is there any way to get the solution without functional module. If so Please tell me with code.

    hi
    u can do it in number of ways.
    Use TCODE SU3
    Select default tab and select radio button 123467.89 in decimal notation and save it.
    or u can try :
    if you want to do this through ABAP program.
    1. to delete trailing spaces.
    SHIFT <V_VARIABLE> RIGHT DELETING TRAILING '0'.
    to delete leading zeroes,
    SHIFT <VARIABLE_NAME> LEFT DELETING LEADING '0'.
    only for one abap program, u can use set country command
    for all programs :
    sap menu>system->go to user profil->own data>default --> and choose ur format.
    hope this helps u.
    Regards,
    Prasanth
    Reward all hepful replies

  • Remove trailing zeroes in quantity field.

    Hi all,
    I am having quantity field in ALV grid display : VBAP-KWMENG. Iam getting quantity value as 1,000.My requirement is to get quantity value as 1.(without ',' and zeroes).
    Suggest me a suitable solution.
    Thanks all.

    Other way is check for the below code ..
    DATA:
      lv_decimal TYPE f DECIMALS 3,
      lv_string  TYPE string.
    lv_decimal = '22.010'.
    WRITE lv_decimal TO lv_string.
    SHIFT lv_string RIGHT DELETING TRAILING '0'.
    * also delete trailing '.', if possible
    SHIFT lv_string RIGHT DELETING TRAILING'.'.
    CONDENSE lv_string NO-GAPS.
    * now no trailing zeros are in the decimal stored in LV_STRING

  • How to delete decimal values zeros

    Hi experts,
    i am using mseg-menge field ( lenth13 and decimals 3) in my alv grid report.
    eg: 2.3456.000
    user wants only  2.3456 no decimals.
    how we can aviod decimals 0 s in report.
    thanks in advance.
    mahahe

    I search this ways in the forums:
    Shift
    SHIFT varb1 RIGHT DELETING TRAILING '0'.
    write: gv_variable decimals 0.
    SHIFT VALUE LEFT DELETING LEADING '0'.
    Shift2
    DATA: T(14) VALUE ' abcdefghij',
    STRING LIKE T,
    STR(6) VALUE 'ghijkl'.
    STRING = T.
    WRITE STRING.
    SHIFT STRING LEFT DELETING LEADING SPACE (or use 0 to detete 0).
    WRITE / STRING.
    STRING = T.
    SHIFT STRING RIGHT DELETING TRAILING STR or 0.
    WRITE / STRING.
    Shift3
    data amt(6) type p decimals 3 value '123.450'.
    data amt1(6) type p decimals 2.
    data amt_c(6) type c.
    unpack amt to amt_c.
    shift amt_c right deleting trailing '0'.
    pack amt_c to amt1.
    write amt1.
    use FM
    FTR_CORR_SWIFT_DELETE_ENDZERO
    this FM will remove all the zeros from decimal values like
    value - 234.8000000
    output - 234.8
    IF
    data: var1 type p decimals 3,
          var2 type p decimals 2,
          var3 type p decimals 1.
    move '12345.100' to var1.
    move var1 to var2.
    move var1 to var3.
    if var2 = var1.
      if var3 = var1.
        write var3.
      else.
        write var2.
      endif.
    else.
      write var1.
    endif.
    I hope that this solve your problem.
    Cordial greetings.

Maybe you are looking for

  • I'm trying to get a style switcher going for my site(for the colour scheme)

    I'd like to give my users the choice of changing the colour scheme of my site ( http://chaoscoalition.net) at will, through css style changing buttons such as the ones on the forum's theme( http://forum.chaoscoalition.net). I've read many articles an

  • Error while using sybase trigger with the CMP entity bean,ejb version 2.1

    Hi All, I am using ejb version 2.1 and using entity bean (Transaction required) ,i am trying to update data in sybase(ver 12.3) database table I am using session bean(Transaction required) to update the multiple entity beans in a while loop.It is wor

  • What mouse pad size works best?  I'm new to Illustrator.

    What mouse pad size do you like to use for graphic design and Illustrator?  I'm new to Illustrator! Thanks~

  • HELP!!!!! iTunes is crazy!!!!

    ok one day i opened my iTunes and it had deleted all my playlists....it then proceeded to "create" my library....in doing so it began to get every song that was on my computer including those songs that are other people's who share this computer... w

  • I can't find my migrated photos.

    I can't find my migrated photos depsite using the 'simple' migration assistant. I've read that another user account gets set up because of doing this after initial set up, however I see no additional user account. I'm completely stumped. I've wasted