Quantcast
Channel: SCN : Blog List - All Communities
Viewing all articles
Browse latest Browse all 2548

Create an ABAP Reusable Program with 5 easy steps.

$
0
0

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:-

 

  1. Developer able to create the Program with just 4 steps with minimum functionality.
  2. We can able to reduce the Naming convention deviation up to 90% with this approach.
  3. For each new program, developer able to save 30 minutes of development effort with this approach.
  4. 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.Step1.png

 

When we follow above path, program will pop-up a window like below.


step1_popupwindow.png

 

Give the program code as your wish and click on save.

 

step1_savepattern.png

 

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

 

Step2.png

Step3:-

 

Step2 will create the empty screen with Program name.

 

Once we got the program screen, just perform below one –

step3_1stpattern.png

Click on Pattern button and give the Pattern – YPROGRAMHEADER

 

It will create the program like below (Program with all Includes and required Modularizations).

 

insert1stpatterninabapcode.png


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)


create2ndpattern.png

insert2ndpatterninabapcode.png

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)

create3rdpattern.png

insert3rdpatterninabacode.png

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 )


create4thpattern.png

insert4thpatterninabapcode.png


Advantages with this approach:-

 

  1. Developer able to create the Program with just 4 steps with minimum functionality.
  2. We can able to reduce the Naming convention deviation up to 90% with this approach.
  3. For each new program, developer able to save 30 minutes of development effort with this approach.
  4. This approached demo program can be used as base line program for internal code review checks.

Viewing all articles
Browse latest Browse all 2548

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>