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

Problem in Back button in ALV

sachin_jadhav8
Participant
0 Likes
2,414

Hi All,

I have developed ALV report using grid layout.The user wanted that when he execute the report and click on refresh button the report data gets refreshed as report output is based on Z table and same Z table is updating through RFC interface continously.So this functionality is working for me but problem is that after click refresh 2 to 3 times then to come back to selection screen he has to click back button same number of times as refresh button click.

Could anybody help how I can come back to selection screen on single click after click refresh button.

Thanks&Regards,

Sachin

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,719

Hi,

I guess, you must be using custom refresh button and standard back button. I would suggest go for custom back button as well.

Regards,

Pranav.

Hi,

I guess, you must be using custom refresh button and standard back button. I would suggest go for custom back button as well.

Regards,

Pranav.

9 REPLIES 9
Read only

Former Member
0 Likes
1,719

hi sachin ,

just wanted to know that wheather u created any push-button for refresh and back .

if yes than what is the code in back button .

regards

ranjan.

Read only

Former Member
0 Likes
1,720

Hi,

I guess, you must be using custom refresh button and standard back button. I would suggest go for custom back button as well.

Regards,

Pranav.

Read only

0 Likes
1,719

Hello Pranav,

Thanks for the update.

I not using any custome refresh button but using PF-STATUS 'STANDARD'.

On refresh button I am again fetching data and calling fieldcatlog and displaying report.

Regards,

Sachin

Read only

0 Likes
1,719

Hi Sachin,

ON the user command of REFRESH button fetch data and just user after data is fetched RS_SELFIELD-REFRESH = 'X'.

This will solve the problem.

Regards,

Madhukar Shetty

Read only

0 Likes
1,719

Hi Madhukar,

The refresh button logic is working fine but problem is in back button.I mean consider user click refresh button 3 times to see the current data then to go back on selection scrren he has to click back button also three times,So this should be on single click.

Regards,

Sachin

Read only

0 Likes
1,719

Hi Sachin,

This is what Madhukar meant

On refresh button I am again fetching data and calling fieldcatlog and displaying report.

Do not call the fieldcatalog and function module again.

Get the new data into your internal table in user command event &

Just add refresh = 'X' in your user command event.

For example


FORM f_user_command USING UCOMM LIKE SY-UCOMM v_selfld TYPE slis_selfield.
if sy-ucomm = 'REF'.
 PERFORM get_data. 
 selfld-refresh = u2018Xu2019. 
endif.
ENDFORM.

Kesav

Read only

0 Likes
1,719

Hi keshav,

Thank you very much Its working for me now.

Regards,

Sachin

Read only

Former Member
0 Likes
1,719

hi sachin ,

try this code.


AT USER-COMMAND.

CASE SY-UCOMM.
WHEN 'S2000'.
CALL SELECTION-SCREEN 2000.
endcase.

regards

ranjan

Read only

Former Member
0 Likes
1,719

Hİ,

In your user_command perform; reconfigure back command with LEAVE TO SCREEN 0.


  CASE save_ok. 
    WHEN '&F15' OR '&F03'.
      LEAVE TO SCREEN 0.
  ENDCASE.

Take care.

Çağatay