‎2008 Jul 11 5:49 AM
Hi all,
I want to disable the rows in the table control when user press enter key... how to do this plz help me out on this..ASAP..
Points will be rewarded to useful answer...
Thanks & Regards
Ashu singh.
‎2008 Jul 11 5:59 AM
‎2008 Jul 11 5:53 AM
hi,
You can change the screen properties for your requirements.For modification of properties refer to the demo program
demo_dynpro_tabcont_loop_at
Regards,
Veeresh
‎2008 Jul 11 6:00 AM
‎2008 Jul 11 5:59 AM
‎2008 Jul 11 6:07 AM
hi ,
First Create the a field group ( let say G1) of all the component you want to disable. Then at PAI create a module and put this content in it,
module DEACTIVATE input.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'G1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
endmodule.
‎2008 Jul 11 6:19 AM
Hi,
I am showing n number of records in a table control. These number of records may wary depending on a X condition.
I have also created a button with which user can create a new record from the same tabkle control and t/f back that new value in the itab.
Now, when table control is displayed it WILL have certain records in it. I want those records to be in the INPUT = '0' state and rest of the table control lines should be INPUT = '1'.
I am trying....
PROCESS BEFORE OUTPUT.
MODULE status_0101.
LOOP AT ts_store WITH CONTROL tabc CURSOR tabc-current_line.
module change_scr_attr.
ENDLOOP.
module change_scr_attr output.
CASE ok_code.
WHEN 'DISP'.
Displays all the records in INPUT = '0' state.
LOOP AT tabc-cols INTO cols WHERE index GT 0.
cols-screen-input = '0'.
MODIFY tabc-cols FROM cols INDEX sy-tabix.
ENDLOOP.
WHEN 'CREA'.
if * * disable the CDC Column
disable Delete shortcut.
REFRESH ts_store.
LOOP AT tabc-cols INTO cols WHERE index GT 0.
IF ts_store-zstcdc_store IS INITIAL.
cols-screen-input = '1'.
ELSE.
cols-screen-input = '0'.
ENDIF.
screen-active = '1'.
MODIFY tabc-cols FROM cols INDEX sy-tabix.
ENDLOOP.
*
LOOP AT tabc-cols INTO cols WHERE index GT 0.
IF cols-screen-input = '0'.
cols-screen-input = '1'.
ELSEIF cols-screen-input = '1'.
cols-screen-input = '0'.
ENDIF.
MODIFY tabc-cols FROM cols INDEX sy-tabix.
ENDLOOP.
*
LOOP AT SCREEN.
IF ts_store-zstcdc_store IS INITIAL.
screen-input = '1'.
ELSE.
screen-input = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDCASE.
endmodule. " change_scr_attr OUTPUT
Thanks,
Khushbu.
‎2008 Jul 11 6:20 AM
Hi Ashu,
U have to use a loop for the same in table control PBO.
The loop that You use in screen attributes, in dat loop u can create a module say Deactivate_tc.
Now double click on it and the module that u get, write the following code in it..
LOOP AT SCREEN.
IF screen-name CS 'IT_ITAB'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
where IT_ITAB refers to the table where u have taken the table control fields from.
Hope u r gettimg my point.
If not do revert back for clarifications.
plz reward if helpful.
Regards,
Manish
‎2008 Jul 11 6:38 AM
hi
good
process before output.
module status_1000.
Loop at itab into wa with control tc_ctrl.
module disable_input.
endloop.
module disable_input.
if wa_status = 'F'.
loop at screen.
if screen-group = 'GP1' "If the fields to be disabled have a group attribute use this condition
if screen-name = <name of screen field>
screen-input = 0.
modify screen.
endif.
endloop.
endif.
hope this will help you to solve your problem.
thanks
mrutyun^