Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table Control Enable / Disable Row

Former Member
0 Likes
1,566

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
685

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.

2 REPLIES 2
Read only

Former Member
0 Likes
686

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.

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
685

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