Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Module Pool Program

Former Member
0 Kudos

Hi to the entire network of SAP - ABAP er's

I am Harini and very new to SAP - ABAP environment , earlier i was working with software testing.

now i have shifted my domain to SAP - ABAP , i request the team to help me out in writing a module pool program.

my requirement is to create a module pool program ,if any of the group members have the step by step process to create , kindly pass the material.

Advance thanks .

Harini

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Check the transaction code ABAPDOCU for simple MODULE POOL programs with documentation..

THanks,

Naren

18 REPLIES 18

Former Member
0 Kudos

Hi,

Check the transaction code ABAPDOCU for simple MODULE POOL programs with documentation..

THanks,

Naren

Former Member
0 Kudos

hi,

WELCOME TO SDN ..

Regards,

Santosh

Former Member
0 Kudos

Welcome to SDN Forum.

Check the below link:

http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F

http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm

http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm

http://sap.mis.cmich.edu/sap-abap/abap09/index.htm

You can also check the transaction <b>ABAPDOCU</b> which gives you lot of sample programs.

Regards

Prakash.<b></b>

Message was edited by: Prakash Ramu

Former Member
0 Kudos

hi Harini,

Welcome to SDN.

Foll the steps below:

1.Goto Tcode se80

2.Give a title and in Attributes- Type select Module pool (3rd option)

3.To run a module pool, u have to create a transaction.

4. To create a tcode, press "Display Object List" icon in the toolbar.

5.Select a Object name and right click it, goto Creat->Transaction.

Thats it.

For examples

se38->Environment->examples->abap Examples->BC abap Programming->ABAP user Dialog->Screens->Processing Screens.

Check out the link

http://www.allsaplinks.com/dialog_programming.html

http://sap.mis.cmich.edu/sap-abap/abap09/

http://www.sapdevelopment.co.uk/dialog/dialoghome.htm

http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm

http://sap.mis.cmich.edu/abap-00/

http://www.allsaplinks.com/files/using_table_in_screen.pdf

http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm

http://www.sapgenie.com/links/abap.htm

Regards,

Richa

Former Member
0 Kudos

Hi,

check ABAPDOCU transaction for sample programs

regards

Amole

Former Member
0 Kudos

hi,

In SE38, type DEMODYNPRO and press F4, you get the list of sample module pool programs.

Regards,

Sailaja.

Former Member
0 Kudos

Hello,

Email ID please,

Regs,

Venkat

0 Kudos

Hi

Venkat, Can you please send some real business scenarios regarding module pool. I need to practice on that. My mail id is biswa.system@gmail.com.

Look forward to hearing from you.

Thanks and regards

Biswa

Former Member
0 Kudos

HI Harini,

See the below link, it is a PDF file and having step by step Module pool Progaram Documentaion ..copy and paste the below link ..

http://www.sappoint.com/abap/dptc1.pdf

http://www.sappoint.com/abap/spmp.pdf

mark all the helpful answers

Regards

Sudheer

Former Member
0 Kudos

Hello,

http://sap.mis.cmich.edu/sap-abap/abap09/index.htm

Gimme your emailID will FWD u a good document.

Regs,

Venkat

0 Kudos

my id is abap.harini@gmail.com

warm regards

harini

0 Kudos

Hi Harini,

Document Sent. Check ur mail.

Regards,

Senthil

0 Kudos

Please forward Module pool document to my mail id...

devesh_mail@yahoo.com

Thanks & Regards,

Devesh

Former Member
0 Kudos

Hi Harini

can you please send the same documents to my email id also

PRATYUSHA_CUTE@YAHOO.COM

Former Member
0 Kudos

Hi Harini,

Check this code and links.

&----


*& Report ZRAJ_TAB

*&

&----


*&

*&

&----


REPORT ZRAJ_TAB.

tables: vbak,vbap.

controls: mytab type tabstrip ,

tc type tableview using screen 101,

tc1 type tableview using screen 102.

*&SPWIZARD: FUNCTION CODES FOR TABSTRIP 'MY_TABSTRIP'

CONSTANTS: BEGIN OF C_MY_TABSTRIP,

TAB1 LIKE SY-UCOMM VALUE 'PUSH1',

TAB2 LIKE SY-UCOMM VALUE 'PUSH2',

END OF C_MY_TABSTRIP.

DATA: BEGIN OF G_MY_TABSTRIP,

SUBSCREEN LIKE SY-DYNNR,

PROG LIKE SY-REPID VALUE 'ZKEERTHI_TAB',

PRESSED_TAB LIKE SY-UCOMM VALUE C_MY_TABSTRIP-TAB1,

END OF G_MY_TABSTRIP.

DATA: OK_CODE LIKE SY-UCOMM,

v_dynnr like sy-dynnr.

data clicked_line type i.

DATA: SEL TYPE C.

*

*data: begin of it_vbak occurs 0,

  • vbeln like vbak-vbeln,

  • erdat like vbak-erdat,

  • ernam like vbak-ernam,

  • auart like vbak-auart,

  • netwr like vbak-netwr,

  • end of it_vbak.

data: it_vbak like vbak occurs 0 with header line.

types: s_vbak type vbak.

data: begin of it_vbak1 occurs 0,

CHK TYPE C.

include structure vbak.

data: end of it_vbak1.

data: wa_vbak type vbak .

*

*data: begin of it_vbap occurs 0,

  • vbeln like vbap-vbeln,

  • posnr like vbap-posnr,

  • arktx like vbap-arktx,

  • pstyv like vbap-pstyv,

  • CHK TYPE C,

  • end of it_vbap.

data: it_vbap like vbap occurs 0 with header line.

selection-screen begin of block B1 with frame.

parameters: p_vbeln like vbap-vbeln.

selection-screen end of block B1.

start-of-selection.

select * from vbak into corresponding fields of table it_vbak

where vbeln = p_vbeln.

select * from vbap into corresponding fields of table it_vbap

where vbeln = p_vbeln.

end-of-selection.

call screen 100.

&----


*& Module MY_TABSTRIP_ACTIVE_TAB_SET OUTPUT

&----


  • text

----


MODULE MY_TABSTRIP_ACTIVE_TAB_SET OUTPUT.

MYTAB-ACTIVETAB = G_MY_TABSTRIP-PRESSED_TAB.

CASE G_MY_TABSTRIP-PRESSED_TAB.

WHEN C_MY_TABSTRIP-TAB1.

G_MY_TABSTRIP-SUBSCREEN = '101'.

WHEN C_MY_TABSTRIP-TAB2.

G_MY_TABSTRIP-SUBSCREEN = '102'.

endcase.

ENDMODULE. " MY_TABSTRIP_ACTIVE_TAB_SET OUTPUT

&----


*& Module MY_TABSTRIP_ACTIVE_TAB_GET INPUT

&----


  • text

----


MODULE MY_TABSTRIP_ACTIVE_TAB_GET INPUT.

OK_CODE = SY-UCOMM.

CASE OK_CODE.

WHEN C_MY_TABSTRIP-TAB1.

G_MY_TABSTRIP-PRESSED_TAB = C_MY_TABSTRIP-TAB1.

WHEN C_MY_TABSTRIP-TAB2.

G_MY_TABSTRIP-PRESSED_TAB = C_MY_TABSTRIP-TAB2.

endcase.

ENDMODULE. " MY_TABSTRIP_ACTIVE_TAB_GET INPUT

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


MODULE STATUS_0100 OUTPUT.

SET PF-STATUS 'ZZZ'.

  • SET TITLEBAR 'xxx'.

describe table it_vbak lines tc-lines.

describe table it_vbap lines tc1-lines.

ENDMODULE. " STATUS_0100 OUTPUT

&----


*& Module USER_COMMAND_0100 INPUT

&----


  • text

----


MODULE USER_COMMAND_0100 INPUT.

CASE SY-UCOMM.

WHEN 'BACK'.

LEAVE TO SCREEN 0.

WHEN 'EXIT'.

LEAVE.

WHEN 'CANCEL'.

LEAVE.

WHEN 'MOD'.

update VBAK FROM table it_vbak.

update VBAP FROM table it_vbap.

describe table it_VBAP lines tc1-lines.

describe table it_vbak lines tc-lines.

when 'INS'.

*This will work,enter vbeln as 0000004981 & giv commit work.

if v_dynnr = '0101'.

insert vbak from table it_vbak.

elseif v_dynnr = '0102'.

insert vbap from table it_vbap.

endif.

WHEN 'DEL'.

if v_dynnr = '0101'.

DELETE VBAK FROM TABLE IT_VBAK.

delete table it_vbak.

elseif v_dynnr = '0102'.

DELETE VBAP FROM TABLE IT_VBAP.

delete it_vbap where vbeln = p_vbeln.

endif.

describe table it_VBAP lines tc1-lines.

describe table it_vbak lines tc-lines.

when 'PICK'.

if v_dynnr = '0101'.

read table it_vbak index clicked_line.

call screen 200.

elseif v_dynnr = '0102'.

read table it_vbap index clicked_line.

call screen 300.

endif.

ENDCASE.

ENDMODULE. " USER_COMMAND_0100 INPUT

&----


*& Module INSERT INPUT

&----


  • text

----


&----


*& Module insert INPUT

&----


  • text

----


MODULE insert INPUT.

v_dynnr = sy-dynnr.

case sy-ucomm.

when 'INS'.

append it_vbak.

clear it_vbak.

when 'MOD'.

modify it_vbak index tc-current_line.

when 'PICK'.

get cursor line clicked_line.

endcase.

ENDMODULE. " insert INPUT

&----


*& MODule MOD INPUT

&----


  • text

----


MODULE MOD INPUT.

v_dynnr = sy-dynnr.

case sy-ucomm.

when 'INS'.

append it_vbap.

clear it_vbap.

when 'MOD'.

modify it_vbap index tc1-current_line.

when 'PICK'.

get cursor line clicked_line.

endcase.

ENDMODULE. " MOD INPUT

&----


*& Module STATUS_0200 OUTPUT

&----


  • text

----


MODULE STATUS_0200 OUTPUT.

SET PF-STATUS 'XXX'.

  • SET TITLEBAR 'xxx'.

ENDMODULE. " STATUS_0200 OUTPUT

&----


*& Module USER_COMMAND_0200 INPUT

&----


  • text

----


MODULE USER_COMMAND_0200 INPUT.

CASE SY-UCOMM.

WHEN 'BACK'.

LEAVE TO SCREEN 100.

WHEN 'EXIT'.

LEAVE TO SCREEN 0.

WHEN 'CANCEL'.

LEAVE.

ENDCASE.

ENDMODULE. " USER_COMMAND_0200 INPUT

&----


*& Module STATUS_0300 OUTPUT

&----


  • text

----


MODULE STATUS_0300 OUTPUT.

SET PF-STATUS 'YYY'.

  • SET TITLEBAR 'xxx'.

ENDMODULE. " STATUS_0300 OUTPUT

&----


*& Module USER_COMMAND_0300 INPUT

&----


  • text

----


MODULE USER_COMMAND_0300 INPUT.

CASE SY-UCOMM.

WHEN 'BACK'.

LEAVE TO SCREEN 100.

WHEN 'EXIT'.

LEAVE TO SCREEN 0.

WHEN 'CANCEL'.

LEAVE.

ENDCASE.

ENDMODULE. " USER_COMMAND_0300 INPUT

Check these links also :

http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm

http://www.sapdevelopment.co.uk/dialog/dialoghome.htm

http://www.sap-img.com/

http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm

http://www.sapgenie.com/links/abap.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm

http://help.sap.com/saphelp_47x200/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.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://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm

http://sap.mis.cmich.edu/abap-00/

http://www.allsaplinks.com/files/using_table_in_screen.pdf

http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm

http://www.sapgenie.com/links/abap.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm

http://www.sapdevelopment.co.uk/dialog/dialoghome.htm

http://help.sap.com

http://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://www.sapbrain.com/TUTORIALS/default.html

http://www.sappoint.com/abap/spmp.pdf

http://sappoint.com/abap.html

http://www.sap-img.com/abap.htm

http://sap.ittoolbox.com/code/archives.asp?i=10&t=450&a=t

http://www.sapdevelopment.co.uk/dialog/dialoghome.htm

http://www.sap-img.com/abap/

http://www.sapdevelopment.co.uk/dialog/dialoghome.htm

http://www.sap-img.com/

http://www.sappoint.com/faq/faqdiapr.pdf

http://www.allsaplinks.com/dialog_programming.html

Hope this resolves your query.

Reward all the helpful answers.

Regards

Former Member
0 Kudos

Thanks