Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

block list header fix

Hi All ,

I have made a report with block alv .I want that header should be fixed even when scrolling. here is the code which I have used.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'

EXPORTING

I_CALLBACK_PROGRAM = E_REPID.

S_EVENTS-NAME = 'TOP_OF_PAGE'.

S_EVENTS-FORM = 'TOP_OF_PAGE'.

APPEND S_EVENTS TO T_EVENTS.

CLEAR S_EVENTS.

PERFORM GET_FIELDCAT CHANGING T_FIELDCATALOG.

PERFORM BUILD_LAYOUT.

  • First block

V_TABNAME = 'T_MAIN1'.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

IS_LAYOUT = S_LAYOUT

IT_FIELDCAT = T_FIELDCATALOG

I_TABNAME = V_TABNAME

IT_EVENTS = T_EVENTS

TABLES

T_OUTTAB = T_MAIN1.

S_EVENTS-NAME = 'TOP_OF_PAGE'.

S_EVENTS-FORM = 'HEADER'.

APPEND S_EVENTS TO T_EVENTS.

CLEAR S_EVENTS.

PERFORM GET_FIELDCAT1 CHANGING T_FIELDCATALOG1.

PERFORM BUILD_LAYOUT.

  • second block

V_TABNAME = 'T_MAIN1'.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

IS_LAYOUT = S_LAYOUT

IT_FIELDCAT = T_FIELDCATALOG1

I_TABNAME = V_TABNAME

IT_EVENTS = T_EVENTS

TABLES

T_OUTTAB = T_MAIN1.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.

Thanks In Advance,

Regards,

Bharti Jain

Former Member
Not what you were looking for? View more on this topic or Ask a question