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

disable single cell in table control

Karan_Chopra_
Active Participant
0 Likes
2,796

i have a TC with 3 columns , suppose on entering data in any cell i want to disable it if value is greater than some particular value . How to do it

P.S i want to disable only single CELL not the entire row or column

i have a TC with 3 columns , suppose on entering data in any cell i want to disable it if value is greater than some particular value . How to do it

P.S i want to disable only single CELL not the entire row or column

4 REPLIES 4
Read only

Karan_Chopra_
Active Participant
0 Likes
1,153

plz help

Read only

Former Member
0 Likes
1,153

Hi Karan,

Please take a look at [http://help.sap.com/erp2005_ehp_03/helpdata/EN/45/adee2396f711d1b46b0000e8a52bed/frameset.htm]

Hope it helps,

Heinz

Read only

rajasekhar_matukumalli3
Active Participant
0 Likes
1,153

Hi,

To change the attributes of individual cells temporarily, change the SCREEN table in a PBO module that you process between LOOP and ENDLOOP in the flow logic (LOOP AT SCREEN, MODIFY SCREEN).

In the LOOP, the runtime system initializes the attributes set statically for the table control in the Screen Painter. You can change these attributes only in a module called from a LOOP through the table control.

Assume your table control name is TC.

In the PBO of the screen, write this logic

Loop at <your internal table> into sdyn_conn with control TC.

MODULE CHANGE_FIELD.

ENDLOOP.

MODULE CHANGE_FIELD OUTPUT.

CHECK <your intetnal tables workarea>-mark = 'X'.

LOOP AT SCREEN.

if screen-group1 = 'SEL'.

screen-input = 0.

endif.

endif.

ENDLOOP.

ENDMODULE.

Hope this solves your problem.

Regards,

Raj

Read only

Sidh_M
Participant
0 Likes
1,153

hi

some days ago i worked on the same issue and got success, its too easy.

declare one output module within loop at internal table with table control in your program flow logic.

ex.

(in flow logic under PBO )

LOOP AT it_emp WITH CONTROL tblctr CURSOR tblctr-current_line.

MODULE edit.

ENDLOOP.

here it_emp is internal table ( for table control ) and tblctr is table view control.

Now write implemetation for module edit in main program.

ex.

MODULE edit OUTPUT.

LOOP AT SCREEN.

IF screen-name = 'IT_EMP-SAL' AND it_emp-sal > 0.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDMODULE. " edit OUTPUT

here 'IT_EMP-SAL' is TC column and it_emp-sal is internal table column. This code will disable those cell which has value > 0 under column 'SAL'.

you can also add all columns of TC in if condition.

Best of luck....

Thanks & Regards,

Sudhir

Edited by: sudhir manjarekar on Jun 19, 2008 12:24 PM