02-15-2007 10:43 PM
Hi,
In executable report program I am using a FM 'REUSE_ALV_LIST_DISPLAY' to display the list.
So after user selecting the records from the list and click submit it will give output results.
My question.
When he click's BACK button from output screen I need to display again ALV screen with reprocessing the list of records.
Can any one tell me how I can do this?
Thanks a lot.
02-15-2007 10:51 PM
Hello rajesh,
U can do like this.
First implement the USER COMMAND for the ALV list.
When the user clicks the back button modifz ur outtab with the refreshed data and set the <b>SELFIELD-REFRESH EQ X</b> and call the FM REUSE?ALV?LIST?DISPLAY again.
Vasanth
02-15-2007 10:51 PM
Hello rajesh,
U can do like this.
First implement the USER COMMAND for the ALV list.
When the user clicks the back button modifz ur outtab with the refreshed data and set the <b>SELFIELD-REFRESH EQ X</b> and call the FM REUSE?ALV?LIST?DISPLAY again.
Vasanth
02-15-2007 10:58 PM
Hi Vasath,
Thanks for the replay.
can u please tell me where I need to call this FM again passing SELFIELD-REFRESH EQ X ?
CASE SY-UCOMM.
WHEN 'BACK'.
after this I need to call this FM again?
Thanks.
02-16-2007 2:56 AM
Hello Rajesh
As Narendran already said you have to implement subroutine USER_COMMAND. In addition, you have to fill the <b>callback</b> IMPORTING parameters with appropriate value (see below for an example). If you want to set your own PF-status define subroutine PF_STATUS_SET, too.
I_CALLBACK_PROGRAM = syst-repid
*I_CALLBACK_PF_STATUS_SET = PF_STATUS_SET
I_CALLBACK_USER_COMMAND = USER_COMMAND
These subroutines must have a <b>defined interface</b> which you can look up in the documentation of the function module. For example, subroutine USER_COMMAND (which can have any other name as well) has the following interface (see documentation):
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
...
rs_selfield-refresh = 'X'. " refresh list output
ENDFORM.
A final remark: you should <b>not</b> use the BACK button in order to refresh to ALV list because such a behaviour is not in line with the SAP standards for user interfaces. Instead define your own REFRESH push button or handle the existing refresh button of the standard ALV pf-status in the user-command routine.
Regards
Uwe
02-16-2007 7:41 PM
Hi
sorry for late reply,
I could not able to get, I put the code but still its not refreshing.
after refreshing my internal table
if I put
selfield-refresh = 'X'.
perform ALV_DISP, it is refreshing ALV but when we click back button it is showing previous ALV screen.
can some one send email to
m.rajesh.7@gmail.com I will send my code please correct it.
thanks a lot.
rajesh
02-16-2007 8:01 PM
02-15-2007 10:56 PM
Hi,
Once the records are processed when the submit button is pressed..Modify those internal table records..then use selfield-refresh = 'X'.
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
**Modify your internal table records here..
selfield-refresh = 'X'.
ENDFORM.
Thanks,
Naren
02-15-2007 11:15 PM
Hello rajesh,
No need to call the FM again .
DO what I said in USER?COMMAND form. U will be able to see the refreshed data.
Regadrs,
Vasanth
02-15-2007 10:59 PM