Hi
This blog will explains
How to Create an ABAP Reusable Program with 5 easy steps.
Here I would like to demonstrate how we can create Reusable ABAP Custom Program using Custom Patterns.
Advantages with this approach:-
- Developer able to create the Program with just 4 steps with minimum functionality.
- We can able to reduce the Naming convention deviation up to 90% with this approach.
- For each new program, developer able to save 30 minutes of development effort with this approach.
- This approached demo program can be used as base line program for internal code review checks.
Kindly review the Blog and Share your valuable thoughts / comments on this Blog.
Thanks ,
Sreeram
Blog Content -
Step1:-
Create 4 Custom Patterns -
1.YPROGRAMHEADER
2.YPROGRAMSELECTION
3. YPROGRAMDECLARATIONS
4. YPROGRAMPROCESS
How to create custom patterns –
Go to Transaction - SE38 -> Program screen -> Utilities -> More Utilities -> Edit Pattern -> Create Pattern.
When we follow above path, program will pop-up a window like below.
Give the program code as your wish and click on save.
Using above step, create 4 Custom Patterns.
1.YPROGRAMHEADER
2.YPROGRAMSELECTION
3. YPROGRAMDECLARATIONS
4. YPROGRAMPROCESS
How to use these Patterns –
To get the advantage of these patterns, developer just needs to follow the below steps.
Step2:-
Create a program using SE38 transaction
Step3:-
Step2 will create the empty screen with Program name.
Once we got the program screen, just perform below one –
Click on Pattern button and give the Pattern – YPROGRAMHEADER
It will create the program like below (Program with all Includes and required Modularizations).
Step4:-
Double Click on selection-screen include and select the pattern YPROGRAMSELECTION
It will creates the required selection-screens code like below (Selection-screen code with Naming conventions)
Step5:-
Double Click on Data Declarations include and select the pattern YPROGRAMDECLARATIONS
It will creates the required data declarations like below (All the minimum required Declarations with naming conventions)
Double Click on Data Declarations include and select the pattern YPROGRAMPROCESS
It will creates the required processing code like below (Processing logic with minimum required comments & conventions )
Advantages with this approach:-
- Developer able to create the Program with just 4 steps with minimum functionality.
- We can able to reduce the Naming convention deviation up to 90% with this approach.
- For each new program, developer able to save 30 minutes of development effort with this approach.
- This approached demo program can be used as base line program for internal code review checks.