‎2009 Jul 13 1:17 PM
Hi,
In table control, if a particular condition is not met for a field Iam raising a error message.
But, thw whole table control fielda are grayed out. Iam not able to make changes .
How can I make the field editable in table control even after error message is raised..
Below is my code.
process after input.
loop with control items.
module read_table_control.
endloop.
module user_command_0110.
module read_table_control input.
lines = sy-loopc.
if vbap-netpr lt zcom.
message w013(xxx) with 'Error'.
else.
modify it_control from vbap index items-current_line.
endif.
endmodule.
Pls help me...
Waiting for ur replies.
Thanks,
Shivaa..
‎2009 Jul 13 1:20 PM
try to use your error message as below.
message w013(xxx) with 'Error' display like 'I'.hope it works..
‎2009 Jul 13 1:26 PM
Inside you loop on the control items, use the command:
FIELD <fieldname> MODULE <field module>.
‎2009 Jul 13 1:29 PM
Hi Shivaa,
IN PAI;
LOOP AT control items.
CHAIN.
FIELD vbap-netpr
MODULE validate ON REQUEST.
MODULE modify_tbl ON CHAIN-REQUEST.
ENDCHAIN.
ENDLOOP.
And then double click on module validate write below code:
MODULE validate INPUT.
if vbap-netpr lt zcom.
message w013(xxx) with 'Error'.
endif..
ENDMODULE.
And then double click on module modify write below code:
MODULE modify_tbl INPUT.
MODIFY it_control from vbap index items-current_line.
ENDMODULE.
Hope it may help you.
Regards,
Supriya.
Edited by: Supriya Bhatt on Jul 13, 2009 3:22 PM
‎2009 Jul 13 1:31 PM
Dear Shiva,
Following is the code for your purpose
process after input.
loop with control items.
field netpr module read_table_control.
endloop.
module user_command_0110.
module read_table_control input.
if vbap-netpr lt zcom.
message w013(xxx) with 'Error'.
else.
modify it_control from vbap index items-current_line.
endif.
endmodule.
Regards
Sajid
Edited by: shaik sajid on Jul 13, 2009 2:31 PM
‎2009 Jul 13 1:38 PM
Hi SHiva Prasad,
see the sample code ..
PROCESS AFTER INPUT.
* Module Screen Exit and Cancel Operation
MODULE exit_screen_1020 AT EXIT-COMMAND.
* Table control for OUTPUT
LOOP AT t_zcxref_classes .
CHAIN.
FIELD wa_zcxref_classes-atwrt. "Add your Field which you are validating
MODULE read_table_control. "Module for Validation
ENDCHAIN.
ENDLOOP.
MODULE read_table_control INPUT.
* Modifying Table control values from screen into Internal table
"reading Current Line
w_lines = sy-loopc.
w_idx = sy-stepl + w_line.
if vbap-netpr lt zcom.
message w013(xxx) with 'Error'.
endif.
modify it_control from vbap index items-current_line.
ENDMODULE. " read_table_control
Prabhudas
‎2009 Jul 13 1:59 PM
Hi Prasad ,
use the syntax: field <filedname> module<module_name>.
kindly chk the following link..
http://help.sap.com/saphelp_46c/helpdata/en/9f/dbabbd35c111d1829f0000e829fbfe/frameset.htm
Regards