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

How to REFRESH Normal ALV..

former_member307726
Participant
0 Likes
533

Hi Experts,

I have Display normal ALV REPORT using 'REUSE_ALV_GRID_DISPLAY'.

When Double Click on a Particular Field say EBELN I need to Modify the Text say TXZ01( In below Source Code I Cleared Text just for Example).

Using u2018&IC1u2019 I modified in Internal Table, but it is not visible in the Screen.

Can anyone Give Idea on This.

TYPE-POOLS slis.

DATA : it_ekpo TYPE STANDARD TABLE OF ekpo,

it_fcat TYPE slis_t_fieldcat_alv.

START-OF-SELECTION.

SELECT * FROM ekpo INTO TABLE it_ekpo UP TO 10 ROWS.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_structure_name = 'EKPO'

CHANGING

ct_fieldcat = it_fcat

EXCEPTIONS

inconsistent_interface = 1

program_error = 2.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-cprog

i_callback_user_command = 'USER_COMMAND'

it_fieldcat = it_fcat

TABLES

t_outtab = it_ekpo

EXCEPTIONS

program_error = 1.

&----


*& Form USER_COMMAND

&----


  • text

----


  • -->SLIS_SELFIELD text

----


FORM user_command USING command TYPE sy-ucomm

field TYPE slis_selfield.

FIELD-SYMBOLS <lfs_fcat> TYPE ekpo.

IF command EQ '&IC1'.

IF field-fieldname EQ 'EBELN'.

READ TABLE it_ekpo ASSIGNING <lfs_fcat> INDEX field-tabindex.

IF sy-subrc EQ 0.

CLEAR <lfs_fcat>-txz01.

ENDIF.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_REFRESH' .

ENDIF.

ENDIF.

ENDFORM. "USER_COMMAND

Regards,

Kumar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
466

Hi,

Try like below:


&---------------------------------------------------------------------
*& Form USER_COMMAND
&---------------------------------------------------------------------
* text
----------------------------------------------------------------------
* -->SLIS_SELFIELD text
----------------------------------------------------------------------
FORM user_command USING command TYPE sy-ucomm
field TYPE slis_selfield.
FIELD-SYMBOLS <lfs_fcat> TYPE ekpo.
IF command EQ '&IC1'.
IF field-fieldname EQ 'EBELN'.
READ TABLE it_ekpo ASSIGNING <lfs_fcat> INDEX field-tabindex.
IF sy-subrc EQ 0.
CLEAR <lfs_fcat>-txz01.
ENDIF.
ENDIF.
ENDIF.
field-refresh ' X'.                      <----Add this
ENDFORM. "USER_COMMAND

Regards,

Himanshu

Hi Experts,

I have Display normal ALV REPORT using 'REUSE_ALV_GRID_DISPLAY'.

When Double Click on a Particular Field say EBELN I need to Modify the Text say TXZ01( In below Source Code I Cleared Text just for Example).

Using u2018&IC1u2019 I modified in Internal Table, but it is not visible in the Screen.

Can anyone Give Idea on This.

TYPE-POOLS slis.

DATA : it_ekpo TYPE STANDARD TABLE OF ekpo,

it_fcat TYPE slis_t_fieldcat_alv.

START-OF-SELECTION.

SELECT * FROM ekpo INTO TABLE it_ekpo UP TO 10 ROWS.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_structure_name = 'EKPO'

CHANGING

ct_fieldcat = it_fcat

EXCEPTIONS

inconsistent_interface = 1

program_error = 2.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-cprog

i_callback_user_command = 'USER_COMMAND'

it_fieldcat = it_fcat

TABLES

t_outtab = it_ekpo

EXCEPTIONS

program_error = 1.

&----


*& Form USER_COMMAND

&----


  • text

----


  • -->SLIS_SELFIELD text

----


FORM user_command USING command TYPE sy-ucomm

field TYPE slis_selfield.

FIELD-SYMBOLS <lfs_fcat> TYPE ekpo.

IF command EQ '&IC1'.

IF field-fieldname EQ 'EBELN'.

READ TABLE it_ekpo ASSIGNING <lfs_fcat> INDEX field-tabindex.

IF sy-subrc EQ 0.

CLEAR <lfs_fcat>-txz01.

ENDIF.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_REFRESH' .

ENDIF.

ENDIF.

ENDFORM. "USER_COMMAND

Regards,

Kumar

1 REPLY 1
Read only

Former Member
0 Likes
467

Hi,

Try like below:


&---------------------------------------------------------------------
*& Form USER_COMMAND
&---------------------------------------------------------------------
* text
----------------------------------------------------------------------
* -->SLIS_SELFIELD text
----------------------------------------------------------------------
FORM user_command USING command TYPE sy-ucomm
field TYPE slis_selfield.
FIELD-SYMBOLS <lfs_fcat> TYPE ekpo.
IF command EQ '&IC1'.
IF field-fieldname EQ 'EBELN'.
READ TABLE it_ekpo ASSIGNING <lfs_fcat> INDEX field-tabindex.
IF sy-subrc EQ 0.
CLEAR <lfs_fcat>-txz01.
ENDIF.
ENDIF.
ENDIF.
field-refresh ' X'.                      <----Add this
ENDFORM. "USER_COMMAND

Regards,

Himanshu