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: 

ALV FUNCTION MODULES

former_member778253
Active Participant
0 Kudos

Hi,

This is Sivananda from Bangalore. My query:

Developed a report of Purchase Orders using ALV function modules.

How can it de developed.

Bye.....

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi

<b>The important function modules are</b>

Reuse_alv_fieldcatalog_merge

Reuse_alv_list_display

Reuse_alv_events_get

Reuse_alv_grid_display

Reuse_alv_commentary_write

<b>REUSE_ALV_FIELDCATALOG_MERGE</b>

This function module is used to populate a field catalog which is essential to display the data in ALV.

If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter (I_structure_name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.

The important parameters are:

1. Export:

a. I_program_name : report id

b. I_internal_tabname : the internal output table

c. I_inclname : include or the report name where all

the dynamic forms are handled.

2. Changing

ct_fieldcat : an internal table with the type

SLIS_T_FIELDCAT_ALV which is declared in the

type pool SLIS.

<b>REUSE_ALV_LIST_DISPLAY</b>

This is the function module which prints the data.

The important parameters are:

1. Export:

I_callback_program : report id

I_bypassing_buffer : ‘X’

I_buffer_active : ‘ ‘

d. I_callback_pf_status_set : routine where a user can set

his own pf status or change the

functionality of the existing pf status.

e. I_callback_user_command : routine where the function codes are

handled.

f. I_structure name : name of the dictionary table

g. Is_Layout : structure to set the layout of the report

h. It_fieldcat : internal table with the list of all fields and their

attributes which are to be printed (this table

can be populated automatically by the function

REUSE_ALV_FIELDCATALOG_MERGE

It_events : internal table with a list of all possible events

of ALV and their corresponding form names.

2. Tables:

a. t_outtab : internal table with the data to be output

<b>REUSE_ALV_EVENTS_GET: </b>

Returns table of possible events for a a list type

1. Import:

Et_Events :

The event table is returned with all possible CALLBACK events for the specified list type (column ‘NAME’). For events to be processed by the Callback, their ‘FORM’ field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field ‘FORM’ filled and the entry modified using constants from the type pool SLIS.

<b>REUSE_ALV_GRID_DISPLAY</b>

A new function from 4.6 version, to display the results in grid rather than a

preview.

<b>

REUSE_ALV_COMMENTARY_WRITE</b>

This is used in the Top-of-page event to print the headings and other

comments for the list.

It_list_commentary : Internal table with the headings of the type

slis_t_listheader.

This internal table has three fields:

Typ : ‘H’ - header, ‘S’ - selection, ‘A’ - action

Key : only when typ is ‘S’.

Info : the text to be printed

Parameters : same as reuse_alv_list_display

<b>

Reward points for helpful ans.</b>

Regards

Aarti

2 REPLIES 2

Former Member
0 Kudos

Hi

Welcome to sdn. I'm not so far clear with your requirement can u be more clear what u want??

Regards

Pavan

Former Member
0 Kudos

hi

<b>The important function modules are</b>

Reuse_alv_fieldcatalog_merge

Reuse_alv_list_display

Reuse_alv_events_get

Reuse_alv_grid_display

Reuse_alv_commentary_write

<b>REUSE_ALV_FIELDCATALOG_MERGE</b>

This function module is used to populate a field catalog which is essential to display the data in ALV.

If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter (I_structure_name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.

The important parameters are:

1. Export:

a. I_program_name : report id

b. I_internal_tabname : the internal output table

c. I_inclname : include or the report name where all

the dynamic forms are handled.

2. Changing

ct_fieldcat : an internal table with the type

SLIS_T_FIELDCAT_ALV which is declared in the

type pool SLIS.

<b>REUSE_ALV_LIST_DISPLAY</b>

This is the function module which prints the data.

The important parameters are:

1. Export:

I_callback_program : report id

I_bypassing_buffer : ‘X’

I_buffer_active : ‘ ‘

d. I_callback_pf_status_set : routine where a user can set

his own pf status or change the

functionality of the existing pf status.

e. I_callback_user_command : routine where the function codes are

handled.

f. I_structure name : name of the dictionary table

g. Is_Layout : structure to set the layout of the report

h. It_fieldcat : internal table with the list of all fields and their

attributes which are to be printed (this table

can be populated automatically by the function

REUSE_ALV_FIELDCATALOG_MERGE

It_events : internal table with a list of all possible events

of ALV and their corresponding form names.

2. Tables:

a. t_outtab : internal table with the data to be output

<b>REUSE_ALV_EVENTS_GET: </b>

Returns table of possible events for a a list type

1. Import:

Et_Events :

The event table is returned with all possible CALLBACK events for the specified list type (column ‘NAME’). For events to be processed by the Callback, their ‘FORM’ field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field ‘FORM’ filled and the entry modified using constants from the type pool SLIS.

<b>REUSE_ALV_GRID_DISPLAY</b>

A new function from 4.6 version, to display the results in grid rather than a

preview.

<b>

REUSE_ALV_COMMENTARY_WRITE</b>

This is used in the Top-of-page event to print the headings and other

comments for the list.

It_list_commentary : Internal table with the headings of the type

slis_t_listheader.

This internal table has three fields:

Typ : ‘H’ - header, ‘S’ - selection, ‘A’ - action

Key : only when typ is ‘S’.

Info : the text to be printed

Parameters : same as reuse_alv_list_display

<b>

Reward points for helpful ans.</b>

Regards

Aarti