Skip to Content
0
Former Member
Oct 18, 2006 at 12:26 AM

ALV and refresh list

23 Views

The following is the part of my program to generate a list, and then go to 2nd page to do the update, add or delete. After I am done with the update, I press the "back" button at application tool bar, and it brings back the 1st page of list. But the list show the content before the update. Anyone can tell me how to refresh the list? or if you can show me how to add a refresh button at the bottom of the list will work too. Thank you in advance.

FORM SHOW_NEWRECD.

refresh: itab, i_zmytable, myitab.

DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.

select * from zmytable into table itab

where fidocnum = ''.

*------- Field Catalogue

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = sy-repid

i_internal_tabname = 'ITAB'

i_inclname = sy-repid

CHANGING

ct_fieldcat = alvfc

EXCEPTIONS

inconsistent_interface = 1

program_error = 2

OTHERS = 3.

*----


Display

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

it_fieldcat = alvfc

i_callback_program = sy-repid

i_callback_user_command = 'ITAB_USER_COMMAND'

i_screen_start_column = 10

i_screen_start_line = 5

i_screen_end_column = 115

i_screen_end_line = 25

TABLES

t_outtab = itab

EXCEPTIONS

program_error = 1

OTHERS = 2.

ENDFORM. "SHOW_NEWRECD

*----


  • CALL BACK FORM

*----


FORM itab_user_command USING whatcomm TYPE sy-ucomm whatrow TYPE

slis_selfield.

READ TABLE itab INDEX whatrow-tabindex.

*----


Select Data

select * from zmytable into table myitab

where field1 = itab-field1

and field2 = itab-field2

and field3 = itab-field3

and field4 = itab-field4

and SAKNR = itab-saknr.

  • Another testing using screen

call screen 500.

ENDFORM. "ITAB_user_command