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

Refresh data in Normal ALV ( using LIST_DISPLAY)

Former Member
0 Likes
467

How to refresh data in normal ALV ?

2 REPLIES 2
Read only

RaymondGiuseppi
Active Contributor
0 Likes
432

You may add a function code for refresh in your status or a copy of the standard status (SE41, SET PF-STATUS in the FORM defined by parameter <a class="jive-link-external" href="http://forums.sdn.sap.com/search.jspa?objID=c42&#38;q=I_CALLBACK_PF_STATUS_SET" target="_newWindow">I_CALLBACK_PF_STATUS_SET</a>)<br />

<br />

Then in the USER_COMMAND form (defined by parameter <a class="jive-link-external" href="http://forums.sdn.sap.com/search.jspa?objID=c42&#38;q=I_CALLBACK_USER_COMMAND" target="_newWindow">I_CALLBACK_USER_COMMAND</a>) set the field RS_SELFIELD-REFRESH.<br />

<br />

Also perform some search at sdn, there are samples like in <a class="jive-link-external" href="https://wiki.sdn.sap.com/wiki/display/Snippets/autorefreshalv+Program" target="_newWindow">auto refresh alv Program </a><br />

<br />

Regards,<br />

Raymond

Read only

venkat_o
Active Contributor
0 Likes
432

Hi Manish, <li>Use two events pf_status_set and user_command. <li>Copy PF status of the given program below. When you copy Refresh button appears. You have to write logic to refresh using USER_COMMAND events

*&---------------------------------------------------------------------*
*&      Form  PF_STATUS_SET
*&---------------------------------------------------------------------*
FORM pf_status_set USING rt_extab TYPE slis_t_extab.
  SET PF-STATUS 'TEST'.
* 1. When you set Pf status ZTEST, standard application tools will be removed.
* 2. Goto SE41 give program 'SAPLKKBL' and status 'STANDARD_FULLSCREEN'.
* 3. Copy the status from those to ZTEST of our program. Now you will see all standard functions.
ENDFORM.                    "PF_STATUS_SET
<li>
*------------------------------------------------------------------*
*       FORM USER_COMMAND                                          *
*------------------------------------------------------------------*
FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.
* Check function code
  CASE r_ucomm.
    WHEN '&REFRESH'.  "user presses SAVE
     rs_selfield-refresh = 'X'.
  ENDCASE.
ENDFORM.                    "user_command
Thanks Venkat.O