Skip to Content
author's profile photo Former Member
Former Member

SLIS Type Pool

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Oct 18, 2006 at 07:53 AM

    Hi,

    Type pool SLIS contains all the declarations related to buliding of following -

    Fieldcatalog

    Layout

    Events

    Grid Heading, and more

    related to display an ALV on the screen.

    We have to include it call all the definition in the program for usage.

    Its simply like using a Perform where you are passing the values to assign to variables.

    Regards,

    Amit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2006 at 08:06 AM

    HI,

    Its nothing but abap code,

    where some bunch of

    TYPES (data types) and some data declaration,

    is already done.

    (which we can use in other programs)

    (as the name suggests,

    it is a pool (bunch)

    of TYPES.

    It is type-pool (bunch of types)

    required for ALV purpose.

    (eg. variable for field catalogue, alv layout etc)

    Advantage is that we have to use such types,

    just by referring, them, (bcos they are already defined)

    Types-Pool contains the TYPE declaration which is global and can be used across any program.Once we write

    TYPE-POOL : <pool name>

    It will include all declariuon in the program and we can refer those.

    There are many standard types pool provided by SAP

    like SLIS,ICON,ABAP etc.

    However also,we can create our own Type-Pool using

    SE11->Type Group.

    Regards,

    Laxmi.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.