06-27-2007 11:05 AM
Hi experts,
I have to work on a new project which involves module pool programs. Can you please guide me what it is and provide an example module pool program. Please reply immediately.
With Regards
Emran Ali.
06-27-2007 11:07 AM
Hi,
give demodynpro in se38.. u ll find a lot of demo dynpro programs.. that s the best way to learn module pool programming..
Regards,
Aparna
06-27-2007 11:11 AM
Please see sample standard SAP Programs in T.Code SE80.
SAPBC_GLOBAL_SFLIGHT_CREATE SFLIGHT - Create table entry
SAPBC_GLOBAL_SFLIGHT_DISPLAY SFLIGHT - Display table entry
SAPBC_GLOBAL_SFLIGHT_EDIT SFLIGHT - Change table entry
06-27-2007 11:13 AM
hi,
chk these links........
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCDWBTUT/BCDWBTUT.pdf
http://help.sap.com/saphelp_40b/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/applet.htm
http://www.allsaplinks.com/dialog_programming.html
http://sap.mis.cmich.edu/sap-abap/abap09/
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://www.allsaplinks.com/files/using_table_in_screen.pdf
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
ttp://www.sapgenie.com/abap/example_code.htm
http://help.sap.com/saphelp_47x200/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm
http://www.allsaplinks.com/dialog_programming.html
http://sap.ittoolbox.com/code/archives.asp?i=10&t=450&a=t
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://www.allsaplinks.com/dialog_programming.html
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
regards,
priya.
06-27-2007 11:15 AM
Hi,
Module pool programming is a series of screens designed for some special purpose. This is different from excutable programs which displays reports on execution. Lets take a simple scenerio where we need to create a module pool program.
A simple case can be a MM01 transaction, the transaction for creation of materials .This transaction is nothing but a series of different screens when the user need to fill vareious informations needed for creating a material . and finally these screens are linked to a main program and then the screens are handled acccordingly . I think the above scenerio is very simple to understand whats the purpose of a module pool program.
Other example can be creating an employee database , where you d't want to fill all the data in the same screen and then according to the user actions you want to perform some operations( like saving the data to the DB or changing some existing information etc. ) then you can approach for creating a transaction or module pool programs.
The basic idea is that when you want to provide many facilities to the user for interacting with the screen and if you want the data processing( saving to the DB like that ) to be according to the user action then you can approach dialog programming .
Hope the information provided helps.
Regards,
Kate
06-27-2007 12:03 PM
Hi emraan
Module pool is like a screen designing and doing coding same as lika a real screen in SAP screen.
For example:
Consider a ME41 Transaction, this is for creating Request for Quatation.
lets take first screen.
Go to SE80 or SE38
create one module pool program, create screen and create screen design in layout.Before you have create custom table.
Sample codings:
In flow logic two modules will be there
1.PAI(PROCESS AFTER INPUT).
PAI is input, it contains action when u giving input in o/p screen.
2.PBO (PROCESS BEFORE OUTPUT).
PBO is Output it contains actions when u executing .here u have to give PF Stauts.
PAI code:
DATA : OK_CODE TYPE SY-UCOMM,
VALUE TYPE I VALUE 0,
RFQ LIKE ZSEN_ME41-RFQ,
RFQTYPE LIKE ZSEN_ME41-RFQTYPE,
LANKEY LIKE ZSEN_ME41-LANKEY,
RFQDATE LIKE ZSEN_ME41-RFQDATE,
QDEADLINE LIKE ZSEN_ME41-QDEADLINE,
PURORG LIKE ZSEN_ME41-PURORG,
PURGRP LIKE ZSEN_ME41-PURGRP.
&----
*& Module USER_COMMAND_1000 INPUT
&----
text
----
MODULE USER_COMMAND_1000 INPUT.
IF OK_CODE = 'SAVE'.
IF SY-DATUM <= ZSEN_ME41-RFQDATE AND ZSEN_ME41-RFQDATE <=
ZSEN_ME41-QDEADLINE.
CALL SCREEN 1001.
ENDIF.
IF SY-DATUM > ZSEN_ME41-RFQDATE.
MESSAGE W000(00) WITH 'RFQ DATE IS PAST'.
CLEAR ZSEN_ME41-RFQDATE.
ENDIF.
IF ZSEN_ME41-RFQDATE > ZSEN_ME41-QDEADLINE.
MESSAGE W000(00) WITH 'QDEADLINE SHOULD BE GREATER THAN RFQDATE'.
CLEAR ZSEN_ME41-QDEADLINE.
CLEAR ZSEN_ME41-RFQDATE.
ENDIF.
INSERT ZSEN_ME41.
ENDIF.
CASE OK_CODE.
WHEN 'BACK'.
LEAVE SCREEN.
WHEN 'EXIT'.
LEAVE SCREEN.
ENDCASE.
ENDMODULE. " USER_COMMAND_1000 INPUT
PBO code:
MODULE STATUS_1000 OUTPUT.
SET PF-STATUS 'RFQ'.
SET TITLEBAR 'ME41'.
ZSEN_ME41-RFQTYPE = 'AN'.
ZSEN_ME41-LANKEY = 'EN'.
ZSEN_ME41-RFQDATE = SY-DATUM.
ENDMODULE. " STATUS_1000 OUTPUT
If it is useful reward the points for me.
Thanks
senthil