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

regarding table control

Former Member
0 Likes
632

i have two rows in my internal table.

description serial.

have made the table control through wizard and both are in display mode.

the entries that gonna come in this will be, in description it will be either DIT or SHORTAGE.

now depending on the description what i want if description is DIT then the serial number should become input enabled and if it is SHORTAGE then it should remain in display mode.

the minimun number of entries that i assume will be in my internal tabl e is 1000.

waiting for your reply

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
293

hi,

Keep this code as a base and implement it for ur code. Check using if condition whether the description is DIT and give the necessary field as

screen-input = 1. (to make editable i.e. input enabled)

module setscreenfields output. " setting screen fields

loop at screen.

if flg1 is initial.

screen-input = 0. "making screen fields uneditable

elseif ( flg1 eq 1 ).

if ( ( screen-name = 'WI_ZCUST-CUSTOMERNAME' or

screen-name = 'WI_ZCUST-ADDRESS' or

screen-name = 'WI_ZCUST-CITY' or

screen-name = 'WI_ZCUST-STATE' or

screen-name = 'WI_ZCUST-COUNTRY' or

screen-name = 'WI_ZCUST-PHONE' or

screen-name = 'WI_ZCUST-EMAIL' or

screen-name = 'WI_ZCUST-FAX' )

and table1-current_line <= sy-dbcnt ).

screen-input = 1. "making screen fields editable

elseif ( ( screen-name = 'WI_ZCUST-CUSTOMERID' or

screen-name = 'WI_ZCUST-STATUS' ) and table1-current_line <= sy-dbcnt ).

screen-input = 0. "making screen fields editable

endif.

endif.

modify screen.

endloop.

hope it solves ur problem,

regards,

sri

1 REPLY 1
Read only

Former Member
0 Likes
294

hi,

Keep this code as a base and implement it for ur code. Check using if condition whether the description is DIT and give the necessary field as

screen-input = 1. (to make editable i.e. input enabled)

module setscreenfields output. " setting screen fields

loop at screen.

if flg1 is initial.

screen-input = 0. "making screen fields uneditable

elseif ( flg1 eq 1 ).

if ( ( screen-name = 'WI_ZCUST-CUSTOMERNAME' or

screen-name = 'WI_ZCUST-ADDRESS' or

screen-name = 'WI_ZCUST-CITY' or

screen-name = 'WI_ZCUST-STATE' or

screen-name = 'WI_ZCUST-COUNTRY' or

screen-name = 'WI_ZCUST-PHONE' or

screen-name = 'WI_ZCUST-EMAIL' or

screen-name = 'WI_ZCUST-FAX' )

and table1-current_line <= sy-dbcnt ).

screen-input = 1. "making screen fields editable

elseif ( ( screen-name = 'WI_ZCUST-CUSTOMERID' or

screen-name = 'WI_ZCUST-STATUS' ) and table1-current_line <= sy-dbcnt ).

screen-input = 0. "making screen fields editable

endif.

endif.

modify screen.

endloop.

hope it solves ur problem,

regards,

sri