Skip to Content
0
Former Member
Oct 18, 2006 at 07:00 AM

SLIS Type Pool

27 Views

Hi,

Can anyone explain me for what the SLIS type pool is used for?

Please explain me the following sub-routines.

PERFORM get_fieldcat USING 'SGTXT' 'Cheque Details' 50.

PERFORM get_eventcat CHANGING eventcat.

PERFORM get_top_of_page CHANGING list_top_of_page.

PERFORM start_list_viewer.

FORM get_fieldcat USING b_alvfield b_text b_size.

ADD 1 TO fieldcat_ln-col_pos.

fieldcat_ln-fieldname = b_alvfield.

fieldcat_ln-seltext_l = b_text.

fieldcat_ln-outputlen = b_size.

APPEND fieldcat_ln TO fieldcat.

ENDFORM. " get_fieldcat

FORM get_eventcat CHANGING p_event_cat TYPE slis_t_event.

CONSTANTS:

formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.

DATA : ln_event TYPE slis_alv_event.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

i_list_type = 0

IMPORTING

et_events = p_event_cat

EXCEPTIONS

list_type_wrong = 1

OTHERS = 2.

READ TABLE p_event_cat WITH KEY name = slis_ev_top_of_page

INTO ln_event.

IF sy-subrc = 0.

MOVE formname_top_of_page TO ln_event-form.

APPEND ln_event TO p_event_cat.

ENDIF.

ENDFORM. " get_eventcat

FORM get_top_of_page CHANGING p_list_top_of_page.

DATA: topline TYPE slis_listheader.

CLEAR topline.

topline-typ = 'H'.

CONCATENATE 'User : ' sy-uname

INTO topline-info.

APPEND topline TO list_top_of_page.

topline = ' '.

APPEND topline TO list_top_of_page.

topline-typ = 'S'.

topline-info = 'Last 4 months Average Sales'.

APPEND topline TO list_top_of_page.

ENDFORM. " get_top_of_page

FORM start_list_viewer.

DATA : pgm LIKE sy-repid, t1(30) TYPE c.

t1 = 'USER_COMMAND'.

pgm = sy-repid.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

i_callback_program = pgm

i_callback_user_command = t1

is_layout = layout

it_fieldcat = fieldcat

i_save = 'A' "To save variants

it_events = eventcat[] "heading

is_print = printalv

TABLES

t_outtab = i_bsad

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. " start_list_viewer

I am new to this type of programming. Please explain me this sub-routines. Good explaination will be rewarded.

Best Regards

Renjan