Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table control....

Former Member
0 Likes
802

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
783

Hi Ashu.

Check this out:

It is very usefull, in terms of scenarios.

[Enable/Disable rows in Table control|;

Will be good if this helps.

Good Luck & Regards.

Harsh

7 REPLIES 7
Read only

former_member673464
Active Contributor
0 Likes
783

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

Read only

0 Likes
783

bada mushkil hai ashu jeee ...

Read only

Former Member
0 Likes
784

Hi Ashu.

Check this out:

It is very usefull, in terms of scenarios.

[Enable/Disable rows in Table control|;

Will be good if this helps.

Good Luck & Regards.

Harsh

Read only

Former Member
0 Likes
783

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.

Read only

Former Member
0 Likes
783

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.

Read only

Former Member
0 Likes
783

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

Read only

Former Member
0 Likes
783

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^