Application Development 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: 

Reprocessing ALV screen when we click BACK button

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

8 REPLIES 8

Former Member
0 Kudos

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

0 Kudos

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.

0 Kudos

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

0 Kudos

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

0 Kudos

Hi thanks for all .. I solved my problem.

Former Member
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

Hi,

Please check my reply..

Thanks,

Naren