You are on page 1of 2

FILLING THE FIELD CATALOG

If we are working with all the fields from any one of the DB table/structure, then
we no need to prepare the field catalog.
we simply pass I_STRUCTURE-NAME as DB table name/structure name.

Manually filling the catalog


By using 'REUSE_ALV_FLELDCATALOG_MERGE' function

When ever we are working with merge FM we must consider the following things.

We never declare the data IT by using types keyword.


We never refer the data IT field by using types instead of 'type' we use 'like'.

eg: bukrs type t001-bukrs


butxt like t001-bukrs.
3)We must maintain the code upto '72' columns.

Some of the fields in field catalog IT.

1.Field name : name of the field


2.col_pos-- column position
3.Settext-s--column header
4. Settext-m--column header
5. Settextls--column header
6.Emphasize--colour
7.Output len--length of the o/p field
8.no-zero--remove the leading zero’s
9.no-sign--remove the leading sign
10.no-out--hide the displayed field
11.do_sum--calculate the totals
12.Check box--check box
13.Hot spot--handle symbol
14.Edit--change mode

Events in ALV : - in alv events are handled through subroutines.

TOP_OF_PAGE :is an event which is triggered at the top of each page.


TOP_OF_LIST :is an event which is triggered at the TOP of displayed output list.
END_OF_PAGE :is an event which is triggered at the END of each page.
END_OF_LIST :is an event which is triggered at the END of the each page.
USER_COMMAND :is an event which is triggered at the time of user clicks on any
record of any list as well as clicks on any menu item. This event acts like both
at-line-selection as well as at-user command in the interactive reports.
PF_STATUS_SET :is an event which is triggered at the time of attaching our own GUI
to the program.

NOTE :- when ever we are working with ALV then we never create our own GUI to the
program.
We always copy the existing GUI from 'SAPLKKBL' standard program.

FORM user_command-- is run every time you press a button, a menu, or more
generically an ok-coe into your ALV.
"rs_selfield TYPE slis_selfield" holds the data of the field on which the cursor
was when the ok-code was triggered.

FORM set_pf_status-- is run once for every run of the ALV listing. It sets the
available ok-codes.
These are allocated into an internal table "rt_extab TYPE slis_t_extab".

NOTE :- 'REUSE_ALV_COMMENTARY_WRITE' is the FM which is used to display the text ON


TOP or Bottom Events.
The I/P for the above FM is an 'IT' which contains 2 fields.

Ex: <IT>-1.What to display(info)

2.how to display-typ like (H,S,A)

H- Header S- Selection A- ACTION

NOTE :- In SLIS we have one type i.e, 'SLIS_T_LISTHADER'

Which contains the above two fields.


So we simply declare our IT by referring 'SLIS_T_LISTHEADER'.

You might also like