Skip to Content
Technical Articles
Author's profile photo arghadip kar

How can we create Code Templates in SAP HANA Studio to Generate code Smartly?


This Blog will help in saving Code Templates that you can use in any ABAP Program.

Code Templates can be used for the following

  1. Generate ALV Grid of Report
  2. Sending email to External Email
  3. Upload File from Presentation Server.
  4. Download File to Presentation Server
  5. Upload File from Application Server.
  6. Download File to Application Server
  7. Flower Box

Above are a few examples. Please note that this concept is not eliminating creation of reusable Function Module and Class as this will also help then in using those Classes. I have saved a lot of time using this concept and it is a Hidden Treasure for ABAPers. One greatest advantage in SAP HANA Studio is that you can have some dynamic variables that helps us to create Dynamic Flower Box and other features you can think of.

Check below Blog for Code Template creation in SAP GUI.

Check below Blog for enabling Code Hints for Non Keywords



This solution is available in SAP HANA Studio

First we need to open the SAP HANA Studio and you create a Zprogram

Now Right Click and Select Preferences

Select ABAP Templates-> New

Create the Template and Provide your code as explained below and click OK and Apply and Close


Now start typing the Template name and Press CTRL+Spacebar in Keyboard


Wala the Code has been generated



You can use this in the SAP HANA Studio.


Check below for video version


Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.