cancel
Showing results for 
Search instead for 
Did you mean: 

TABLE CONTROL

Former Member
0 Kudos

HAI,

I HAVE A TABLE TABLE CONTROL WITH FIVE COLUMNS AND FIVE ROWS, MY REQUIREMENT IS BASED ON SOME CONDITIONHOW TO MAKE A 4TH COLUMN AND ONLY FIRST ROW OF IT AS ONLY OUTPUT ENABLED

CHEERS

Accepted Solutions (1)

Accepted Solutions (1)

former_member181962
Active Contributor
0 Kudos

In the PBO section of the screen, inside the loop of the table control,

check for the row you want and based on the column(Nothing but the screen name of the field), do synamic screen modifications.

loop at screen.

if screen-name = <your screen field name>.

screen-input = 0.

modify screen.

endif.

endloop.

Former Member
0 Kudos

HAI,

THANK FOR YOUR REPLY, BUT I DONT WANT TO DISABLE ALL THE ROWS OF FOURTH COLUMN( IF I HAVE FOUR COULMNS IN TABLE CONTROL ), I WANT TO MAKE ONLY THE SECOND ROW OF THE FOURTH COLUMN FIELD AS INPUT DISABLED

CHEERS

Former Member
0 Kudos

Ho !

loop at itab with control....
module disable_field.
...
endloop.


module disable_fiald.
 if sy-tabix = 2 . " second row ! 🙂 
** here you can say if value <> 0 for example
  loop at screen.
   check screen-name = name_of_row4. " only the 4 column
   screen-input = 0.
   screen-output = 1.
   modify screen.
  endloop.
 endif.
endmodule

endif.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

You can't hide the rows of table control, but you can prevent the input.

You should do it by updating the table screen:

PROCESS PBO.

LOOP.

MODULE LOOP_AT_SCREEN.

ENDLOOP.

MODULE LOOP_AT_SCREEN.

CHECK SY-STEPL > 1.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDMODULE.

You can hide the colunm by updating the attribute of table control:

PROCESS PBO.

MODULE UPDATE_TABLE_CONTROL.

LOOP.

MODULE LOOP_AT_SCREEN.

ENDLOOP.

MODULE UPDATE_TABLE_CONTROL.

  • Fix only on hit

TABLE_CONTROL-LINES = 1.

TYPES-POOLS CXTAB.

DATA: WA_COLUNM TYPE cxtab_column.

LOOP AT TABLE_CONTROL-COLS INTO WA_COLUNM.

IF WA_COLUNM-SCREEN-NAME = .....

WA_COLUNM-INVISIBLE = 'X'.

ENDIF.

MODIFY TABLE_CONTROL-COLS FROM WA_COLUNM.

ENDLOOP.

ENDMODULE.

Max

Former Member
0 Kudos

assign one group ,say G1 to that field in column

IN PBO MODULE.

loop at screen.

if screen-group1 = 'G1' and sy-tabix = '1'.

if screen-name = <ur field name>

screen-inout = '0'.

endif.

modify screen.

endloop.

Message was edited by: chandrasekhar jagarlamudi

Former Member
0 Kudos

In you're pbo you have ...

loop at itab with control .

    • you should create that

module set_enable.

endloop.

modile set_enable.

loop at screen.

check screen-name = field_to_enable.

check condition met

screen-input = 1.

screen-output = 0.

modify screen

endmodule.

cheerz