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 - Input Dis-abling ??

Former Member
0 Likes
578

Hi Experts,

Just curious to know,

By using table control wizard I built the z_table_control with a separate work_area_ctrl.

As soon as the user clicks the Pencil icon, the screen has to change dispaly/change mode. So, I guess. code is goes like(same as selection screens),

<i><b><u>PBO</u>:

loop at screen.

if screen-name = work_area_ctr l-netwr.

if screen-input = 1.

screen-input = 0

else.

screen-input = 1.

endif.

modify screen.

endif

endloop.</b></i>

but, not working! pls.clarify.

thanq.

Message was edited by:

Srikhar

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
474

Hi,

Please check the sy-ucomm value is TOGGLE?

I find no other way but to debug the same.

Pl check this link may this one help you.

http://www.sapmaterial.com/tablecontrol_sap.html

aRs

3 REPLIES 3
Read only

former_member194669
Active Contributor
0 Likes
475

Hi,

Please check the sy-ucomm value is TOGGLE?

I find no other way but to debug the same.

Pl check this link may this one help you.

http://www.sapmaterial.com/tablecontrol_sap.html

aRs

Read only

Former Member
0 Likes
474

MODULE populate_screen OUTPUT.

DATA: ld_line TYPE i.

  • Set which line of itab is at the top of the table control

IF sy-stepl = 1.

tc100-lines =

tc100-top_line + sy-loopc - 1.

ENDIF.

  • move fields from work area to scrren fields

MOVE-CORRESPONDING wa_ekko TO ztc_ekko.

ld_line = sy-stepl + tc100-top_line - 1.

  • Changes individual field attributes of table control,

  • Sets EBELN field on 3rd row of TC to not be an input field!

LOOP AT SCREEN.

IF ld_line EQ 3.

IF screen-name EQ 'ZTC_EKKO-EBELN'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

ENDMODULE. " populate_screen OUTPUT

Read only

Former Member
0 Likes
474

put the name of the field in upper case inside quotes:

if screen-name = 'WORK_AREA_CTRL-NETWR'.

This must be the name as in the screen element list.

Put a breakpoint in the code and look at the screen values to see.

Andrew