‎2006 Dec 12 4:29 AM
Hi Friends,
Can anyone give me the idea for creating module pool using 3 to 4 database tables.
‎2006 Dec 12 4:30 AM
transaction ABAPDOCU gives u good examples on module pool programming
Regards
- Gopi
‎2006 Dec 12 4:31 AM
hi,
chek these module pool tutorial links.
http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
http://www.allsaplinks.com/dialog_programming.html
http://www.sapbrain.com/TUTORIALS/default.html
http://www.sappoint.com/abap/spmp.pdf
http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
Rgds
Anver
‎2006 Dec 12 4:43 AM
hi..
Module pool program is nothing but all the programs related to screens.
Try out these steps..
1. go to se80(object navigator).
2. you can create a program there and then create a transaction code for that module pool program by right clicking on the program name.
3.now create a screen.
4.go to the layout.
5. click on the icon " dictionary and program fields" or instead press F6.
6.you will get a screen "screen painter : dict/ program fields".
7.enter the table name eg. mara and click on the "get from dict" tab.
8. you will get all the fields in the table.
9. select the fields you want.
10. now place this in your layout.
hope this helps you.
‎2006 Dec 12 4:52 AM
a module pool program can be ceated using <u><i><b>se 80 - object avigator.</b></i></u>
select program in the drop-down box..
enter a program name and press enter key...
right click on the program name (object name)
save the object in ur own package...
u can also create include callled TOPinclude- to globalise all the data used in the program...
choose create ---> choose SCREENS ..
goto layout and set the layout of the screen...
use screen PBO - Process before output modules...
(PBO occurs before user interaction)
and PAI - Process after input modules for module pool programming..
(PAI occurs after user interaction)
double click on modules..
declare structures for using different internal tables and work areas for different database tables .
let us have a a structure called struct_tables
having fields from VBAK and KNA1 such as NAME1, STRAS, ORT01, PSTLZ,
TELF1 BY INNER JOINING VBAK AND KNA1 TABLES BASED UPON KUNNR AS KEY FIELD AND HAVING SALES DOCUMENT NUMBER 'VBELN' AS INPUT BY THE USER .
statement :
SELECT NAME1
STRAS
ORT01
PSTLZ
TELF1
VBELN
KUNNR
FROM VBAK INNER JOIN KNA1 ON
VBAKKUNNR = KNA1KUNNR .
and then u can also write the sselected fields in a table control wizard...
thus u can perform module pool programming using 3-4 database tables.
‎2006 Dec 12 5:02 AM
Hi rangith;
create a moduole pool program using se38.
goto to the screen painter se51 and create screen for the same program .
after creating a screen go to the layout and PRESS F6 OR CLICK ON THE ICON (PROGRAM OR DICTIONARY ATTRIBUTES ). If u want to add the fields from the database table , write the transparent table name and click get from dictionary.
If u have created a structure in the program and created an internal table for that structure u need field , write an internal table and click get from the program
with regards.
prince elvis
‎2006 Dec 12 6:50 AM
Thanks for your kind response. If i have to take data from BSEG and BKPF tables then what should be done. Because we cannot create a structure using BSEG and BKPF.
‎2006 Dec 12 8:52 AM
Hi Ranjith,
In ur case u can try developing a structure of the fields u want and declare a internal table and work area for the structure and now u can retrive data from BSEG or the other table u mentioned..i have attached a simple data retrival code from bseg table u can change the structure and query to get desired result..
TYPES : begin of types,
bukrs type bseg-bukrs,
belnr type bseg-belnr,
GJAHR type bseg-gjahr,
BUZEI type bseg-buzei,
end of types.
data : it type table of types,
wa type types.
select
bukrs belnr gjahr
from bseg
into table it
where gjahr = '2003' .
if sy-subrc eq 0.
loop at it into wa.
write : / wa-bukrs , wa-belnr , wa-gjahr .
endloop.
endif.
hope it would have resolved ur issue..
regards,
Rajkumar.G