Application Development and Automation 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: 
Read only

how to create a subroutine pool?

Former Member
0 Likes
3,487

is creating a subroutine and creating a report the same? transaction d same? se38??

is creating a subroutine and creating a report the same? transaction d same? se38??

5 REPLIES 5
Read only

Former Member
0 Likes
1,753

yes it is

well in the preferences there are some radio buttons. one is for reports another for subroutinepool.

Message was edited by:

Florian Kemmer

Read only

Former Member
0 Likes
1,753

hi,

subroutines means <b>PERFORM and FORM</b>. Which always in reports.

TABLES:mara,

makt,

marc.

DATA:BEGIN OF itab OCCURS 0,

matnr LIKE mara-matnr,

maktx LIKE makt-maktx,

werks LIKE marc-werks,

mtart LIKE mara-mtart,

matkl LIKE mara-matkl,

meins LIKE mara-meins,

ntgew LIKE mara-ntgew,

  • rowcolor(4) TYPE c,

cellcolors TYPE lvc_t_scol,

END OF itab.

SELECTION-SCREEN:BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.

SELECT-OPTIONS:mat FOR mara-matnr. " no intervals no-extension.

*PARAMETERS:mat LIKE mara-matnr.

SELECTION-SCREEN:END OF BLOCK blk1.

START-OF-SELECTION.

<b>PERFORM data_retrieval.

PERFORM display_data.</b>

&----


*& Form data_retrieval

&----


  • text

----


<b>FORM data_retrieval.</b>

SELECT maramatnr maramtart maramatkl marameins mara~ntgew

maktmaktx marcwerks

INTO CORRESPONDING FIELDS OF TABLE itab

FROM mara INNER JOIN makt ON

maramatnr = maktmatnr

INNER JOIN marc ON

maramatnr = marcmatnr

WHERE mara~matnr in mat.

SORT itab BY matnr.

DELETE ADJACENT DUPLICATES FROM itab.

<b>ENDFORM. </b> "data_retrieval

&----


*& Form display_data

&----


  • text

----


<b>FORM display_data.</b>

LOOP AT itab.

WRITE:/ itab-matnr,itab-maktx,itab-werks.

ENDLOOP.

<b>ENDFORM. </b> "display_data

hope it will b helpful.

Message was edited by:

Dhwani shah

Read only

Former Member
0 Likes
1,753

Hi Aatmika,

<b>YES,</b> The transaction for both report creation and subroutine pool is with <b>SE38 only</b>.

<b>Subroutine Pools</b>

Subroutine pools are created using the ABAP Editor and are introduced with the PROGRAM statement. They may not contain any screens of their own, and with the exception of the LOAD-OF-PROGRAM event block they may only use subroutines as processing blocks. Subroutine pools are loaded by externally calling their subroutines from within other ABAP programs.

Thanks,

Vinay

Read only

Former Member
0 Likes
1,753

Hi

you van use SE38 to create

report program

include program

subroutine

module pool

etc.

reward if helpful

vivekanand

Read only

Former Member
0 Likes
1,753

hi,

<b>Subroutines (S)</b>

Contain parts of programs (FORM routines) that can be called

using external PERFORM statements.

<b>Reports are like Executable programs..

Executable Programs (1)</b>

Can be started without a transaction code,

either directly or in the background.

Executable programs are controlled by an invisible system program.

The system program calls processing blocks in the program in a

pre-defined order. It displays the selection screen at the

beginning of the program and outputs a list at the end. Executable

programs allow you to work with logical databases.

With Rgds,

S.Barani