Showing posts with label PAI. Show all posts
Showing posts with label PAI. Show all posts

Wednesday, September 26, 2018

RADIO BUTTON IN MODULE POOL PROGRAM/DIALOG PROGRAMING

In this we will be creating RADIO BUTTON IN MODULE POOL . it is simple to use in module pool.

first create a Module pool program and activate all modules.  and then create a screen


 
 now go to layout then click on radio button in side tool bar . and create radio button name them as
head and item (As per my requirement).then go to EDIT-->GROUPING-->RADIOBUTTONGROUP-->DEFINE

NOW YOU CLICK ON ONE OF THE RADIO BUTTON, WRITE FTCCODE AS "RADIO"
IN BOTH , WRITE THE SAME FTCHCODE.

THEN YOU GOT AND ACTIVATE PBO AND PAI MODULES.
 GO TO TOP INCLUDE AND DEFINE FOLLOWING:


IN PAI WRITE THE FOLLOWING CODE :THE LOGIC IS SIMPLE IF USER COMMAND IS RADIO AND HEAD ="X",  THEN 
WRITE LOGIC
ELSEIF USER COMMAND IS RADIO AND ITEM = 'X'.
THEN WRITE LOGIC.
ELSE .
LEAVE TO SCREEN 0.

NOW GO HEAD AND CREATE A TRANSACTION THAT WE CAN EXECUTE OUR MODULE POOL. GO SE 93 OR CREATE A TRANSACTION .
GO AND WRITE THE PROGRAM NAME AND SCREEN NUMBER
NOW EXECUTE THE TRANSACTION , YOU WILL SCREEN LIKE THIS 

THEN SELECT ONE ,









Monday, September 24, 2018

PROCESS ON VALUE REQUEST IN MODULE POOL

PROCESS ON VALUE REQUEST IN MODULE POOL :
This comes into picture when user is requesting or you want user to have set of possible inputs from which user could select what he wants, it can be done by attaching default search help in module pool but if there a requirement you need to fetch the data if there is no search help provided then you go for POV.

The event POV in module pool program is used to display the F4 values for a field if there is no search help is assigned to the Input field.

NOW OUR MAIN FOCUS IN ON F4 INPUT
THEN CLICK  ON MODULE FILL_DATA , GO TO I01.


 THIS IS ONLY CODE YOU NEED TO WRITE 

NOW LET'S CHECK 

 
 






DIALOG PROGRAMMING OR MODULE POOL PROGRAMMING


             DIALOG OR MODULE POOL PROGRAMMING .


This is one of the most favorite topic for interviewer , but if you are in implementation then you have chance of working on module pool or designing a custom screen .
So lets go in depth what is module pool and why is it used and what are the events that are related to module pool programming.

why module pool programming is required ?
If your ABAP program demands user input , Dialog programming/module pool programming  is used.

Component of Module pool Programming:
1:SCREEN
2:T-CODE
3:GUI STATUS
4:ABAP PROGRAM
5:SCREEN FLOW LOGIC
6:DYNPRO(Combination of screen with flow logic)



now let us understand each term is an easiest way possible :

SCREEN:-These are main consitient in module pool as there could subscreen , multiple screen attached in screen ,screen is where you design your screen layout for module pool programming.
screen can be created from se80 by right clicking on the program name then click on create then screen
or  you can go to SE51(SCREEN PAINTER ) AND CREATE SCREEN.


TRANSACTION CODE:-Module pool cannot run without t-code , it cannot be executed directly as like report , so t-code is very essential for running the code.
T-CODE can be created using SE93.

GUI -STATUS:- Each screen has a GUI status(es) which are independent components of a program.
This controls the menu bars, standard toolbar, application toolbar , with which the user can choose functions in the application.You can create gui status so that you could even add own push button etc.

ABAP-PROGRAM: The ABAP program contains the dialog modules that are called by the screen flow logic, and also process the user input, fields ,value request ,help adn inputs  from the GUI status.

FLOW LOGIC:- Screen Flow logic is primarily divided into four components.
  • 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

DYNPRO:-A screen together with its Flow logic  is called a Dynpro ("Dynamic Program" since the screen flow logic influences the program flow). Each dynpro controls exactly one step of your Dialog Program.



INTERVIEW QUESTION ON MODULE POOL:(link will be updated by 25th sept 2018 )