'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

Similar Messages

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

  • Dock dissapear, Exposse, Spaces not work

    Dock is dissapear, Exposse and Spaces not work, i had repaired permissions from disk utillity but all is de the same, restart and all is not working, command + tab either work, and if a try to minimizar a window nothings happend

    I am experiencing this same problem. I have been fine for a few weeks after my Leopard update, but then all of a sudden today I could not find my dock. I wasn't able to get it back at all, so I tried to shut down. It would not shut down so I had to do a hard shut down by holding in the power button. When it rebooted, the dock was still non-existent. I did some googling and learned it might be a corrupt preference. I then deleted the preferences, and immediately a dock (the original default installed) came up. It seemed ok for about 30 seconds, then it quit, and keeps flashing, reappearing, poking out. I deleted the preferences again, same result.
    I ran disk utility. It found some permissions problems and "repaired" them. Now the activity monitor shows that my dock is starting and quitting, as stated above, and I can't see it at all. It's gone.
    I am pretty upset about this, I rely on the dock heavily for my drag and drop applications in CS3.
    Any solutions to this yet?

  • Solved My left and right arrow keys are not working

    I just installed gnome (been using kdemod) and now, while in gnome, my left and right arrow keys are not working. Please help me solve this. I am not using compiz.
    Last edited by patrickaupperle (2009-03-25 11:19:04)

    Hi!
    I had that problem with Debian and later Arch, after I messed something up (never found out what). There was a chaotic but easy cure though (I've got no idea, why it did that on 3 different installations the exact same way - might be a logitech-keyboard issue or something... me-as-user-related)?:
    - do all keyboard changes needed in xorg.conf NOW, had to repeat "strange steps" after each change.
    - add new keyboard layout (no changes to default) in gnome keyboard settings
    - delete old keyboard layout
    - browse trough the keyboard layout "previews" of the newly added layout until it crashes (this step might be optional *g*)
    - restart gnome, add "new new" layout, delete "new old" keyboard layout, and set the "new new" layout right (try evdev-manages first, then switch to youkeyboard/yourlocal if that didn't do it).
    good look!

  • Left and right arrow keys are not working properly now

    I searched the forum and didn't see this posted. My left and right arrow keys are not working properly now.
    For example, when typing, left arrow does not produce the desired action (move cursor one spot to the left), and right arrow does not produce the desired action (move cursor one spot to the right). Also, control + left no longer activates spaces, and control + right no longer activates spaces.
    Interestingly, in investigating the problem, I noticed that my shortcut keys for activating spaces and for activating expose had been changed (software update?). Before, I had set F5 (without pressing fn) for expose and had set F6 (without pressing fn) for spaces. Now, I noticed spaces was set back to the default of F8 (requiring fn).
    The issue persists after shut down, and even when logged on to other users, e.g. Guest.
    All other keys seem to be working fine, including the up and down arrows.
    I don't think it's a cleaning issue because fn + left + right produces the "[" character on the screen.
    Any ideas?

    I'm having the same type of issue on my MacBook except not with arrow keys. The volume keys do different things when I click on them. For example, the mute key brings up the dashboard and the volume up key makes all the open screens smaller (don't know what this feature is called). I did a software update then restarted the computer when this starting happening. Any help would be greatly appreciated, thanks.

  • Delete operation is not working to delete selected row from ADF table

    Hi All,
    We are working on jdev 11.1.1.5.3. We have one ADF table as shown below. My requirement is to delete a selected row from table, but it is deleting the first row only.
    <af:table value="#{bindings.EventCalendarVO.collectionModel}" var="row"
    rows="#{bindings.EventCalendarVO.rangeSize}"
    emptyText="#{bindings.EventCalendarVO.viewable ? applcoreBundle.TABLE_EMPTY_TEXT_NO_ROWS_YET : applcoreBundle.TABLE_EMPTY_TEXT_ACCESS_DENIED}"
    fetchSize="#{bindings.EventCalendarVO.rangeSize}"
    rowBandingInterval="0"
    selectedRowKeys="#{bindings.EventCalendarVO.collectionModel.selectedRow}"
    selectionListener="#{bindings.EventCalendarVO.collectionModel.makeCurrent}"
    rowSelection="single" id="t2" partialTriggers="::ctb1 ::ctb3"
    >
    To perform delete operation i have one delete button.
    <af:commandToolbarButton
    text="Delete"
    disabled="#{!bindings.Delete.enabled}"
    id="ctb3" accessKey="d"
    actionListener="#{AddNewEventBean. *deleteCurrentRow* }"/>
    As normal delete operation is not working i am using programatic approach from bean method. This approach works with jdev 11.1.1.5.0 but fails on ver 11.1.1.5.3
    public void deleteCurrentRow (ActionEvent actionEvent) *{*               DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcItteratorBindings =
    bindings.findIteratorBinding("EventCalendarVOIterator");
    // Get an object representing the table and what may be selected within it
    ViewObject eventCalVO = dcItteratorBindings.getViewObject();
    // Remove selected row
    eventCalVO.removeCurrentRow();
    it is removing first row from table still. Main problem is not giving the selected row as current row. Any one point out where is the mistake?
    We have tried the below code as well in deleteCurrentRow() method
    RowKeySet rowKeySet = (RowKeySet)this.getT1().getSelectedRowKeys();
    CollectionModel cm = (CollectionModel)this.getT1().ggetValue();
    for (Object facesTreeRowKey : rowKeySet) {
    cm.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)cm.getRowData();
    rowData.getRow().remove();
    The same behavior still.
    Thanks in advance.
    Rechin
    Edited by: 900997 on Mar 7, 2012 3:56 AM
    Edited by: 900997 on Mar 7, 2012 4:01 AM
    Edited by: 900997 on Mar 7, 2012 4:03 AM

    JDev 11.1.1.5.3 sounds like you are using oracle apps as this not a normal jdev version.
    as it works in 11.1.1.5.0 you probably hit a bug which you should file with support.oracle.com...
    Somehow you get the first row instead of the current row (i guess). You should debug your code and make sure you get the current selected row in your bean code and not the first row.
    This might be a problem with the bean scope too. Do you have the button (or table) inside a region? Wich scope does the bean have?
    Anyway you can try to remove the iterator row you get
    public void deleteCurrentRow (ActionEvent actionEvent) { DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcItteratorBindings =
    bindings.findIteratorBinding("EventCalendarVOIterator");
    dcItteratorBindings.removeCurrentRow();Timo

  • MY ONE OF THE RIGHT INBUILT SPEAKER IS NOT WORKING IN HP PAVILION DV4 ENTERTAINMENT PC

    i brought this hp note book from U.S .NOW,MY ONE OF MY RIGHT INBUILT SPEAKER IS NOT WORKING..SUGGEST ANY SOLUTION TO THIS ..NOW I AM IN INDIA ,OFCOURSE I AM AN INDIAN..SUGGESTS HP STORE IN ANDHRA PRADESH

    Contact HP Total Care in Australia.
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • Delete Statement is not working correctly

    Hello,
    The following delete statement is not working correctly.
    If I press delete it will delete everything in the category table
    I don't know whats wrong with it.
    ----delete row from category if there is not infrastructure to support------
    IF :P12_DFCY_SEQNO4 IS NOT NULL AND :P12_DFCY_CATG_C = '7' THEN
    DELETE FROM DFCY_CATG
    WHERE NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;
    Thanks
    Mary

    Hi,
    IF :P12_DFCY_SEQNO4 IS NOT NULL AND :P12_DFCY_CATG_C = '7' THEN
    DELETE FROM DFCY_CATG
    WHERE NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;So, if P12_DFCY_SEQNO4 does not exist, then I would expect all records to be deleted because the NOT EXISTS() function would just return TRUE for every record on the table. Somewhere in the statement, I would expect to see something that links between the table being deleted from and the NOT EXISTS() data or, perhaps, using the P12_DFCY_CATG_C value as a filter?
    Andy

  • Delete statement is not working.

    Hi,
    find the code. Here the delete statement is not working and i am getting sy-subrc = 4. although ,
    xe1edp10-idnkd = 34596 and dint_edidd -sdata = 34596.
    please help me ...
    loop at dekek_x.
    loop at dint_edidd where segnam = 'E1EDP10'.
    if dekek_x-stpin = 1 .
    CLEAR xe1edp10.
      MOVE dint_edidd-sdata TO xe1edp10.
    delete dint_edidd where sdata = xe1edp10-idnkd.
    endif.
    endloop.

    1st thing..
    i tried this :
    tables: edidd, e1edp10.
    edidd-sdata = '315934 EA 017'.
    WRITE edidd-sdata.
    move edidd-sdata to e1edp10.
    IF edidd-sdata = e1edp10-idnkd.
    WRITE: e1edp10-idnkd.
    else.
      WRITE: 'nothing'.
    ENDIF.
    output
    >315934 EA 017
    >315934 EA 017
    2nd thing,.
    your loop inside loop doesnt make any sense as they are not related any where.
    3rd thing:
    the fields are not type compatible.. this might be the reason for wrong delete statement..
    and 1 more clarification:
    TABLES: edidd, e1edp10.
    DATA :it TYPE TABLE OF edidd WITH HEADER LINE.
    edidd-sdata = '315934 EA 017'.
    WRITE edidd-sdata.
    APPEND edidd TO it.
    edidd-sdata = '315934 EA 018'.
    APPEND edidd TO it.
    LOOP AT it." where segnam = 'E1EDP10'.
      CLEAR e1edp10.
      MOVE it-sdata TO e1edp10.
      DELETE it WHERE sdata = e1edp10-idnkd.
    ENDLOOP.
    in this also delete is working perfectly fine... you run and check..

  • Itunes does not open,everytime i try it says "The itunes application could not be opened. The required folder cannot be found" I have tried the shift key option but that does not work. help!!

    I cannot open itunes. Everytime i try it says "The itunes application could not be opened.The folder cannot be found." I have tried the shift key option but this does not work. Please help.!!

    Try the actions here for that driver.
    iOS: Device not recognized in iTunes for Windows
    I would first do this:
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7

  • My laptop right arrow key is not working

    my laptop right arrow key is not working.Please help me

    Hi @Akashandroid 
    Welcome to the HP Forums!
    It is a dynamite  place to find answers and  tips!
    For you to have the best experience in the HP forum I would like to direct your attention to the HP Forums Guide Learn How to Post and More
    I understand that your right arrow key is not working.
    Here is a link to HP Notebook PCs - Notebook Keyboard Troubleshooting (Windows 8).
    If this has not helped, it may be a mechanical issue and require replacement.  If you are in warranty please contact HP support for repair options.
    Please call our technical support at 800 474 6836. If you live outside the US/Canada Region, please click the link below to get a support number for your region.
    World Wide Phone Support
    If you are out of warranty you may wish to try the repair yourself or take it to a local repair shop.
    Here is a link to the HP Pavilion g7 Notebook PC Maintenance and Service Guide
    Chapter 3 page 20 has the keyboard part numbers if you should require them. 
    Chapter 4 page 58 has steps for removing the keyboard should you want them.
    Good Luck!
    Sparkles1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom right to say “Thanks” for helping!

  • Delete command does not work

    delete command does not work.. it just freezes neither roll back happens.. please advice

    Always: If possible, give the exact command & output from your terminal, pefrerrable with copy & paste. We cannot see your screen and magically spot the problem.
    In general, you should also include your database version and OS, although I doubt that this is relevant in this particular case.
    Kind regards
    Uwe Hesse
    http://uhesse.wordpress.com

  • Brand new macbook --- DELETE KEY DOES NOT WORK --- how to fix?

    I have a brand new MacBook and the delete key does not work. Is there a way to fix this?

    You have 14 days to exchange it no questions asked.

  • HT3226 Delete key is not working on the keyboard. What should I do?

    The delete key is not working on the wireless keyboard. What should I do?

    If it ever worked before then do 2-3 SMC resets back to back. You can find instructions at https://discussions.apple.com/docs/DOC-3603

  • Send to bluetooth right click option DOES NOT WORK

    hi guys can you help me send to bluetooth right click option does not work!when i am going to send something it says windows cannot access the specified device,path or file you may not have the appropriate permissions to access the item please help me!i
    have windows 8

    this is how we send file using Bluetooth
    http://superuser.com/questions/540498/open-bluetooth-file-transfer-wizard-in-windows-8
    Did you pair this 2 device before?
    May I know the destination device? its comes with WIFI?
    tips: rather than Bluetooth, I suggest you using file sharing with WIFI, its more faster

Maybe you are looking for

  • Can we load data in variable screen from flat file?

    Hello all, One of my user once asked me she needs to run a report for some employees, i said you can just type that in employee varaible input box. She said I need to run the report and I need it for 120 employees, she has the employee numbers in exc

  • Upload of GL balances in mid year go live

    Hi gurus, appreciate if you can please tell me things to keep in mind and steps to upload balance sheet and p&l accounts in mid year go live in May and also client wants to see p&l from January in sap????????? waiting for your reply. THanks

  • Questions on replacing hard drive in Compaq CQ58 for the experts

    I have a Compaq CQ58-bf9WM, product number: C2M29UA#ABA with Window 8 version 6.2.9200 build 9200. Windows 8 is not meeting my needs and I wish to replace it. My plan is to replace the existing hard disk with a new solid state disk. I need to prepare

  • Still image with motion has flicker pulsating problem

    I use FCP 5.0.4 I have read the many threads about this subject and am still not able to succeed in getting rid of the flicker/pulsating in a still image with motion. I would say about 25% of the stills with motion have the jitters; all the rest look

  • DVD+R burning issue

    Very strange, seems that the first DVD+R I burn fails verification just as it starts, and the second effort succeeds, basically since upgrading to Leopard. It really is starting to feel like a software glitch because it's happening this way all the t