Application Development and Automation 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: 
Read only

REUSE_ALV_COMMENTARY_WRITE not working

Former Member
0 Likes
1,118

Hi Friends

This is code i have written but i m getting balnk screen.

what should i do get the data which i have passed on the screen.

DATA g_header_data1 TYPE SLIS_LISTHEADER.

DATA : g_header_data TYPE SLIS_T_LISTHEADER.

g_header_data1-typ = 'H'.

g_header_data1-key = 'BAPI SUCCESS MESSAGE'.

WRITE text-111 TO g_header_data1-info.

APPEND g_header_data1 TO g_header_data.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = g_header_data

  • I_LOGO =

  • I_END_OF_LIST_GRID =

I_ALV_FORM = 'X'.

Plz information.

Hi Friends

This is code i have written but i m getting balnk screen.

what should i do get the data which i have passed on the screen.

DATA g_header_data1 TYPE SLIS_LISTHEADER.

DATA : g_header_data TYPE SLIS_T_LISTHEADER.

g_header_data1-typ = 'H'.

g_header_data1-key = 'BAPI SUCCESS MESSAGE'.

WRITE text-111 TO g_header_data1-info.

APPEND g_header_data1 TO g_header_data.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = g_header_data

  • I_LOGO =

  • I_END_OF_LIST_GRID =

I_ALV_FORM = 'X'.

Plz information.

5 REPLIES 5
Read only

Former Member
0 Likes
933

Hi, pass g_header_data[] to it_list_commentary.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = g_header_data[]

  • I_LOGO =

  • I_END_OF_LIST_GRID =

I_ALV_FORM = 'X'.

When TYp is H only info will be displayed.

Read only

Former Member
0 Likes
933

hi,

This function should call before the list_display or grid_display

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

i_callback_program = sy-repid

  • I_CALLBACK_PF_STATUS_SET = w_status

  • I_CALLBACK_USER_COMMAND = w_comm

I_CALLBACK_TOP_OF_PAGE = 'PERFROM_TOP '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

i_grid_title = w_title

  • I_GRID_SETTINGS =

IS_LAYOUT = x_layout

it_fieldcat = fcat[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

IT_SORT = t_sort[]

IT_FILTER = t_filter[]

IS_SEL_HIDE = sel1

i_default = 'X'

i_save = 'A'

  • IS_VARIANT = bev1

IT_EVENTS = t_event

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • I_HTML_HEIGHT_TOP =

  • I_HTML_HEIGHT_END =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

t_outtab = it_final

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.

form perform_top.

-


-


COMENTRY_WRITE.

END FORM.

Read only

Former Member
0 Likes
933

DATA: S_LINE TYPE SLIS_LISTHEADER.

S_LINE-TYP = 'S'.

S_LINE-KEY = 'STATUS 1'.

S_LINE-INFO = 'INFO 1'.

APPEND S_LINE TO GT_TOP_OF_PAGE.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.

Read only

Former Member
0 Likes
933

Hi try this..

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = g_header_data.

And also check that this FM should be called from the routine associated with event top_of_page. Otherwise it will not trigger.

Regards,

Joy,

Read only

Former Member
0 Likes
933

hi check it once

wa_header-typ = 'H'.

wa_header-info = 'Purchase Requistion Report'.

APPEND wa_header TO t_header.

CLEAR wa_header.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = t_header.

please check wa_head-key to replace the info.

regards

kk.