08-03-2009 1:09 PM
Hi Everyone,
I have a requirement for a screen, where we have a table control and we allow only a column to be in editable mode.
Now we dont require the entire coulmn to be on editable or input mode, we require only the first entry(latest entry) to be in ediatble mode. Rest should be in display mode.
Can we accomplish this.
Regards,
Raj
08-03-2009 1:18 PM
Hi,
You can try this way. In the module inside the LOOP...ENDLOOP of the table control in the PBO, firstly initialize the table control lines like this
if gt_itab[] is INITIAL.
tabcontrol-lines = 1. "So here, you have just one editable line in the table control. The rest are geryed out
endif.
What you can do later is have a button that acts on the table control say an ADD button. On click of this ADD button, the next row(or in your case only the first column) will become editable. Write this in the PAI of the module outside the LOOP...ENDLOOP
if OK_CODE eq 'F_ADD'.
tabcontrol-lines = tabcontrol-lines + 1.
endif.
08-03-2009 1:17 PM
Hi,
try this way..
PROCESS BEFORE OUTPUT.
* Module screen GUI-Screen&Status and Screen Logic
MODULE status_1020.
* Table control for OUTPUT
LOOP AT t_zcxref_classes INTO wa_zcxref_classes
WITH CONTROL tc_batch .
MODULE charac_classname_out.
ENDLOOP.
MODULE charac_classname_out OUTPUT.
* Table control reading values from input screen & displaying on screen
READ TABLE t_zcxref_classes INTO wa_zcxref_classes
INDEX tc_batch-current_line.
* Logic for screen Display when Required Flag = 'D'
IF tc_batch-current_line = 1.
LOOP AT SCREEN.
IF screen-name = 'WA_ZCXREF_CLASSES-ATWRT'. "Pass the field name in the table control to make disply
screen-input = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDMODULE. " CHARAC_CLASSNAME_OUT OUTPUT
Prabhuda
08-03-2009 1:18 PM
Hi,
You can try this way. In the module inside the LOOP...ENDLOOP of the table control in the PBO, firstly initialize the table control lines like this
if gt_itab[] is INITIAL.
tabcontrol-lines = 1. "So here, you have just one editable line in the table control. The rest are geryed out
endif.
What you can do later is have a button that acts on the table control say an ADD button. On click of this ADD button, the next row(or in your case only the first column) will become editable. Write this in the PAI of the module outside the LOOP...ENDLOOP
if OK_CODE eq 'F_ADD'.
tabcontrol-lines = tabcontrol-lines + 1.
endif.
10-23-2015 5:19 PM