2006 Sep 01 5:41 AM
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...???
2006 Sep 01 6:35 AM
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.
2006 Sep 01 5:44 AM
its by default, you will get the BACK button functionality.
i am not getting whether do you need it or not?
Regards
Srikanth
2006 Sep 01 5:46 AM
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....
2006 Sep 01 5:47 AM
FORM user_command USING ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE ucomm.
WHEN 'BACK_SCR'.
CALL SELECTION-SCREEN '1000'.
ENDCASE.
ENDFORM.
2006 Sep 01 6:35 AM
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.
2006 Sep 01 7:20 AM
hi,
Do like this...
WHEN 'BACK'.
<b>SET SCREEN '0'.</b>
LEAVE SCREEN.
if usefull please reward points...
Regards,
Srinivas