Imp: Module pool Or Dialog programming
Hi ,
I have got a requirement to work on module pool programming.....Please help me with some documents which explains me about it from scratch clearly .
Awaiting for ur reply...........
basics of module pool
<u><i><b>OVERVIEW</b></i></u>
There are programs in every domain that require certain amount of user interaction .Such requirements in ABAP are fulfilled with the help of a user dialog and dialog programming which encapsulates the entire logic pertaining to the required user dialog.
One needs to take care that user interactions with the system are comfortable and user friendly along with being logically coherent.
<u><i><b>What is a user dialog?</b></i></u>
Any kind of user interaction with the system can be called as a user dialog:
1) Entering data on the screen.
2) Clicking a button.
3) Navigation between screens.
<u><i><b>Need of dialog programming</b></i></u>
In a typical dialog, the system displays a screen on which the user can enter or request information. As a reaction on the user input or request, the program executes the appropriate actions: it branches to the next screen, displays an output, or changes the database.
Example
A travel agent wants to book a flight. The agent enters the corresponding data on the screen. The system either confirms the desired request, that is, the agent can book the flight and the customer travels on the desired day on the reserved seat to the chosen destination, or the system displays the information that the flight is already booked up.
To fulfill such requirements, a dialog program must offer:
A user-friendly user interface
Format and consistency checks for the data entered by the user
Easy correction of input errors
Access to data by storing it in the database.
ABAP/4 offers a variety of tools and language elements to meet the requirements stated above in the dialog programs.
<u><i><b>
Why dialog programming is also known as module pool?</b></i></u>
Dialog Programming consists of screens and corresponding ABAP program. Screens call dialog modules in the associated ABAP program from their flow logic. Type M programs serve principally as containers for these dialog modules, and hence dialog programming is also known as module pools. A module pool program is a program type which is not executable directly. You can not just run by hitting F8 like a report program. You must tie a transaction code to a screen in order to start the program.
<i><b>VARIOUS COMPONENTS OF A DIALOG PROGRAM</b></i>
Unlike report, interface or any conversion development which generally entails the creation of one autonomous program which can be executed independently of other objects, dialog program development entails development of multiple objects none of which can be executed on its own. Instead all objects are linked hierarchically to the main program and are executed in a sequence dictated by the Dialog Main Program.
<u><i><b>
Components of a dialog program</b></i></u>
1) Transaction
2) Screen
3) GUI status
4) ABAP program
All these components are explained in detail below.
1) TRANSACTION :
The transaction starts a screen sequence. You create transaction codes in the Repository Browser in the ABAP Workbench or using Transaction SE93. A transaction code is linked to an ABAP program and an initial screen. As well as using a transaction code, you can start a screen sequence from any ABAP program using the CALL SCREEN statement.
2) SCREEN
As a user of an R/3 system, one is always confronted with screens. From the moment one logs on, one can see a screen and one must perform actions on this screen. All those screens are components of ABAP programs. Generally, we define the screens of an ABAP program with the Screen Painter tool of the ABAP.
In the R/3 system, screens are program objects that consist of two parts. First, they have a layout that defines the front end appearance of the window that is presented to the user. Second, they have a flow logic that is executed on the backend by the application server. The screen flow logic is a program layer between the front end and the actual ABAP application program at the backend. The language used to program screen flow logic has a similar syntax to ABAP, but is not part of ABAP itself. Unlike ABAP programs, the screen flow logic contains no explicit data declarations. You define the screen fields by placing elements on the screen mask instead. When you define screen fields by referring to data types in the ABAP Dictionary, the runtime environment automatically creates dialogs for field help, input help, and error handling that depends on the semantics of the data type in the dictionary.
The screen flow logic is similar to an ABAP program in that it contains processing blocks. These processing blocks are event blocks that are triggered by the ABAP runtime environment. The most important event blocks are:
PROCESS BEFORE OUTPUT
The respective event (PBO) is triggered after the PROCESS AFTER INPUT (PAI) processing of the previous screen and before the current screen is displayed.
PROCESS AFTER INPUT
The respective event (PAI) is triggered when the user chooses a function on the current screen.
PROCESS ON HELP REQUEST
This event is triggered when function key F1 is pressed.
PROCESS ON VALUE REQUEST
This event is triggered when function key F4 is pressed.
The main task of these processing blocks is to call ABAP dialog modules using the MODULE statement. During the PBO event, you can call any dialog module in the ABAP program that is marked with the addition OUTPUT. In the PAI event, you can call any dialog module program that is marked with the addition INPUT. The screens of an ABAP program can share the dialog modules of that program. You use the dialog modules called during PBO to prepare the screen and the dialog modules called during PAI to react to the user input.
Each screen of an ABAP program has a unique screen number. The screens of an ABAP program can be combined to form screen sequences. Screen sequences are either built statically by setting the following screen in the Screen Painter or dynamically by overriding the static setting in the ABAP program. The last screen of a screen sequence is always the one where the following screen is set to zero.
ATTRIBUTES OF SCREEN
Like all objects in the R/3 Repository, screens have attributes that both describe them and determine how they behave at runtime. Important screen attributes for ABAP programming:
Program
The name of the ABAP program (type 1, M, or F) to which the screen belongs.
Screen number
A four-digit number, unique within the ABAP program that identifies the screen within the program. If your program contains selection screens, remember that selection screens and Screen Painter screens use the same namespace. For example, if you have a program with a standard selection screen, you may not contain any further screens with the number 1000. Lists, on the other hand, have their own namespace.
Screen type
A normal screen occupies a whole GUI window. Modal dialog boxes only cover a part of a GUI window. Their interface elements are also arranged differently. Selection screens are generated automatically from the definition in the ABAP program. You may not define them using the Screen Painter. A subscreen is a screen that you can display in a subscreen area on a different screen in the same ABAP program.
Next screen
Statically-defined screen number, specifying the next screen in the sequence. If you enter zero or leave the field blank, you define the current screen as the last in the chain. If the next screen is the same as the current screen, the screen will keep on calling itself. You can override the statically-defined next screen in the ABAP program.
Cursor position
Static definition of the screen element on which the cursor is positioned when the screen is displayed. By default, the cursor appears on the first input field. You can overwrite the static cursor position dynamically in your ABAP program by using SET CURSOR FIELD <f>
Screen group
Four-character ID, placed in the system field SY-DYNGR while the screen is being processed. This allows you to assign several screens to a common screen group. You can use this, for example, to modify all of the screens in the group in a uniform way. Screen groups are stored in table TFAWT.
Hold data
If the user calls the screen more than once during a terminal session, he or she can retain changed data as default values by choosing System -> User profile -> Hold data.
VARIOUS SCREEN ELEMENTS
A screen can contain a wide variety of elements, either for displaying field contents, or for allowing the user to interact with the program (for example, filling out input fields or choosing pushbutton functions). We use the Screen Painter to arrange elements on the screen.
We can use the following elements:
Text fields
Display elements, which cannot be changed either by the user or by the ABAP program.
Input/output fields and templates
Used to display data from the ABAP program or for entering data on the screen. Linked to screen fields.
Dropdown list boxes
Special input/output fields that allow users to choose one entry from a fixed list of possible entries.
Checkbox elements
Special input/output fields that the user can either select (value X) or deselect (value SPACE). Checkbox elements can be linked with function codes.
Radio button elements
Special input/output fields that are combined into groups. Within a radio button group, only a single button can be selected at any one time. When the user selects one button, all of the others are automatically deselected. Radio button elements can be linked with function codes.
Pushbuttons
Elements on the screen that trigger the PAI event of the screen flow logic when chosen by the user. There is a function code attached to each pushbutton, which is passed to the ABAP program when it is chosen.
Frame
Pure display elements that group together elements on the screen, such as radio button groups.
Subscreens
Area on the screen in which you can place another screen.
Table controls
Tabular input/output fields.
Tab strip controls
Areas on the screen in which you can switch between various pages.
Custom Controls
Areas on the screen in which you can display controls. Controls are software components of the presentation server.
Status icons
Display elements, indicating the status of the application program.
OK field
Every screen has a twenty-character OK_CODE field (also known as the function code field) that is not displayed directly on the screen. User actions that trigger the PAI event also place the corresponding function code into this field, from where it is passed to the ABAP program. You can also use the command field in the standard toolbar to enter the OK field. To be able to use the OK field, you need to assign a name to it.
All screen elements have a set of attributes, some of which are set automatically, others of which have to be specified in the Screen Painter. They determine things such as the layout of the screen elements on the screen. You can set the attributes of screen elements in the Screen Painter - either for a single element, or using the element list, which lists all of the elements belonging to the current screen. Some of the attributes that you set statically in the Screen Painter can be overwritten dynamically in the ABAP program.
Regards
navjot
reward points if helpfull
Similar Messages
-
Difrence between module pool and dialog programming
Hi abapers,
can plz tell me difrence between module pool and dialog programming.Hi,
Actually Dialog Programming is Module pool Programming.
Please go thru this , see if your dbout gets clear.
Basic components of dialog program?
- Screens (Dynpros)
- Each dialog in an SAP system is controlled by dynpros.A dynpros consists of a screen
And its flow logic and controls exactly one dialog step.
- ABAP/4 module Pool.
Each dynpro refers to exactly one ABAP/4 dialog program .Such a dialog program is also called a module pool ,since it consists of interactive modules.
Regards,
Priyanka. -
Please help me out... provide me your module pools simple programs
Dear Friends,
Can you please help me out in getting some simple module pool programs like
using
INSERT
UPDATE
BACK
commands....Dear Hazi Valli,
Post your queries in relevant Forum. You could post queries related to module pool in UI Programming Forum of ABAP Development. Search the Forum for generic queries.
Visit following links:
http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e4/2adbef449911d1949c0000e8353423/content.htm
http://www.thespot4sap.com/Articles/SAP_Design_Dynpro.asp
Regards,
Naveen. -
Custom Module Pool...
Hello SDN ABAP Community,
I researched this question on the web and in SDN before posting this because I would like an up-to-date understanding of best way to do this.
I have a need to write a custom module pool. It has been a while since I have been to class. I need to get figured out how my naming conventions will work for all the pieces of the module pool (SE51, SE41, pieces of the SE38 module pool).
I seem to remember the teacher saying that the way that SAP allows for customer created module pools was to set the 5th character of the name to 'Z'. eg- sap would use SAPMPetc. customer would use SAPMZetc.
From my searching of web I found following naming standards...
Module pool - SAPDY* SAPDZ*
Module pool for dialog - DY* DZ*
INCLUDES - SAPMY* SAPMZ*
Module pool for screens - MY* MZ*
INCLUDES - MP9*
Module pool for info types - MP9*
INCLUDES - SAPFY* SAPFZ*
Module pool for subroutines - FY* FZ*
INCLUDES - SAPUY* SAPUZ*
Module pool for update program - UY* UZ*
INCLUDES
From searching SDN I found following link for ABAP objects, but I am needing for module pool.
http://help.sap.com/saphelp_nw04/helpdata/en/92/c2b084bc1d11d2958700a0c94260a5/frameset.htm
So my question... is there any SAP resource that I can look at to see SAP naming conventions for customer created module pool with SE41, SE51 and SE38?
Thank you,
Dean Atteberry.Hi Dean, here you can take a look at SAP´s official customer name ranges for all objects, including Module Pool: http://help.sap.com/saphelp_nw04/helpdata/EN/2a/6b0b1f547a11d189600000e829fbbd/frameset.htm
Best regards,
Federico Alvarez -
Module pools mixed in MP001600 GUI
Hello everybody,
I am facing a strange issue related to module pool. I have defined ZP001600 module pool for IT0016, which is shown for all the employees. However, if the employee belongs to Belgium, then an additional module pool is shown in the IT0016 GUI, which is specific and standard for Belgium (MP010900) and this one is appear mixed with the custom one ZP001600. I have tried to seek for a table where a sequence or order for this module pool are defined but I just found two different tables where are customize both modulule pool for this tables:
T582V - Assignment of Infotypes to Views
IT view ind. Infotype Name of view for infotypes Dialog module Program Name Screen number
12 0016 V109 MP010900 0100
T582C Include Screens for Infotypes
Module Pool Standard screen Program Name Standard screen
MP001600 2000 ZP001600 0200
Could you please assist me?
Thanks in advanceApril,
Thanks for your reply. HR_PK_EXCEL_TO_INTERNAL_TABLE does not show up in our system when doing a search on function modules. It is good to know that TEXT_CONVERT_XLS_TO_SAP has been released for customer use in newer systems than we are currently using.
I think that I'll use this function module, TEXT_CONVERT_XLS_TO_SAP, and call it a day.
Although, I am still interested in other solutions if anybody out there has one.
Bruce
Message was edited by: Bruce Tjosvold -
Hello Everybody and hello World.
I would like to know how to do a basic dialog programming..
Can anyone help me?Please....
give me some advice....Im very eager to learn that dialog programming
Thanks in advance
aVaDuDzhi
INTRODUCTION TO DIALOG PROGRAMMING
OVERVIEW
There are programs in every domain that require certain amount of user interaction .Such requirements in ABAP are fulfilled with the help of a user dialog and dialog programming which encapsulates the entire logic pertaining to the required user dialog.
One needs to take care that user interactions with the system are comfortable and user friendly along with being logically coherent.
<u><i><b>
What is a user dialog?</b></i></u>
Any kind of user interaction with the system can be called as a user dialog:
1) Entering data on the screen.
2) Clicking a button.
3) Navigation between screens.
<u><i><b>Need of dialog programming</b></i></u>
In a typical dialog, the system displays a screen on which the user can enter or request information. As a reaction on the user input or request, the program executes the appropriate actions: it branches to the next screen, displays an output, or changes the database.
Example
A travel agent wants to book a flight. The agent enters the corresponding data on the screen. The system either confirms the desired request, that is, the agent can book the flight and the customer travels on the desired day on the reserved seat to the chosen destination, or the system displays the information that the flight is already booked up.
To fulfill such requirements, a dialog program must offer:
A user-friendly user interface
Format and consistency checks for the data entered by the user
Easy correction of input errors
Access to data by storing it in the database.
ABAP/4 offers a variety of tools and language elements to meet the requirements stated above in the dialog programs.
<u><i><b>Why dialog programming is also known as module pool?</b></i></u>
Dialog Programming consists of screens and corresponding ABAP program. Screens call dialog modules in the associated ABAP program from their flow logic. Type M programs serve principally as containers for these dialog modules, and hence dialog programming is also known as module pools. A module pool program is a program type which is not executable directly. You can not just run by hitting F8 like a report program. You must tie a transaction code to a screen in order to start the program.
VARIOUS COMPONENTS OF A DIALOG PROGRAM
Unlike report, interface or any conversion development which generally entails the creation of one autonomous program which can be executed independently of other objects, dialog program development entails development of multiple objects none of which can be executed on its own. Instead all objects are linked hierarchically to the main program and are executed in a sequence dictated by the Dialog Main Program.
Components of a dialog program
1) Transaction
2) Screen
3) GUI status
4) ABAP program
All these components are explained in detail below.
1) TRANSACTION :
The transaction starts a screen sequence. You create transaction codes in the Repository Browser in the ABAP Workbench or using Transaction SE93. A transaction code is linked to an ABAP program and an initial screen. As well as using a transaction code, you can start a screen sequence from any ABAP program using the CALL SCREEN statement.
2) SCREEN
As a user of an R/3 system, one is always confronted with screens. From the moment one logs on, one can see a screen and one must perform actions on this screen. All those screens are components of ABAP programs. Generally, we define the screens of an ABAP program with the Screen Painter tool of the ABAP.
In the R/3 system, screens are program objects that consist of two parts. First, they have a layout that defines the front end appearance of the window that is presented to the user. Second, they have a flow logic that is executed on the backend by the application server. The screen flow logic is a program layer between the front end and the actual ABAP application program at the backend. The language used to program screen flow logic has a similar syntax to ABAP, but is not part of ABAP itself. Unlike ABAP programs, the screen flow logic contains no explicit data declarations. You define the screen fields by placing elements on the screen mask instead. When you define screen fields by referring to data types in the ABAP Dictionary, the runtime environment automatically creates dialogs for field help, input help, and error handling that depends on the semantics of the data type in the dictionary.
The screen flow logic is similar to an ABAP program in that it contains processing blocks. These processing blocks are event blocks that are triggered by the ABAP runtime environment. The most important event blocks are:
PROCESS BEFORE OUTPUT
The respective event (PBO) is triggered after the PROCESS AFTER INPUT (PAI) processing of the previous screen and before the current screen is displayed.
PROCESS AFTER INPUT
The respective event (PAI) is triggered when the user chooses a function on the current screen.
PROCESS ON HELP REQUEST
This event is triggered when function key F1 is pressed.
PROCESS ON VALUE REQUEST
This event is triggered when function key F4 is pressed.
The main task of these processing blocks is to call ABAP dialog modules using the MODULE statement. During the PBO event, you can call any dialog module in the ABAP program that is marked with the addition OUTPUT. In the PAI event, you can call any dialog module program that is marked with the addition INPUT. The screens of an ABAP program can share the dialog modules of that program. You use the dialog modules called during PBO to prepare the screen and the dialog modules called during PAI to react to the user input.
Each screen of an ABAP program has a unique screen number. The screens of an ABAP program can be combined to form screen sequences. Screen sequences are either built statically by setting the following screen in the Screen Painter or dynamically by overriding the static setting in the ABAP program. The last screen of a screen sequence is always the one where the following screen is set to zero.
HANDLING USER INTERACTIONS
A user can interact in various ways with screens. We distinguish between actions that trigger PAI and those that dont. In general, filling input fields with values does not trigger PAI.
Actions that do trigger PAI include:
Choosing a pushbutton on the screen.
Choosing a specially prepared check box or radio button on the screen.
Choosing a function in the menu, standard toolbar, or application toolbar.
Choosing a function key on the keyboard.
ATTRIBUTES OF SCREEN
Like all objects in the R/3 Repository, screens have attributes that both describe them and determine how they behave at runtime. Important screen attributes for ABAP programming:
Program
The name of the ABAP program (type 1, M, or F) to which the screen belongs.
Screen number
A four-digit number, unique within the ABAP program that identifies the screen within the program. If your program contains selection screens, remember that selection screens and Screen Painter screens use the same namespace. For example, if you have a program with a standard selection screen, you may not contain any further screens with the number 1000. Lists, on the other hand, have their own namespace.
Screen type
A normal screen occupies a whole GUI window. Modal dialog boxes only cover a part of a GUI window. Their interface elements are also arranged differently. Selection screens are generated automatically from the definition in the ABAP program. You may not define them using the Screen Painter. A subscreen is a screen that you can display in a subscreen area on a different screen in the same ABAP program.
Next screen
Statically-defined screen number, specifying the next screen in the sequence. If you enter zero or leave the field blank, you define the current screen as the last in the chain. If the next screen is the same as the current screen, the screen will keep on calling itself. You can override the statically-defined next screen in the ABAP program.
Cursor position
Static definition of the screen element on which the cursor is positioned when the screen is displayed. By default, the cursor appears on the first input field. You can overwrite the static cursor position dynamically in your ABAP program by using SET CURSOR FIELD <f>
Screen group
Four-character ID, placed in the system field SY-DYNGR while the screen is being processed. This allows you to assign several screens to a common screen group. You can use this, for example, to modify all of the screens in the group in a uniform way. Screen groups are stored in table TFAWT.
Hold data
If the user calls the screen more than once during a terminal session, he or she can retain changed data as default values by choosing System -> User profile -> Hold data.
VARIOUS SCREEN ELEMENTS
A screen can contain a wide variety of elements, either for displaying field contents, or for allowing the user to interact with the program (for example, filling out input fields or choosing pushbutton functions). We use the Screen Painter to arrange elements on the screen.
We can use the following elements:
Text fields
Display elements, which cannot be changed either by the user or by the ABAP program.
Input/output fields and templates
Used to display data from the ABAP program or for entering data on the screen. Linked to screen fields.
Dropdown list boxes
Special input/output fields that allow users to choose one entry from a fixed list of possible entries.
Checkbox elements
Special input/output fields that the user can either select (value X) or deselect (value SPACE). Checkbox elements can be linked with function codes.
Radio button elements
Special input/output fields that are combined into groups. Within a radio button group, only a single button can be selected at any one time. When the user selects one button, all of the others are automatically deselected. Radio button elements can be linked with function codes.
Pushbuttons
Elements on the screen that trigger the PAI event of the screen flow logic when chosen by the user. There is a function code attached to each pushbutton, which is passed to the ABAP program when it is chosen.
Frame
Pure display elements that group together elements on the screen, such as radio button groups.
Subscreens
Area on the screen in which you can place another screen.
Table controls
Tabular input/output fields.
Tab strip controls
Areas on the screen in which you can switch between various pages.
Custom Controls
Areas on the screen in which you can display controls. Controls are software components of the presentation server.
Status icons
Display elements, indicating the status of the application program.
OK field
Every screen has a twenty-character OK_CODE field (also known as the function code field) that is not displayed directly on the screen. User actions that trigger the PAI event also place the corresponding function code into this field, from where it is passed to the ABAP program. You can also use the command field in the standard toolbar to enter the OK field. To be able to use the OK field, you need to assign a name to it.
All screen elements have a set of attributes, some of which are set automatically, others of which have to be specified in the Screen Painter. They determine things such as the layout of the screen elements on the screen. You can set the attributes of screen elements in the Screen Painter - either for a single element, or using the element list, which lists all of the elements belonging to the current screen. Some of the attributes that you set statically in the Screen Painter can be overwritten dynamically in the ABAP program.
3) GUI STATUS
Each screen has a GUI status. This controls the menu bars, standard toolbar, and application toolbar, with which the user can choose functions in the application. Like screens, GUI statuses are independent components of an ABAP program. You create them in the ABAP Workbench using the Menu Painter.
4) PROGRAM
Each dynpro refers to exactly one ABAP/4 dialog program. Such a dialog program is also called a module pool, since it consists of interactive modules. Each screen and GUI status in the R/3 System belongs to one ABAP program. The ABAP program contains the dialog modules that are called by the screen flow logic, and also process the user input from the GUI status. ABAP programs that use screens are also known as dialog programs.
In a module pool (type M program); the first processing block to be called is always a dialog module. However, you can also use screens in other ABAP programs, such as executable programs or function modules. The first processing block is then called differently; for example, by the runtime environment or a procedure call. The screen sequence is then started using the CALL SCREEN statement.
DATA TRANSFER BETWEEN SCREEN AND ABAP PROGRAM
During PAI, the system automatically transports all screen fields to identically named global ABAP program fields. At the end of the last PBO module, and before the screen is displayed, all of the data is transported from the ABAP program to any identically named fields in the screen. By standard, all screen data is transported immediately before PAI processing starts. But for the dedicated handling of screen fields for example, to carry out an error dialog you can control the moment at which data is passed from screen fields to their corresponding ABAP fields by using the FIELD statement in the screen flow logic.
regards
navjot
reward points if helpfull -
Hi,
I am developing a module pool, i have to update the transaction through my module pool, so i am using call transaction method . first i have written the perform with recording steps .. but when i tried to activate the main program i am getting an error saying that
Include ZMPPMTR_INCL
Incorrect nesting: Before the statement "FORM", the structure
introduced by "IF" must be concluded with "ENDIF". .
but in my program there is no if ..endif statement , why i am getting this error can any one giv me a solution for this?
waiting for ur reply...
Regards
Srinathhi,
in module pool the mail program contains top include and possibly other includes along with screen,
so save all the components of the main program and come to main program and then activate then the system recognizes all the components and activates accordingly.
try the following
use pretty printer to show the indentations.
double click on the error message it will take you to where the error occured.
try to find the if or endif or form or endform.
hope this will serve your purpose.
Thanks and regards
Ramchander Rao.Krish -
Dialog/Module pool programming
Can anyone give me a link where i can find some useful data related to dialog/module pool programming.
Hi Jyotirmaye,
Please take a look at this link.
http://sap.mis.cmich.edu/sap-abap/abap09/
Hope this will help.
Regards,
Ferry Lianto -
Dialog programming and module-pool programming
Can someone tell em the difference between <b>dialog programming and module-pool programming</b> ?
Hi Vinod ,
Actually Dialog Programming is Module pool Programming.
Please go thru this , see if your dbout gets clear.
Basic components of dialog program?
- Screens (Dynpros)
- Each dialog in an SAP system is controlled by dynpros.A dynpros consists of a screen
And its flow logic and controls exactly one dialog step.
- ABAP/4 module Pool.
Each dynpro refers to exactly one ABAP/4 dialog program .Such a dialog program is also called a module pool ,since it consists of interactive modules.
Regards,
AShwini -
Difference between dialog programming and module pool programming
Hi all ,
Is there any differnce between module pool programming and dialog programming .
thanks in advance ,
magesh anandanMahesh,
Both are same.
MODULE POOL : Through modules only we have access ABAP EDITOR
from FLOW LOGIC EDITOR .
DIALOG PROGRAMING : We use to have dialogs(Screen process) to interact
with user .
Pls. reward if useful -
Dialog Programming(module pool):call a screen to subscreen area.
Hi experts,
I want to call a screen created in the function group into my
subscreen area of current screen of main program.
I have done the below way :
1. Created a screen 100 in the module pool program z_bpmodule.
2.created a subscreen area SUB in screen 100.
3. I hav created function group :zfungroup
and a screen 300,a function module Z_EXPORT_FUN for exporting the data to the screen 300 from report.
Now my prog is lik below :
PROGRAM Z_SUBSCREEN1.
DATA : ZMATNR LIKE MARA-MATNR.
DATA : DYNNR LIKE SY-DYNNR .
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'TITLE'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module EXPORT_DATA OUTPUT
text
MODULE EXPORT_DATA OUTPUT.
CALL FUNCTION 'Z_EXPORT_FUN'
EXPORTING Z_INPUT = ZMATNR.
ENDMODULE. " EXPORT_DATA OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'EXP'.
DYNNR = '0300'.
*ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
and the flow logic is lik this :
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
MODULE EXPORT_DATA.
CALL SUBSCREEN SUB INCLUDING SY-REPID ' 0300'.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
CALL SUBSCREEN SUB.
Now the main problem is i am not able to call the screen from function group to subscreen area...
kindly provide the solution.....
Thanks a lot in adv ....
Brahma.I am just getting the main screen and the subscreen is not at all displaying .....
but when i perform the PAI .. I am getting the dump ..
Short text
Dynpro does not exist
What happened?
Error in the ABAP Application Program
The current ABAP program "Z_SUBSCREEN1" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
The system attempted to use dynpro 0000 in program "Z_TX1".
This dynpro does not exist.
How to correct the error
Probably the only way to eliminate the error is to correct the program.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"DYNPRO_NOT_FOUND" " "
"Z_SUBSCREEN1" or "Z_SUBSCREEN1"
"EXPORT_DATA"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
hope i have given the full information.
Thanks a lot. -
How to execute module pool (Dialog programs)
hai gurus,
i have created one module pool prm using se38,
and using se51 i had design two push buttons in Layout.
and the PAI flow logic i have written the code like ...
CASE : SY-UCOMM.
WHEN 'DISP'.
MESSAGE I001 WITH 'DISPLAY BUTTON PRESSED'.
WHEN 'EXIT'.
MESSAGE I002 WITH 'EXIT BUTTON PRESSED'.
LEAVE PROGRAM.
ENDCASE.
as the same code will work for executable program and this is not working Module Pool program why .
and How can i execute with the use of module pool program
please help mehi
good
go through these links which ll give you complete idea about the module pool programmin and the relation between module pool programming and ABAP.
http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
reward point if helpful.
thanks
mrutyun^ -
How to create Long Text in Module Pool Program
Hi all,
I want to develop a new module pool program and I want to use Long text screen in this program and also want this text will store in table.I never develop such type of module pool before.This long text will like sales order long text.Please let me know the steps how I can develop such type of program and how I save long text huge data in table.
Thanks & Regards
NirmalHai ,
here you have to use custom control, for this
DATA: line(256) TYPE c,
text_tab LIKE STANDARD TABLE OF line,
field LIKE line.
1) Create custom control in your screen
2) CREATE OBJECT: container EXPORTING container_name = 'TEXTEDIT', "--> (this is custom control name in screen)
editor EXPORTING parent = container.
3) CALL METHOD editor->get_text_as_stream "This method reads data from custom control , inserts into itab 'text_tab'
IMPORTING
text = text_tab. "
READ TABLE text_tab INTO line INDEX 1. read the text into wa 'line'
if you want more clarity , see 'ABAPDOCU' >ABAP USER DIALOGS> COMPLEXSCREEN ELEMENTS--> DEMO CUSTOM_CONTROL -
'how to code for table control wizard in module pool program
Hi Gurus,
Please provide me a sample code of table control wizard...
Thanks in advance!!!!
Regards,
KranthiHi Kranti,
check this code... it should be helpful
*& Module pool Z_TABLE_CONTROL_WIZARD_DEMO *
PROGRAM z_table_control_wizard_demo .
DATA: BEGIN OF lt_vbak OCCURS 0,
flag TYPE c,
vbeln TYPE vbeln_va,
netwr TYPE netwr,
kunnr TYPE kunnr,
END OF lt_vbak.
DATA: sfkunnr TYPE kunnr.
*&spwizard: declaration of tablecontrol 'TCONTROL' itself
CONTROLS: tcontrol TYPE TABLEVIEW USING SCREEN 9000.
*&spwizard: lines of tablecontrol 'TCONTROL'
DATA: g_tcontrol_lines LIKE sy-loopc.
DATA: ok_code LIKE sy-ucomm.
*&spwizard: output module for tc 'TCONTROL'. do not change this line!
*&spwizard: update lines for equivalent scrollbar
MODULE tcontrol_change_tc_attr OUTPUT.
DESCRIBE TABLE lt_vbak LINES tcontrol-lines.
ENDMODULE. "TCONTROL_change_tc_attr OUTPUT
*&spwizard: output module for tc 'TCONTROL'. do not change this line!
*&spwizard: get lines of tablecontrol
MODULE tcontrol_get_lines OUTPUT.
g_tcontrol_lines = sy-loopc.
ENDMODULE. "TCONTROL_get_lines OUTPUT
*&spwizard: input module for tc 'TCONTROL'. do not change this line!
*&spwizard: modify table
MODULE tcontrol_modify INPUT.
MODIFY lt_vbak
INDEX tcontrol-current_line.
ENDMODULE. "TCONTROL_modify INPUT
*&spwizard: input modul for tc 'TCONTROL'. do not change this line!
*&spwizard: mark table
MODULE tcontrol_mark INPUT.
DATA: g_tcontrol_wa2 LIKE LINE OF lt_vbak.
IF tcontrol-line_sel_mode = 1.
LOOP AT lt_vbak INTO g_tcontrol_wa2
WHERE flag = 'X'.
g_tcontrol_wa2-flag = ''.
MODIFY lt_vbak
FROM g_tcontrol_wa2
TRANSPORTING flag.
ENDLOOP.
ENDIF.
MODIFY lt_vbak
INDEX tcontrol-current_line
TRANSPORTING flag.
ENDMODULE. "TCONTROL_mark INPUT
*&spwizard: input module for tc 'TCONTROL'. do not change this line!
*&spwizard: process user command
MODULE tcontrol_user_command INPUT.
ok_code = sy-ucomm.
PERFORM user_ok_tc USING 'TCONTROL'
'LT_VBAK'
'FLAG'
CHANGING ok_code.
sy-ucomm = ok_code.
ENDMODULE. "TCONTROL_user_command INPUT
* INCLUDE TABLECONTROL_FORMS *
*& Form USER_OK_TC *
FORM user_ok_tc USING p_tc_name TYPE dynfnam
p_table_name
p_mark_name
CHANGING p_ok LIKE sy-ucomm.
*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
DATA: l_ok TYPE sy-ucomm,
l_offset TYPE i.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*
*&SPWIZARD: Table control specific operations *
*&SPWIZARD: evaluate TC name and operations *
SEARCH p_ok FOR p_tc_name.
IF sy-subrc <> 0.
EXIT.
ENDIF.
l_offset = STRLEN( p_tc_name ) + 1.
l_ok = p_ok+l_offset.
*&SPWIZARD: execute general and TC specific operations *
CASE l_ok.
WHEN 'INSR'. "insert row
PERFORM fcode_insert_row USING p_tc_name
p_table_name.
CLEAR p_ok.
WHEN 'DELE'. "delete row
PERFORM fcode_delete_row USING p_tc_name
p_table_name
p_mark_name.
CLEAR p_ok.
WHEN 'P--' OR "top of list
'P-' OR "previous page
'P+' OR "next page
'P++'. "bottom of list
PERFORM compute_scrolling_in_tc USING p_tc_name
l_ok.
CLEAR p_ok.
* WHEN 'L--'. "total left
* PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
* WHEN 'L-'. "column left
* PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
* WHEN 'R+'. "column right
* PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
* WHEN 'R++'. "total right
* PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
WHEN 'MARK'. "mark all filled lines
PERFORM fcode_tc_mark_lines USING p_tc_name
p_table_name
p_mark_name .
CLEAR p_ok.
WHEN 'DMRK'. "demark all filled lines
PERFORM fcode_tc_demark_lines USING p_tc_name
p_table_name
p_mark_name .
CLEAR p_ok.
* WHEN 'SASCEND' OR
* 'SDESCEND'. "sort column
* PERFORM FCODE_SORT_TC USING P_TC_NAME
* l_ok.
ENDCASE.
ENDFORM. " USER_OK_TC
*& Form FCODE_INSERT_ROW *
FORM fcode_insert_row
USING p_tc_name TYPE dynfnam
p_table_name .
*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
DATA l_lines_name LIKE feld-name.
DATA l_selline LIKE sy-stepl.
DATA l_lastline TYPE i.
DATA l_line TYPE i.
DATA l_table_name LIKE feld-name.
FIELD-SYMBOLS <tc> TYPE cxtab_control.
FIELD-SYMBOLS <table> TYPE STANDARD TABLE.
FIELD-SYMBOLS <lines> TYPE i.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*
ASSIGN (p_tc_name) TO <tc>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE p_table_name '[]' INTO l_table_name. "table body
ASSIGN (l_table_name) TO <table>. "not headerline
*&SPWIZARD: get looplines of TableControl *
CONCATENATE 'G_' p_tc_name '_LINES' INTO l_lines_name.
ASSIGN (l_lines_name) TO <lines>.
*&SPWIZARD: get current line *
GET CURSOR LINE l_selline.
IF sy-subrc <> 0. " append line to table
l_selline = <tc>-lines + 1.
*&SPWIZARD: set top line *
IF l_selline > <lines>.
<tc>-top_line = l_selline - <lines> + 1 .
ELSE.
<tc>-top_line = 1.
ENDIF.
ELSE. " insert line into table
l_selline = <tc>-top_line + l_selline - 1.
l_lastline = <tc>-top_line + <lines> - 1.
ENDIF.
*&SPWIZARD: set new cursor line *
l_line = l_selline - <tc>-top_line + 1.
*&SPWIZARD: insert initial line *
INSERT INITIAL LINE INTO <table> INDEX l_selline.
<tc>-lines = <tc>-lines + 1.
*&SPWIZARD: set cursor *
SET CURSOR LINE l_line.
ENDFORM. " FCODE_INSERT_ROW
*& Form FCODE_DELETE_ROW *
FORM fcode_delete_row
USING p_tc_name TYPE dynfnam
p_table_name
p_mark_name .
*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
DATA l_table_name LIKE feld-name.
FIELD-SYMBOLS <tc> TYPE cxtab_control.
FIELD-SYMBOLS <table> TYPE STANDARD TABLE.
FIELD-SYMBOLS <wa>.
FIELD-SYMBOLS <mark_field>.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*
ASSIGN (p_tc_name) TO <tc>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE p_table_name '[]' INTO l_table_name. "table body
ASSIGN (l_table_name) TO <table>. "not headerline
*&SPWIZARD: delete marked lines *
DESCRIBE TABLE <table> LINES <tc>-lines.
LOOP AT <table> ASSIGNING <wa>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
IF <mark_field> = 'X'.
DELETE <table> INDEX syst-tabix.
IF sy-subrc = 0.
<tc>-lines = <tc>-lines - 1.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " FCODE_DELETE_ROW
*& Form COMPUTE_SCROLLING_IN_TC
* text
* -->P_TC_NAME name of tablecontrol
* -->P_OK ok code
FORM compute_scrolling_in_tc USING p_tc_name
p_ok.
*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
DATA l_tc_new_top_line TYPE i.
DATA l_tc_name LIKE feld-name.
DATA l_tc_lines_name LIKE feld-name.
DATA l_tc_field_name LIKE feld-name.
FIELD-SYMBOLS <tc> TYPE cxtab_control.
FIELD-SYMBOLS <lines> TYPE i.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*
ASSIGN (p_tc_name) TO <tc>.
*&SPWIZARD: get looplines of TableControl *
CONCATENATE 'G_' p_tc_name '_LINES' INTO l_tc_lines_name.
ASSIGN (l_tc_lines_name) TO <lines>.
*&SPWIZARD: is no line filled? *
IF <tc>-lines = 0.
*&SPWIZARD: yes, ... *
l_tc_new_top_line = 1.
ELSE.
*&SPWIZARD: no, ... *
CALL FUNCTION 'SCROLLING_IN_TABLE'
EXPORTING
entry_act = <tc>-top_line
entry_from = 1
entry_to = <tc>-lines
last_page_full = 'X'
loops = <lines>
ok_code = p_ok
overlapping = 'X'
IMPORTING
entry_new = l_tc_new_top_line
EXCEPTIONS
* NO_ENTRY_OR_PAGE_ACT = 01
* NO_ENTRY_TO = 02
* NO_OK_CODE_OR_PAGE_GO = 03
OTHERS = 0.
ENDIF.
*&SPWIZARD: get actual tc and column *
GET CURSOR FIELD l_tc_field_name
AREA l_tc_name.
IF syst-subrc = 0.
IF l_tc_name = p_tc_name.
*&SPWIZARD: et actual column *
SET CURSOR FIELD l_tc_field_name LINE 1.
ENDIF.
ENDIF.
*&SPWIZARD: set the new top line *
<tc>-top_line = l_tc_new_top_line.
ENDFORM. " COMPUTE_SCROLLING_IN_TC
*& Form FCODE_TC_MARK_LINES
* marks all TableControl lines
* -->P_TC_NAME name of tablecontrol
FORM fcode_tc_mark_lines USING p_tc_name
p_table_name
p_mark_name.
*&SPWIZARD: EGIN OF LOCAL DATA-----------------------------------------*
DATA l_table_name LIKE feld-name.
FIELD-SYMBOLS <tc> TYPE cxtab_control.
FIELD-SYMBOLS <table> TYPE STANDARD TABLE.
FIELD-SYMBOLS <wa>.
FIELD-SYMBOLS <mark_field>.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*
ASSIGN (p_tc_name) TO <tc>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE p_table_name '[]' INTO l_table_name. "table body
ASSIGN (l_table_name) TO <table>. "not headerline
*&SPWIZARD: mark all filled lines *
LOOP AT <table> ASSIGNING <wa>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
<mark_field> = 'X'.
ENDLOOP.
ENDFORM. "fcode_tc_mark_lines
*& Form FCODE_TC_DEMARK_LINES
* demarks all TableControl lines
* -->P_TC_NAME name of tablecontrol
FORM fcode_tc_demark_lines USING p_tc_name
p_table_name
p_mark_name .
*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
DATA l_table_name LIKE feld-name.
FIELD-SYMBOLS <tc> TYPE cxtab_control.
FIELD-SYMBOLS <table> TYPE STANDARD TABLE.
FIELD-SYMBOLS <wa>.
FIELD-SYMBOLS <mark_field>.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*
ASSIGN (p_tc_name) TO <tc>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE p_table_name '[]' INTO l_table_name. "table body
ASSIGN (l_table_name) TO <table>. "not headerline
*&SPWIZARD: demark all filled lines *
LOOP AT <table> ASSIGNING <wa>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
<mark_field> = space.
ENDLOOP.
ENDFORM. "fcode_tc_mark_lines
*& Module STATUS_9000 OUTPUT
* text
MODULE status_9000 OUTPUT.
SET PF-STATUS 'S9000'.
SET TITLEBAR 'T9000'.
ENDMODULE. " STATUS_9000 OUTPUT
*& Module USER_COMMAND_9000 INPUT
* text
MODULE user_command_9000 INPUT.
CASE sy-ucomm.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
LEAVE TO SCREEN 0.
WHEN 'DISP'.
SELECT vbeln netwr kunnr INTO CORRESPONDING FIELDS OF TABLE lt_vbak
FROM vbak
WHERE kunnr = sfkunnr.
* LEAVE TO LIST-PROCESSING [AND RETURN TO SCREEN <nnnn>].
* By default, the dialog processor returns to the PBO processing of
* the screen from which the list processor was called. The optional
* addition AND RETURN TO SCREEN allows you to specify a different
* screen in the current screen sequence at whose PBO event you want
* to resume processing.
when 'LIST'.
LEAVE TO LIST-PROCESSING.
WRITE:/ 'Time :', SY-UZEIT.
LOOP AT LT_VBAK.
WRITE:/ LT_VBAK-VBELN,
LT_VBAK-NETWR,
LT_VBAK-KUNNR.
ENDLOOP.
WHEN 'SUBM'.
*& You can call executable programs from other ABAP programs using the
*& following statement:
*& SUBMIT <rep>|(<field>) [AND RETURN] [<options>].
SUBMIT z_submit_report VIA SELECTION-SCREEN AND RETURN.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
TABLE CONTROL WIZARD SE51 CODE
PROCESS BEFORE OUTPUT.
*&spwizard: pbo flow logic for tablecontrol 'TCONTROL'
module TCONTROL_change_tc_attr.
*&spwizard: module TCONTROL_change_col_attr.
loop at LT_VBAK
with control TCONTROL
cursor TCONTROL-current_line.
module TCONTROL_get_lines.
*&spwizard: module TCONTROL_change_field_attr
endloop.
MODULE STATUS_9000.
PROCESS AFTER INPUT.
*&spwizard: pai flow logic for tablecontrol 'TCONTROL'
loop at LT_VBAK.
chain.
field LT_VBAK-VBELN.
field LT_VBAK-NETWR.
field LT_VBAK-KUNNR.
module TCONTROL_modify on chain-request.
endchain.
field LT_VBAK-FLAG
module TCONTROL_mark on request.
endloop.
module TCONTROL_user_command.
*&spwizard: module TCONTROL_change_tc_attr.
*&spwizard: module TCONTROL_change_col_attr.
MODULE USER_COMMAND_9000.
regards
padma -
In module pool program - i want to control size of screen.
Hi,
In module pool program , I am handling 2 screen . while calling the 2 nd screen , i want to display the window size as i required.
Plz help me.
Regards,
Rani.Hi,
Specify the positions as
CALL SCREEN dynnr
[STARTING AT col1 lin1
[ENDING AT col2 lin2]].
By default, the screens of all dynpros of the called dynpro sequence are displayed in the current window. Use addition STARTING AT to open a modal dialog window.
Addition
... STARTING AT col1 lin1 [ENDING AT col2 lin2]
Effect
Use addition STARTING AT to open a new popup level and to display all screens of the called dynpro sequence in a modal dialog window. The upper left corner of the dialog window is determined by the values col1 and lin1 for column and line. The values refer to the window with popup level 0. The lower right corner is set automatically or you can use col2 and lin2 to specify it after ENDING AT. For col1, lin1, col2 and lin2, data objects of type i are expected. The values of col1, lin1 should be smaller than those of col2, lin2, because otherwise the behavior is undefined. The maximum popup level is 9.
Pls reward points if solved your issue.
Regards,
Renjith Michael.
Maybe you are looking for
-
After updating my iPhone 5 to iOS 8.1 it will not connect to the wifi network at work even though it recognizes it. It however still automatically connects to the network at home (this is the network I used to update the phone). My iPad however does
-
i am trying to learn how to use imove. i have video clips on my ipad 1 that i would like to move to imovie on my Mac OSX.. How should i go about that?
-
How do I get photos from my iphoto library to my "Pictures" folder?
How do I get photos from my iphoto library to my "Pictures" folder?
-
Removing Existing Headers & Footers?
How do I remove existing headers and footers that were created in Adobe Acrobat at 9.5.4 in a PDF document and I keep getting the message: "Acrobat cannot find any headers or footers in this file. If you see header or footer information, it was not
-
The pop-up menu for changing the size of attachments at the bottom right hand corner of a new message is missing. How do I get that pop-up menu back?