02-03-2009 9:37 AM
Hi,
In Module pool programming, table control i have 10 items out of which in the same colum i want to put them in edit mode and certain in disply mode.
Regards
02-03-2009 10:36 AM
Hi,
Take the group1 for the textbox field as 'ABC', which needs to be in display mode.
Use this code, its working:-
In PBO:-
MODULE passdata OUTPUT.
READ TABLE itab INDEX tab_clc-current_line.
IF sy-subrc = 0.
if <condition>. "condition on which textbox needs to be in display mode
LOOP AT SCREEN.
IF screen-group1 = 'ABC'.
screen-input = 0. "disable for input
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDMODULE. " PASSDATA OUTPUT
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
02-03-2009 9:46 AM
Hi,
You can use loop at screen,
MODULE passdata OUTPUT.
READ TABLE it_revision INTO wa_rev INDEX tab_clc-current_line.
IF sy-subrc = 0.
LOOP AT SCREEN.
IF screen-group1 = '111'. " 111 IS THE GROUP NAME
screen-input = 1. " input mode
screen-active = 1. " input mode.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-group1 = '111'. "GROUP NAME
screen-input = 0. " display mode
screen-active = 1. " DISPLAY MODE.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDMODULE. " PASSDATA OUTPUT
Make the group of those field ,that you want in input mode
Hope it will Solve your problem
Thanks
Arun kayal.
02-03-2009 9:48 AM
hi ,
you can show some lines in the editable mode and some of the lines in non-editable mode by changing the screen properties of table control.
you can write that code in the pbo of the the screen in loop at i_table.
refer the demo program demo_dynpro_tabcont_loop_at.
regards,
Veeresh
02-03-2009 9:58 AM
Try this:
CONTROLS controlname TYPE TABLEVIEW USING SCREEN screenname.
DATA: cols LIKE LINE OF controlname-cols.
LOOP AT controlname-cols INTO cols.
cols-screen-input = '0'. "input not possible
cols-screen-input = '1'. "input possible
MODIFY controlname-cols FROM cols INDEX sy-tabix.
ENDLOOP.
02-03-2009 10:05 AM
02-03-2009 10:36 AM
Hi,
Take the group1 for the textbox field as 'ABC', which needs to be in display mode.
Use this code, its working:-
In PBO:-
MODULE passdata OUTPUT.
READ TABLE itab INDEX tab_clc-current_line.
IF sy-subrc = 0.
if <condition>. "condition on which textbox needs to be in display mode
LOOP AT SCREEN.
IF screen-group1 = 'ABC'.
screen-input = 0. "disable for input
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDMODULE. " PASSDATA OUTPUT
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
02-03-2009 10:40 AM
Hi,
In table control field screen input = 0 means desable and 1 means enabled. Refer below code.
LOOP AT flights-cols INTO cols WHERE index GT 2.
cols-screen-input = '0'.
MODIFY flights-cols FROM cols INDEX sy-tabix.
ENDLOOP.
Regards
Md.MahaboobKhan
02-03-2009 11:24 AM