2008 Mar 25 10:49 AM
Hi,
How do I disable input for a table control?
I know that to disable a text editor control, I can use the following codes:
CALL METHOD G_EDITOR_V->SET_READONLY_MODE
EXPORTING
READONLY_MODE = CL_GUI_TEXTEDIT=>TRUE.
Are there similar codes for table controls?
2008 Mar 25 11:36 AM
Hi,
With the use of step-loop you can restict the input for a given input field.
Just write the code in the PBO event as follows:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0200.
loop at itab with control tc cursor tc-current_line.
field itab-matnr module disable.
endloop.
module disable output.
if sy-stepl <> 1.
loop at screen.
if screen-name = 'ITAB-MATNR'.
screen-input = 0.
modify screen.
endif.
endloop.
endif.
endmodule.
Reward points if useful.
Regards,
Sankar.
Hi,
With the use of step-loop you can restict the input for a given input field.
Just write the code in the PBO event as follows:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0200.
loop at itab with control tc cursor tc-current_line.
field itab-matnr module disable.
endloop.
module disable output.
if sy-stepl <> 1.
loop at screen.
if screen-name = 'ITAB-MATNR'.
screen-input = 0.
modify screen.
endif.
endloop.
endif.
endmodule.
Reward points if useful.
Regards,
Sankar.
2008 Mar 25 10:55 AM
Hi,
For table control to disable input field you need to write you code in PBO module which is called between
LOOP AT itab using CONTROL <tab_cntrl>
MODULE disable_input output.
ENDLOOP.
MODULE disable_output.
LOOP AT SCREEN.
IF SCREEN-NAME = 'COLUMN NAME'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDMODULE.Regards,
Sesh
2008 Mar 25 11:03 AM
Hi Sesh Madala,
What is this internal table 'itab' and control '<tab_cntrl>' in your example?
Edited by: Kian Keong on Mar 25, 2008 7:05 PM
2008 Mar 25 11:12 AM
HI,
For table control you will have LOOP ENDLOOP statements in the Flowlogic of the screen that contains this table control.
You need to put your PBO module between these statements. And do a LOOP at screen in your PBO module.
See this program for sample code RSDEMO_TABLE_CONTROL.
In this program check the flow logic of screen 100.
Regards,
Sesh
2008 Mar 25 10:56 AM
HI
You cannot use it for table control.
for table control
at flow logic of screen
PAI
loop at tabc.
module disable_input.
endloop.
perform disable_input.
tabc-input = 0.
modify tabc index sy-tabix.
2008 Mar 25 11:02 AM
Hi,
On the screen one option is there.
click Attributes--> Click the check box output only.
Regards,
S.Nehru
2008 Mar 25 11:24 AM
hi,
in ur PBO one loop will be there...
make one module disable there.
PROCESS BEFORE OUTPUT.
*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'MYTAB1'
MODULE get_data.
MODULE mytab1_change_tc_attr.
LOOP AT mytab
INTO mytab
WITH CONTROL mytab1
CURSOR mytab1-current_line.
MODULE disable.
MODULE mytab1_get_lines.
ENDLOOP.
MODULE disable OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'MYTAB-MATNR'.
screen-input = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDMODULE. " disable OUTPUT
here mytab is my internal table and mytab1 is my table control name...
reward if usefull....
2008 Mar 25 11:36 AM
Hi,
With the use of step-loop you can restict the input for a given input field.
Just write the code in the PBO event as follows:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0200.
loop at itab with control tc cursor tc-current_line.
field itab-matnr module disable.
endloop.
module disable output.
if sy-stepl <> 1.
loop at screen.
if screen-name = 'ITAB-MATNR'.
screen-input = 0.
modify screen.
endif.
endloop.
endif.
endmodule.
Reward points if useful.
Regards,
Sankar.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |