Application Development 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: 

Table Control

Former Member
0 Kudos

Hi,

How can I make input 1 of a particular row of a table. Means I want to make a particular row of a table control input enable.

Thanks,

Saroj.

3 REPLIES 3

former_member181962
Active Contributor
0 Kudos

Hi Saroj,

By default, set al lthe columns of the table control to display fields(In screen painter).

in pbo.

loop at itab with tc.....

module modify_tc.

endloop.

in Program.

module modify_tc.

if <Condition>.

loop at screen.

if screen-group1 = <Group name for all the fields in the table control>.

screen-input = 1.

modify screen.

endif.

endloop.

endif.

endmodule.

Regards,

Ravi

Former Member
0 Kudos

Hello,

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.

LOOP AT SCREEN.

if SCREEN-NAME = 'ITAB-FIELD1'.

SCREEN-INPUT = 1.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDLOOP.

ENDMODULE.

Provided make all the fields of the TC as output only.

Vasanth

Former Member
0 Kudos

hi ,

try this one...hope this willl help...

PROCESS BEFORE OUTPUT.

MODULE STATUS_9000.

LOOP AT IT_STR WITH CONTROL TC.

MODULE FILL_MODULE_9OOO.

MODULE ICON_9000.

ENDLOOP.

PROCESS AFTER INPUT.

MODULE CANCEL AT EXIT-COMMAND.

LOOP AT IT_STR.

CHAIN.

FIELD IT_STR-MNO.

FIELD IT_STR-QTY.

MODULE FILL_TABLE_9000 ON CHAIN-REQUEST.

ENDCHAIN.

ENDLOOP.

****************************************************

MODULE FILL_TABLE_9000 ON CHAIN-REQUEST.

DATA : V_LINECOUNT TYPE I, "TO FIND NO OF LINES IN INTERNAL TABLE

V_PAGECOUNT TYPE I, "TO ADD LINES WHEN SCROLLING

V_ABS_LINE TYPE I. "FOR CURRENT LINE

IF SY-DATAR = 'X'. "CLICK IS ON MESSAGE OR IN SCROLL.

DESCRIBE TABLE IT_STR LINES V_LINECOUNT. "TO GET THE NO OF LINES

IF SY-SUBRC = 0.

V_ABS_LINE = TC-TOP_LINE + SY-STEPL - 1. "GETTING THE CURRENT LINE

IF V_ABS_LINE LE V_LINECOUNT. "CHECKING WHEATHER CURRENT LINE IS GT LINECOUNT

MODIFY IT_STR INDEX V_ABS_LINE. "SY-STEPL.

ELSE.

IT_STR-ZINO = V_ABS_LINE.

APPEND IT_STR.

ENDIF.

ENDIF.

*tc-lines = sy-tfill + 1.

V_PAGECOUNT = SY-STEPL DIV SY-LOOPC. "CHECKING WHEATHER TO ADD LINES OR NOT

IF V_PAGECOUNT > 0.

TC-LINES = V_LINECOUNT + SY-LOOPC.

ENDIF.

ENDMODULE.

ENDIF.

If find any difficult ,feel free to revert back..

Siva