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

Former Member
0 Likes
334

Hi All,

I am working table control.

i want only one line should be enable.

other lines should be disable.

see below this pgm,

PBO:

loop WITH CONTROL tc1.

module assign.

endloop.

module assign output.

LOOP AT SCREEN.

IF SCREEN-NAME = 'TC1'. ---> Table control name

TC1-LINES = '1'.

ENDIF.

ENDLOOP.

MODIFY SCREEN.

endmodule.

its could not get output..

how is change it?

Reply me soon,

S.Suresh.

3 REPLIES 3
Read only

Former Member
0 Likes
314

u can find a option in table control

called display there u tick only output ........

as per ur requir..........................

Reward IF......................

Regards

Anbu

Read only

Former Member
0 Likes
314

Okay, lets say the tablecontrol is for an itab with fields A, B and C. And you want to disable input for all lines where the value of the field A is 'X'.

Then your screen flow logic would look something like:

PROCESS BEFORE OUTPUT.

"Some code

LOOP AT itab INTO wa

WITH CONTROL tabctl

CURSOR tabctl-current_line.

MODULE disable_some_lines.

ENDLOOP.

"Some more code

.

.

And the 'disable_some_lines' module would look like:

MODULE disable_some_lines.

IF wa-A = 'X'.

LOOP AT SCREEN.

screen-input = 0.

ENDLOOP.

ENDIF.

ENDMODULE.

This is generic, and you'll have to modify as per your need.

Edited by: Arjun Shankar on Jun 27, 2008 12:15 PM

Read only

Former Member
0 Likes
314

jus try this

LOOP AT SCREEN.

IF SCREEN-NAME = 'TC1'. ---> Table control name

if TC1-LINES <> = '1'.

tc1-input = 0.

ENDIF.

ENDIF>

MODIFY SCREEN.

ENDLOOP.