Skip to Content
Author's profile photo Yuvaraj Shanmugam

Shortcuts that can make an ABAP’er life easier

Introduction

ABAP is quite different from many contemporary programming languages in several ways. Some aspects of ABAP would make us wonder why is it made this complex while some aspects are so awesome and more comfortable for a programmer than any other language can provide.

Two of those things that I find so cool are:

  • Its ingenuous IDE (ABAP Editor) and
  • Its cool Debugger

Eventhough the SAP IDE does not support some of the features which more prominent IDE’s like Eclipse etc have, I find it so comfortable to code in ABAP Editor compared to others. The reason is because of the below shortcuts and customizations available with it. I am listing the few which I use constantly and without which I cannot think of coding ABAP.

Most of the programmers even with a little bit of ABAP experience would have come accross the details listed here. If you have, please ignore and if you haven’t then the stage is yours..

Shortcut

What it does

Ctrl + D

Duplicate any line.

eg. i_vbap TYPE STANDARD TABLE OF vbap + Ctrl-D = i_vbap TYPE STANDARD TABLE OF vbap
i_vbap TYPE STANDARD TABLE OF vbap

Ctrl + /

Jump to the “command field” where we enter t-codes. This comes really handy and saves a jump from keyboard to mouse and back to keyboard just to click on the box.

Ctrl + J

Convert to Proper case where the first letter of every word becomes a capital letter. This is pretty useful when writing comments.

eg.  * this is a comment which will give absolutely no useful information will be changed to
* This Is A Comment Which Will Give Absolutely No Useful Information

Ctrl + I  &
Ctrl + Shift + I

Incremental search. This is a little improved ‘Find’ (Ctrl + F) function which searches as soon as you type. Useful for impatient people. Add shift to search backwards.

Ctrl + K

Toggle between Upper case and Lower Case.

Alt + Selection

This is useful in situation where you need to select only the field names of a particular table.

eg.

caufvaufnr,

caufvwerks,

caufvobjnr,

caufvplnbez,

caufvgamng,

caufvgasmg,

caufvgmein,

caufvplnnr,

caufvplnal,

caufvdispo,

caufvfevor,

caufvcy_seqnr ,

caufvaufpl,

caufvgstrp,

caufvgltrp,

caufvgstrs,

caufvgltrs,

caufvgstri,

caufvgltri,

In these values, u can select only the field names by pressing Alt key and get the clipboard filled like this.

aufnr,

werks,

objnr,

plnbez,

gamng,

gasmg,

gmein,

plnnr,

plnal,

dispo,

fevor,

cy_seqnr ,

aufpl,

gstrp,

gltrp,

gstrs,

gltrs,

gstri,

gltri,

Tab & Shift tab

Increase and Decrease Intend

Ctrl + O

Goto a particular line in the program

Ctrl + Shift + S

Save your program in Desktop in .abap format. I came know about .abap only after learning this short cut.

Ctrl + Selection

When you do a selection with **** + -> or <- hold on to Ctrl to jump every word in that direction.

Ctrl + . & Ctrl + ,

Comment and Un-Comment selected lines.

Ctrl+Alt+T

Swaps current line with the Upper Line.
eg. INCLUDE ZTEST_ABAP_HTTP_CLIENT_TOP.
     INCLUDE ZTEST_ABAP_HTTP_CLIENT_C01. becomes


INCLUDE ZTEST_ABAP_HTTP_CLIENT_C01.
INCLUDE ZTEST_ABAP_HTTP_CLIENT_TOP.

Ctrl+Shift+L/X Deletes the whole line
Ctrl + ] & Ctrl + [ Jump to previous or next paragraph.

A paragraph is created by leaving an empty line between statements.

Ctrl + Shift + Num8 &
Ctrl + Shift + Num2

Move the lines up and down in the editor window while the cursor stays in the same place.

This is similar to Page Up & Page Down but instead, it does not scroll an entire page but only one line.

Ctrl + Spacebar

Display options to complete a command.

Eg. After typing CREATE, Ctrl + Spacebar will show you the list to choose DATA or OBJECT..


When I press Tab for completion, it pops up for TR Number…

The TR number that we give will be added in the comment.

Variable Name Suggestions

This is just a small setting but it will save you from Copy pasting or re-typing small words.

Particularly useful for longer variable names.

Conclusion

Apart from the editor and debugger functions, the navigation and where used-list  are other funtionalities which we use more often. Especially the code maintenance and support activities are comparitively less hectic just because these features.

Another cool way to extend its core editor functionality for customizations could be by providing API’s even for the application programmers to code and customize the editor features. It will also add to the creativity aspect on SAP side since any third programmer could come with an awesome idea as an editor extension.

As far as I have explored, I havent found any BADI or classes which can be used to perform editor functions. May be I have to look more or wait…

Update: I got impressed with the response for this blog and it made me dig deeper inside the subject and came across this.

Programming Shortcuts – The GEEK Style:

Most of the shortcuts listed and not listed here can be seen from the SAP-GUI editor options.

Again, click on the editor options button in the bottom-right corner of the SAP Editor screen,

and choose…

Now.. Most of the shortcuts listed above are available in the above list.

We can re-assign any of the actions with any shortcuts we desire..

There are also cool actions which are not assigned to any shortcuts, Copy Append is one such shortcut which I find to be very useful, un-assigned.

I am assigning a new shortcut Ctrl + Alt + C for copy append..

Now by pressing Ctrl + Alt + C, I can append contents into my clipboard.

Eg.

 

+ Ctrl + Alt + C

+     =


 

Similarly you can set shortcuts for Cut Append, Navigating to Bookmarks, Formatting Selected text etc…


Assigned Tags

      127 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      very informative. Thanks for sharing ...

      Regards,

      Satbir.

      Author's profile photo Former Member
      Former Member

      very informative. Thanks for sharing ...

      Regards,

      Satbir.

      Author's profile photo Maheshkumar gattu
      Maheshkumar gattu

      Thanks for this document.

      i* is not working for me may i know the reason.

      Author's profile photo Jesse Owens
      Jesse Owens

      Hi Yuvraj,

      Cool Info. ๐Ÿ™‚

      Alt + Selection, Code Templates, Variable name suggestion are very useful ๐Ÿ˜Ž

      Best Regards

      Jesse

      Author's profile photo R Sampath Kumar
      R Sampath Kumar

      hi yuvi,

      usefull info... thanks for sharing...

      ctrl+alt+p  for print preview. i checked in abap editor.

      Author's profile photo Former Member
      Former Member

      Very useful...

      Author's profile photo Former Member
      Former Member

      Wow amazing post. CTRL + / will save so much time!! And COPY APPEND????  Wow. Excellent stuff.

      Author's profile photo Former Member
      Former Member

      Thanks for sharing

      Author's profile photo Bhargav Darapareddy
      Bhargav Darapareddy

      Hi Yuvraj,

      Thanks for sharing valuable subject.

      thanks & regards,

      Bhargav D.

      Author's profile photo Velmurugan Thirugnanam
      Velmurugan Thirugnanam

      Excellent Yuvaraj, Learned lot of shortcuts ๐Ÿ™‚

      Thanks for sharing the useful info ....

      Author's profile photo Jitendra Kansal
      Jitendra Kansal

      fantastic stuff !!!

      Author's profile photo Siva Subramanian Ammayappapillai
      Siva Subramanian Ammayappapillai

      Good Info!!!

      Author's profile photo Suman Sardar
      Suman Sardar

      Nice thing to learn.

      Thanks for sharing.

      Author's profile photo Santhosh Kumar A
      Santhosh Kumar A

      Great Information, Thanks for sharing it.

      Author's profile photo Former Member
      Former Member

      Very useful. thanks

      Author's profile photo Ravindra Sonar
      Ravindra Sonar

      Hello Yuvraj,

      It was nice reading but honestly it was nothing new.

      I am searching one thing from long back and use of it, if u know can u please post back a reply?

      What CTRL + SHIFT + F   OR    CTRL + SHIFT + G  ----- is for???

      Automatically lines comes and number with them, they connects from each other from some points. But what are those???

      Never found any reason for it.

      Author's profile photo Yuvaraj Shanmugam
      Yuvaraj Shanmugam
      Blog Post Author

      Hey Rudra,

      Thanks for your honest comments.

      I know I m replying for your question really really late.

      But I have the answer and I cant stop myself from replying.

      The arrows you see are the visualization of tab orders in the screen where you can navigate using the TAB button.

      The red mark is the exit point and the green ones are the entry points.

      You can also define your tab order by clicking CTRL + Right click on any field in the form.

      More details on SAP GUI Help.

       

       

      Author's profile photo Ravindra Sonar
      Ravindra Sonar

      Dude ๐Ÿ™‚ after 3 and half years ๐Ÿ™‚

       

      anyway thanks for the answer I had figured it long back ๐Ÿ™‚ cheers

      Author's profile photo Former Member
      Former Member

      This is very handy !!

      Author's profile photo Former Member
      Former Member

      thanks for sharing..

      Valuable information..

      Regards

      Naganathan

      Author's profile photo Former Member
      Former Member

      Some helpful things here.

      Neal

      Author's profile photo umar jawid ahmed syed
      umar jawid ahmed syed

      Hi Yuvraj,

           Very Useful information.

      Thanks,

      Umar.

      Author's profile photo Former Member
      Former Member

      Great list!

      Author's profile photo Former Member
      Former Member

      Very useful. Thank you.

      Author's profile photo Former Member
      Former Member

      Thanks a lot for sharing this..quite helpful.

      Author's profile photo Former Member
      Former Member

      Nice Article.

      I have a question. How do you open the .abap file back? Can we upload back into SAP?

      Thank You,

      Gajendra.

      Author's profile photo Former Member
      Former Member

      Very Useful Information.

      Thanks a lot!

      Author's profile photo Ranjit Kumar
      Ranjit Kumar

      Hi Yuvraj,

      Very useful information you have mentioned. Really it will make easier life of ABAPer.

      Thanks,

      Ranjit Kumar.

      Author's profile photo Former Member
      Former Member

      I consider my self as a Part time abaper. I could find this a useful for my day to day work. How ever this can be segregated like Formatting, Help, Screen adjustments and presented as linked WIKI.

      Thanks for the info. was really helpful

      Author's profile photo Former Member
      Former Member

      Even with some of the right-side end of text being cut off, an excellent list of shortcut key-combinations. Very helpful. Thanks!

      Author's profile photo Former Member
      Former Member

      There is a horizontal scroll bar at end of content which can be used to see cut off text.

      Alternatively, if you have clicked on any text of content, left+right keyboard arrow keys can be used to scroll left/right. Mouse drag also works.

      Author's profile photo Mehwish Haq
      Mehwish Haq

      Very useful ๐Ÿ™‚ Thanks for sharing this !

      Author's profile photo M Mukhtar
      M Mukhtar

      Interesting short cuts. Thanks for sharing

      Author's profile photo Aditya Varrier
      Aditya Varrier

      Hi Yuvraj,

      nice blog, well one of my team member tried it, but wasnt working.

      Does it need specific Support Pack?

      Cheers,

      Aditya

      Author's profile photo Jitendra Soni
      Jitendra Soni

      Nice Blog Yuvraj.

      I haven't read all the comments but want to add 1 more shortcut ๐Ÿ˜‰

      Ctrl  Shift  +    => Open a New Session

      Author's profile photo Yuvaraj Shanmugam
      Yuvaraj Shanmugam
      Blog Post Author

      Thanks for the Ctrl + Shift + +.

      But opening a new session is a waste of time, it often irritates me when someone showing me anything by opening it in a new session (especially with mouse) and typing the tcode.

      Slash o it away for doing things faster.. ๐Ÿ˜‰

      Author's profile photo Former Member
      Former Member

      Hi,

      Thanks for posting the shortcuts for abap editor can u give some shortcuts related to abap debugging

      regards ,

      maha.

      Author's profile photo Jayaprakash Thanadavarayan
      Jayaprakash Thanadavarayan

      Hi yuvraj,

      I appreciate for sharing this short cuts.very helpful blog for Abapers.

      Ctrl + f6  -  call function module

      Regards

      Jayaprakash T

      Author's profile photo Former Member
      Former Member

      Great Read !!

      Especially the CTRL + Selection and ALT + Selection

      Author's profile photo Yaswanth Datta Vathumilli
      Yaswanth Datta Vathumilli

      Hi Yuvraj,

      Thanks for sharing your knowledge

      Regards,

      Yaswanth Datta

      Author's profile photo Former Member
      Former Member

      Hi Yuvaraj,

      I have one query regarding this. How can i know which database tables these templates are stored. I am working on some scenario where i need to access these entries.

      Can you please help me in this case.

      Regards,

      Vishu Agarwal

      Author's profile photo Yuvaraj Shanmugam
      Yuvaraj Shanmugam
      Blog Post Author

      I don't think it is stored in database tables. It is stored as XML files in your local PC. You can find it in the same folder where your SAP GUI data is stored. All the customization that we do here is local to every workstation and is not added in server.

      Author's profile photo Peter Inotai
      Peter Inotai

      Yes, these files are saved here (at least for SAPGUI 7.40):

      C:\Users\<username>\AppData\Roaming\SAP\SAP GUI\ABAP Editor\

      Author's profile photo Former Member
      Former Member

      Hi Yuvaraj,

      Nice blog.. a very useful one.

      Here is one I would like to add which is useful while debugging when you need to go back to a line of code that you have already passed

      Place cursor on the line to which you need to go to and Shift+F12.

      Thanks,

      Leena

      Author's profile photo Pawadee Keratichewanun
      Pawadee Keratichewanun

      Very Helpful

      Author's profile photo Former Member
      Former Member

      Thanks for sharing this ๐Ÿ™‚ .

      Author's profile photo Former Member
      Former Member

      Nice work Yuvaraj S  and thanks for sharing with us.

      Author's profile photo Former Member
      Former Member

      Thanks for sharing such a handy doc ๐Ÿ™‚

      Author's profile photo Former Member
      Former Member

      Thank You very much. Very Useful. ๐Ÿ™‚

      Author's profile photo anirban mukhopadhyay
      anirban mukhopadhyay

      Great Post! Thank you very much!!

      Author's profile photo Richard Harper
      Richard Harper

      You should've seen the previous editor.

      You could've said it was a direct copy (for commands etc) of the IBM S/370...Z/OS ISPF editor. ย  So for example to copy the line you would put Cx in the margin where x is the number of times you want it copied.

      To delete a range of lines you would enter DD on the first line and DD on the last line. ย Insert was Ix.

      Rich

      Author's profile photo Yuvaraj Shanmugam
      Yuvaraj Shanmugam
      Blog Post Author

      Just like how kids of these generations would ask us how we grew up without internet, I look at 90s and early 2000s ABAP programmers and wonder how did they even survived without the new editor.

      Also now the eclipse ADT has cooler features..

      Author's profile photo Sandro Engelbrecht
      Sandro Engelbrecht

      Is there also a shortcut available for commenting selected lines with quotes?

      e.g. " This is my comment

      Author's profile photo Prathamesh Vijay Rawool
      Prathamesh Vijay Rawool

       

      Hello Yuvaraj,

       

      This content is extremely useful.

      I am grateful for your sharing. (^-^)