Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to make a cell non editable in table control at runtime.

Hi,

I ahve a requirement that i hav eto make table control field non editable if there is no value in that cell.ia have written a piece code below.

In that code i have declared a module called module change_cell in screen painter screen flow logic.I have written the corresponding subruotine in the program.When the program is executed the module is not called,so i could not make the cell ineditable.

please review my code and let me know any corrections required.

PROCESS BEFORE OUTPUT.

*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'ZS_TAB1'

MODULE ZS_TAB1_CHANGE_TC_ATTR.

*&SPWIZARD: MODULE ZS_TAB1_CHANGE_COL_ATTR.

LOOP AT T_EMPMONTH

INTO ZSTEMPMONTH

WITH CONTROL ZS_TAB1

CURSOR ZS_TAB1-CURRENT_LINE.

<b>* module change_cell.</b>

*&SPWIZARD: MODULE ZS_TAB1_CHANGE_FIELD_ATTR

ENDLOOP.

<b>In program</b>

loop at screen.

if screen-name = 'ZSTEMPMONTH-EMPNO' or screen-name = 'ZSTEMPMONTH-JAN' or screen-name = 'ZSTEMPMONTH-FEB' OR

screen-name = 'ZSTEMPMONTH-MAR' OR screen-name = 'ZSTEMPMONTH-APR' OR screen-name = 'ZSTEMPMONTH-MAY' OR screen-name = 'ZSTEMPMONTH-JUNE' OR screen-name = 'ZSTEMPMONTH-JULY' OR screen-name = 'ZSTEMPMONTH-AUG' OR screen-name = 'ZSTEMPMONTH-SEP' OR

screen-name = 'ZSTEMPMONTH-OCT' OR screen-name = 'ZSTEMPMONTH-NOV' OR screen-name = 'ZSTEMPMONTH-DECE'.

screen-input = '0'.

screen-active = '0'.

SCREEN-INVISIBLE = '1'.

modify screen.

endif.

endif.

endloop.

regards,

Soumya

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question