‎2005 Sep 20 5:11 AM
Hi,
I have a table control with 6 columns also screen contains some header input fields.
Out of 6 columns first two columns are disabled.
Depending on value entered in certain field in the header I fill the table control. e.g. if the value in certain field is X, table control is filled with say 15 rows, if value is Y, table control is filled with say 5 rows.
Now my requirement is only those rows which are filled should be disabled. i.e. If user chooses value Y then all rows after 5 should be input enabled.
But since I have disabled the columns statically complete column remains disabled.
Can anybody tell me How to enable a particular row in table control ?
Thanks n Regards,
Nitin
Message was edited by: Nitin Pawar
‎2005 Sep 20 5:33 AM
Say your Table control in TABCON.
You screen structure is SC_ITAB.
Your internal table is ITAB.
In PBO of screen
LOOP AT ITAB INTO SC_ITAB WITH CONTROL TABCON.
module SUPPRESS_ROW.
ENDLOOP.
In ABAP Module
MODULE SUPPRESS_ROW.
IF SC_TAB IS INITIAL.
LOOP AT SCREEN.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDLOOP.
else.
LOOP AT SCREEN.
SCREEN-INPUT = 1.
MODIFY SCREEN.
ENDLOOP.
endif.
This will help you suppress at row level.
You may change the if condition to suit your need .
Cheers
ENDMODULE.
‎2005 Sep 20 5:33 AM
Say your Table control in TABCON.
You screen structure is SC_ITAB.
Your internal table is ITAB.
In PBO of screen
LOOP AT ITAB INTO SC_ITAB WITH CONTROL TABCON.
module SUPPRESS_ROW.
ENDLOOP.
In ABAP Module
MODULE SUPPRESS_ROW.
IF SC_TAB IS INITIAL.
LOOP AT SCREEN.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDLOOP.
else.
LOOP AT SCREEN.
SCREEN-INPUT = 1.
MODIFY SCREEN.
ENDLOOP.
endif.
This will help you suppress at row level.
You may change the if condition to suit your need .
Cheers
ENDMODULE.
‎2005 Sep 20 5:40 AM
Hi Nitin,
Check this link.It will help you.Kindly reward points if you find it as useful.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/table control in abap.pdf