2010 Jan 21 7:02 AM
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.
2010 Jan 22 2:08 AM
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
2010 Jan 21 7:07 AM
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.
2010 Jan 21 7:43 AM
2010 Jan 21 8:43 AM
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
2010 Jan 22 2:08 AM
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