‎2006 Oct 16 10:33 AM
CLEAR ok_code.
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'ADD'.
TABLE_CONTROL-LINES = TABLE_CONTROL-LINES + new_row.
WHEN 'DEL'.
DELETE TCTRL WHERE SEL_FIELD = 'X'.
WHEN 'PROC'.
PERFORM chk_tctrl.
PERFORM code_gen.
WHEN 'CODP'.
PERFORM chk_tctrl.
PERFORM code_prev.
WHEN 'GENR'.
PERFORM chk_tctrl.
PERFORM gen_prg.
WHEN 'BACK'.
SET SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
In this coding the ok_code is not getting cleared. whenever an option is selected, and after if 'ENTER' is clicked the ok_code remains the previous option chosen and not getting cleared. please help.
‎2006 Oct 16 10:36 AM
In which section of the screen did you cal this module?
Is it in the PAI?
ok_code will have the last user action's code.
When you say, "an option is selected" what do you actually mean?
Regards,
Ravi
‎2006 Oct 16 10:42 AM
It is called in PAI module.When an user action is made as in the coding say 'PROC'. after which if i give 'ENTER' the previous event 'PROC' is triggered again.
‎2006 Oct 16 10:37 AM
HI,
remove the statement, ok_code = sy-ucomm.
There is no need of passing sy-ucomm value again.
Just set the ok_code in the attributes of the screen.
Regards,
Sailaja.
‎2006 Oct 16 10:39 AM
Hi ,
If you already declared OK_CODE like SY-UCOMM in data declarations then remove
ok_code = sy-ucomm
and ensure that the triggring should happend in PAI module
regards,
‎2006 Oct 16 11:00 AM
hi,
add this statement in bold.
case ok_code.
when 'PROC'.
...
<b> clear ok_code.</b>
when 'ABCD'.
endcase.
Regards,
Sailaja.
‎2006 Oct 16 11:22 AM
we have tried that also before itself. it is not working. 'CLEAR ok_code' after each event
‎2006 Oct 16 11:05 AM