2010 Jan 12 7:48 PM
Hello Experts,
We already have some custom screens/code built into QM01. For Screen# 800, the code is like this:
PROCESS BEFORE OUTPUT.
MODULE INIT_0800.
LOOP AT t_comp_prt INTO qacomp_prt WITH CONTROL tc_qacomp_prt.
xxxxxxxxxxx
FIELD t_comp_prt-mark.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE CANCEL_800 AT EXIT-COMMAND.
LOOP AT t_qacomp_prt.
FIELD t_qacomp_prt-mark.
MODULE READ_TABLE_CONTROL_800.
ENDLOOP.
MODULE USER_COMMAND_0600.
t_qacomp_prt-mark is assigned to table control for attribute w/ selcolmn for highlighting the lines.
Now I have to create a new button "ADD" in " MODULE USER_COMMAND_0800".
MODULE USER_COMMAND_0800 INPUT.
case ok_code.
when 'ZZZ'.
xxxxxxxxxxxxx.
when 'ADD'.
perform add_new. -> Here I am writing code for new functionality.
when others.
endcase.
ENDMODULE. " USER_COMMAND_0800 INPUT
The requirement is when the users highlight a line on the Table Control and click on "ADD" button, I have to activate my new code. If they do not highlight any line on TC, it should not activate the new code.
I am trying to check the flag "T_QACOMP_PRT-MARK" is selected or not. But in "USER_COMMAND_0800 INPUT", its not working.
Could you please let me know what I have to write in
form add_new.
Thanks a lot.
2010 Jan 13 3:28 AM
Hi Ravi,
in PAI
loop at itab.
module modify_tc.
endloop.
in program.
module modify_tc.
modify itab index tc-current_line " just you select a line and press enter
" and mark should be tranferred to itab in program with avalue X
endmodule.
now
read table itab with key mark = 'X'.
if sy-subrc is initial.
case ok_code.
when 'ADD'. " Now you can proceed further.
clear ok_code.
endcase.
endifCheerz
Ram
Hello Experts,
We already have some custom screens/code built into QM01. For Screen# 800, the code is like this:
PROCESS BEFORE OUTPUT.
MODULE INIT_0800.
LOOP AT t_comp_prt INTO qacomp_prt WITH CONTROL tc_qacomp_prt.
xxxxxxxxxxx
FIELD t_comp_prt-mark.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE CANCEL_800 AT EXIT-COMMAND.
LOOP AT t_qacomp_prt.
FIELD t_qacomp_prt-mark.
MODULE READ_TABLE_CONTROL_800.
ENDLOOP.
MODULE USER_COMMAND_0600.
t_qacomp_prt-mark is assigned to table control for attribute w/ selcolmn for highlighting the lines.
Now I have to create a new button "ADD" in " MODULE USER_COMMAND_0800".
MODULE USER_COMMAND_0800 INPUT.
case ok_code.
when 'ZZZ'.
xxxxxxxxxxxxx.
when 'ADD'.
perform add_new. -> Here I am writing code for new functionality.
when others.
endcase.
ENDMODULE. " USER_COMMAND_0800 INPUT
The requirement is when the users highlight a line on the Table Control and click on "ADD" button, I have to activate my new code. If they do not highlight any line on TC, it should not activate the new code.
I am trying to check the flag "T_QACOMP_PRT-MARK" is selected or not. But in "USER_COMMAND_0800 INPUT", its not working.
Could you please let me know what I have to write in
form add_new.
Thanks a lot.
2010 Jan 12 7:56 PM
2010 Jan 13 3:28 AM
Hi Ravi,
in PAI
loop at itab.
module modify_tc.
endloop.
in program.
module modify_tc.
modify itab index tc-current_line " just you select a line and press enter
" and mark should be tranferred to itab in program with avalue X
endmodule.
now
read table itab with key mark = 'X'.
if sy-subrc is initial.
case ok_code.
when 'ADD'. " Now you can proceed further.
clear ok_code.
endcase.
endifCheerz
Ram