2007 May 16 5:36 AM
hi every one
i have a screen with a mandatory field
when i click in 'BACK' it should not leave the screen because the field is mandatory.
when i click on 'CANCEL' it should come out of the screen.
and when i click on 'EXIT' it should come out of the screen.
how to code all these three conditions in my program.
vamsi
2007 May 16 5:41 AM
Hi,
Use module at exit-command statement.
In the menu painter, the attributes shouild be at exit-command.
write a module xxxx at exit-command for the function codes(ok codes for back , exit and canc).
Regards,
hi every one
i have a screen with a mandatory field
when i click in 'BACK' it should not leave the screen because the field is mandatory.
when i click on 'CANCEL' it should come out of the screen.
and when i click on 'EXIT' it should come out of the screen.
how to code all these three conditions in my program.
vamsi
2007 May 16 5:41 AM
Hi,
Use module at exit-command statement.
In the menu painter, the attributes shouild be at exit-command.
write a module xxxx at exit-command for the function codes(ok codes for back , exit and canc).
Regards,
2007 May 16 5:47 AM
Hi
Write the code in PAI like
PROCESS AFTER INPUT.
Forced Exit from the transaction from screen
MODULE exit AT EXIT-COMMAND.
&----
*& Module exit INPUT
&----
Exit from the Transaction
----
MODULE exit INPUT.
CASE okcode.
WHEN 'EXIT' OR 'CANCEL'.
CLEAR okcode.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " exit INPUT
In the field attributes set the function type as 'E' for CANCEL and EXIT buttons.
Reward points if useful
regards
Anji
2007 May 16 6:05 AM
hi,
i have a screen with a mandatory field
when i click in 'BACK' it should not leave the screen because the field is mandatory.
when i click on 'CANCEL' it should come out of the screen.
and when i click on 'EXIT' it should come out of the screen.
how to code all these three conditions in my program.
in pbo event
loop at screen.
if screen-name = 'text field name'.
screen-input = 1.
modify screen.
endif.
endloop.
in pai event.
data: ok_code like sy-ucomm.
ok_code = sy-ucomm.
case ok_code.
when 'back'.
leave to screen 200. [going one screen back]
when 'exit'
'cancel'.
leave screen 0 or leave program. [back from all screens]
endcase.
if helpful reward some points.
with regards,
suresh babu aluri.
2007 May 16 6:13 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |