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: Cannot turn off the input : Weird Scenario

Former Member
0 Likes
697

Hi All,

I have a table control TC_ID_SUM where I want to turn off the input settings.

Table Control Screen Painter Attributes

[url]http://img696.imageshack.us/img696/5582/tccantdisableinput.jpg[url]

PBO Code


PROCESS BEFORE OUTPUT.
  MODULE SET_SCREEN_NUM9008.
  MODULE LOAD_GUI.

  LOOP WITH CONTROL TC_ID_SUM.
    MODULE FILL_TC_IDSUM.
  ENDLOOP.

module FILL_TC_IDSUM output.

  "Disable Input on Table Control
  READ TABLE TC_ID_SUM-COLS INTO w_col INDEX TC_ID_SUM-current_line."1.
  w_col-SCREEN-INPUT = 0.

  READ TABLE T_ZQIDCHECK_DISCH INDEX TC_ID_SUM-current_line.

  IF SY-SUBRC EQ 0.
    "SAP(ITAB) TO SCREEN
    MOVE-CORRESPONDING T_ZQIDCHECK_DISCH TO ZQID_CHECK .
  ELSE.

  ENDIF.

endmodule.                 " FILL_TC_IDSUM  OUTPUT

Upon execution the table is still editable despite of the value of SCREEN-INPUT is already 0 in my debug.

What other aspects should I check on?

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
669

I use a different technique for locking and unlocking table control fields (just a "loop at screen" within the loop with TC).. I think you may need a "modify" after the setting of screen-input = '0'...?


READ TABLE TC_ID_SUM-COLS INTO w_col INDEX TC_ID_SUM-current_line."1.
w_col-SCREEN-INPUT = 0.
modify TC_ID_SUM-COLS from w_col INDEX TC_ID_SUM-current_line. "push the attribute back

Jonathan

Hi All,

I have a table control TC_ID_SUM where I want to turn off the input settings.

Table Control Screen Painter Attributes

[url]http://img696.imageshack.us/img696/5582/tccantdisableinput.jpg[url]

PBO Code


PROCESS BEFORE OUTPUT.
  MODULE SET_SCREEN_NUM9008.
  MODULE LOAD_GUI.

  LOOP WITH CONTROL TC_ID_SUM.
    MODULE FILL_TC_IDSUM.
  ENDLOOP.

module FILL_TC_IDSUM output.

  "Disable Input on Table Control
  READ TABLE TC_ID_SUM-COLS INTO w_col INDEX TC_ID_SUM-current_line."1.
  w_col-SCREEN-INPUT = 0.

  READ TABLE T_ZQIDCHECK_DISCH INDEX TC_ID_SUM-current_line.

  IF SY-SUBRC EQ 0.
    "SAP(ITAB) TO SCREEN
    MOVE-CORRESPONDING T_ZQIDCHECK_DISCH TO ZQID_CHECK .
  ELSE.

  ENDIF.

endmodule.                 " FILL_TC_IDSUM  OUTPUT

Upon execution the table is still editable despite of the value of SCREEN-INPUT is already 0 in my debug.

What other aspects should I check on?

Thanks.

4 REPLIES 4
Read only

Former Member
0 Likes
669

in addition to, I also ensure that the declaration the screen number in my table control is the same screen number where my table control is embedded.

Read only

0 Likes
669

Hi Jamie,

Check the below thread

Search SDN with Search Term Edit cell in Table control or Disable Table control Cell or Rows
we can find many posts

Cheerz

Ram

Read only

Former Member
0 Likes
669

Hi,

Try this it works,

LOOP AT tc_release_ord-cols INTO wa_cols. "tc_release_ord-----> table control

CASE wa_cols-screen-name.

WHEN 'ZRELEASE_ORDER-SPOTS1'.

IF spots1 = ' '. -


> use your condition here

wa_cols-invisible = 'X'. -


> set property to invisible

MODIFY tc_release_ord-cols FROM wa_cols. -


>modify table control

ENDIF.

WHEN 'ZRELEASE_ORDER-SPOTS2'.

IF spots2 = ' '.

wa_cols-invisible = 'X'.

MODIFY tc_release_ord-cols FROM wa_cols.

ENDIF.

WHEN 'ZRELEASE_ORDER-SPOTS3'.

IF spots3 = ' '.

wa_cols-invisible = 'X'.

MODIFY tc_release_ord-cols FROM wa_cols.

ENDIF.

endcase.

Endloop.

Hope it helps you,

Regards,

Abhijit G. Borkar

Read only

Former Member
0 Likes
670

I use a different technique for locking and unlocking table control fields (just a "loop at screen" within the loop with TC).. I think you may need a "modify" after the setting of screen-input = '0'...?


READ TABLE TC_ID_SUM-COLS INTO w_col INDEX TC_ID_SUM-current_line."1.
w_col-SCREEN-INPUT = 0.
modify TC_ID_SUM-COLS from w_col INDEX TC_ID_SUM-current_line. "push the attribute back

Jonathan