Technical Articles
How can we create Code Templates in SAP HANA Studio to Generate code Smartly?
Introduction
This Blog will help in saving Code Templates that you can use in any ABAP Program.
Code Templates can be used for the following
- Generate ALV Grid of Report
- Sending email to External Email
- Upload File from Presentation Server.
- Download File to Presentation Server
- Upload File from Application Server.
- Download File to Application Server
- 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
Solution
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
Conclusion
You can use this in the SAP HANA Studio.
Check below for video version