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

BACK Button in ALV Grid display

Former Member
0 Likes
3,653

Hi All..

I have designed ALV Grid out put..

Now i wasnt to activate the BACK Button. If i click on BACK Button, system should trigger the previous selection screen.

How to code it...???

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,275

Hi pavan,

1. Things won't work if we do normal things.

2. The important things are :

a) New PF-STATUS is required , say 'ABCD'.

b) Handle user_commmand

3. First of all, from Function group SALV,

copy the STANDARD gui status to your program,

from SE80, by right clicking.

4. come to your program.

start-of-selection.

SET PF-STATUS 'ABCD'.

5. Double click ABCD and activate the gui status.

6. In gui status,

in those green buttons and yellow buton,

write BACK1 in both.

ie. buttons with fcode BACK1.

Save and activate.

6. AT USER-COMMAND.

IF sy-ucomm = 'BACK1'.

DATA : answer TYPE c.

CALL FUNCTION 'POPUP_TO_CONFIRM'

EXPORTING

titlebar = 'Do You Want To Exit ?'

text_question = 'Do You Want To Exit ?'

IMPORTING

answer = answer

EXCEPTIONS

text_not_found = 1

OTHERS = 2.

IF answer = '1'.

SET USER-COMMAND 'BACK'.

ENDIF.

ENDIF.

This will solve your problem.

I tried at my end, it works fantastic.

regards,

amit m.

5 REPLIES 5
Read only

Former Member
0 Likes
1,275

its by default, you will get the BACK button functionality.

i am not getting whether do you need it or not?

Regards

Srikanth

Read only

Former Member
0 Likes
1,275

in pai write the below code

CASE sy-ucomm.

  • Go back to selection screen

WHEN 'BACK'.

SET SCREEN 0.

CLEAR sy-ucomm.

LEAVE SCREEN.

set yr pf-status....

Read only

0 Likes
1,275

FORM user_command USING ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE ucomm.

WHEN 'BACK_SCR'.

CALL SELECTION-SCREEN '1000'.

ENDCASE.

ENDFORM.

Read only

Former Member
0 Likes
1,276

Hi pavan,

1. Things won't work if we do normal things.

2. The important things are :

a) New PF-STATUS is required , say 'ABCD'.

b) Handle user_commmand

3. First of all, from Function group SALV,

copy the STANDARD gui status to your program,

from SE80, by right clicking.

4. come to your program.

start-of-selection.

SET PF-STATUS 'ABCD'.

5. Double click ABCD and activate the gui status.

6. In gui status,

in those green buttons and yellow buton,

write BACK1 in both.

ie. buttons with fcode BACK1.

Save and activate.

6. AT USER-COMMAND.

IF sy-ucomm = 'BACK1'.

DATA : answer TYPE c.

CALL FUNCTION 'POPUP_TO_CONFIRM'

EXPORTING

titlebar = 'Do You Want To Exit ?'

text_question = 'Do You Want To Exit ?'

IMPORTING

answer = answer

EXCEPTIONS

text_not_found = 1

OTHERS = 2.

IF answer = '1'.

SET USER-COMMAND 'BACK'.

ENDIF.

ENDIF.

This will solve your problem.

I tried at my end, it works fantastic.

regards,

amit m.

Read only

Former Member
0 Likes
1,275

hi,

Do like this...

WHEN 'BACK'.

<b>SET SCREEN '0'.</b>

LEAVE SCREEN.

if usefull please reward points...

Regards,

Srinivas