Become Better With MODULE POOL PROGRAMMING In 10 Minutes
- Ishnoor Singh Sethi
- May 31, 2022
- 3 min read

SAP-ABAP supports two types of programs – Report Program and Dialog Program.
If your ABAP program demands user input , Dialog programming is used.
A user dialog is any form of interaction between the user and the program and could be any of the following
Entering data
Choosing a menu item
Clicking a button
Clicking or double clicking an entry
Dialog program is also used when we need to navigate back and forth between screens
Dialog programs are created with type as 'M' – Module Pool. They cannot be executed independently and must be attached to at least one transaction code in which you specify an initial screen.
Events in Module Pool Programming —
Process Before Output (PBO) event: which is processed before the screen is displayed
Process After Input (PAI) event: which is processed after a user action on the screen
Process on help request (POH): which is processed when F1 is pressed
Process on value request (POV):which is processed when F4 is pressed
Steps to start with Module Pool Programming
On Object Navigator Screen (tcode - “SE80”) select program from drop down menu and then fill the name for the program. Click on enter and save the program.

After saving Program name will appear in the below grid, right click on program name and select create and screen.

Steps to create layout for the screen —
Step 1 - Click on layout button.

Sep 2 - Apply functions as per requirement

To add table contents in layout click on the circled button and then write the name of the table and click on “get from dictionary.” After clicking select the field and click on tick icon.

Coding Screen —
Main coding for the program —

Screen 1000 coding — Customer verification screen

Screen 1000 layout — Customer verification screen

Screen 2000 coding — New Customer Registration screen

Screen 2000 layout — New Customer Registration screen

GUI elements —

Output when Entered Customer No. is present —

Output when Entered Customer No. is not present —


Database table —

Tab Strip Control —
A tabstrip control is a screen object consisting of two or more pages. Each tab page consists of a tab title and a page area. If the area occupied by the tabstrip control is too narrow to display all of the tab titles, a scrollbar appears, allowing you to reach the titles that are not displayed. There is also a pushbutton that allows you to display a list of all tab titles.
Tabstrip controls allow you to place a series of screens belonging to an application on a single screen, and to navigate between them easily.
Steps to create a Tab Strip Control menu —
Step 1 - On the painter window click on the circled button (Tabstrip Control).

Step 2 - Double click on the tab name and rename as per requirement.

Step 3 - Repeat step 2 for second tab.

Step 4 - Click on the circled button (subscreen area) and drag inside the tabstrip box.

Sample program for checking if the record is present in the table and if not adding it into the data base table.
Main coding screen —

Screen 1000 coding — Customer verification screen

Screen 1000 layout — Customer verification screen

Screen 2000 coding — Tabstrip menu

Screen 2000 layout — Tabstrip menu

Screen 3000 coding — New Customer Registration screen

Screen 3000 layout — New Customer Registration screen

Screen 4000 coding —

Screen 4000 layout —

GUI elements —

Output when Entered Customer No. is present —

Output when Entered Customer No. is not present —


Database tables —
KNA1

KNKK

Steps to make transaction code —
Step 1 - Right click on program name for which you are creating transaction code and select create and transaction.

Step 2 - Fill the required fields and click on enter.

Step 3 - After clicking on enter check this statement. If it appears it means the transaction code is generated successfully.

Checking for the transaction



ISHNOOR SINGH SETHI
LINKEDIN- https://www.linkedin.com/in/ishnoorsingh/





GO88 mình thấy bạn bè nhắc hoài nên cũng ghé thử cho biết, chủ yếu coi giao diện chứ không đào sâu gì. Vào cái là thấy trang làm kiểu đơn giản, nhìn thoáng mắt, các phần được chia khối rõ nên lướt xuống không bị rối. Mình để ý cái menu đặt khá dễ nhìn, bấm qua lại giữa mấy mục cũng mượt, không phải tìm vòng vòng. Mấy ô thông tin trên trang trình bày gọn gàng theo cột, nhìn lướt là hiểu đại khái đang có gì. Nói chung mình chỉ cần vậy để nắm cách họ sắp xếp nội dung, và mình thích nhất là cách họ gom từng khối nội dung với menu điều hướng…
GO88 dạo này mình thấy nhắc nhiều nên cũng bấm vào xem thử cho biết thôi. Mình không đăng ký hay làm gì cả, chỉ lướt xem trang trông thế nào và bố cục có dễ nhìn không. Ấn tượng ban đầu là giao diện khá gọn, nhìn “sạch” và không bị rối chữ, kiểu mở ra là biết nên nhìn chỗ nào trước. Mình thấy có phần Recent Posts với đúng bài “Welcome to WordPress” kiểu bài đầu tiên mẫu, đọc qua cũng vui vì đúng chất trang mới dựng. Kéo xuống thêm chút thì có khu Recent Comments tách riêng nên cảm giác mọi thứ được chia khối rõ ràng, không bị dồn hết vào một chỗ, nhất…
Nổ hũ mình thấy nhắc hoài nên tiện tay vào thử coi trang trông ra sao thôi, chứ cũng không ngồi đọc kỹ hay bấm chơi gì. Vừa mở lên cái mình để ý ngay là giao diện khá thoáng, chữ với khoảng trắng nhìn dễ chịu nên lướt không bị rối mắt. Nội dung họ chia thành từng khối tách bạch, kéo xuống tới đâu là hiểu tới đó, không có kiểu dồn một cục dài ngoằng. Mình cũng thích cách họ canh hàng lối gọn gàng, nhìn qua là bắt được ý chính chứ không phải nheo mắt. Menu đặt chỗ dễ thấy nên chuyển qua lại giữa các mục khá nhanh, không phải mò. Nói chung cảm…
Nỗ hũ uy tín mình thấy mọi người nhắc hoài nên cũng ghé thử cho biết, chủ yếu xem giao diện chứ không có ngồi đọc kỹ. Vào trang cái là thấy họ làm kiểu gọn gàng, chữ dễ nhìn, mấy khối nội dung tách ra rõ nên lướt nhanh vẫn nắm được ý chính. Mình mở thử trên điện thoại thì khá ổn, cuộn trang mượt và không bị vỡ bố cục như nhiều site khác. Có cảm giác họ chăm chút phần tối ưu cho mobile thật, bấm qua lại cũng nhẹ. Mình thích nhất là các tiêu đề và mục thông tin được đặt thành từng cụm rõ ràng, nhìn phát biết đâu là phần giới thiệu…
https://lc88.forum/ hôm trước mình thấy bạn bè nhắc nhẹ nên bấm vào nghía thử cho biết. Mình cũng chỉ lướt nhanh thôi chứ không ngồi đọc hết, chủ yếu xem họ trình bày nội dung ra sao. Cảm giác đầu tiên là bố cục khá dễ nhìn, kiểu chia theo từng khối nên mắt bắt thông tin nhanh. Có đoạn giới thiệu họ nói vận hành theo tiêu chuẩn châu Âu với dịch vụ 5 sao, đọc lướt vẫn hiểu ý chứ không bị rối chữ. Mình thích cái cách họ làm tiêu đề rõ ràng, kéo xuống là thấy các phần được tách riêng, không bị dính vào nhau. Menu nhìn cũng gọn nên chuyển qua lại không phải…