‎2008 Feb 19 11:35 AM
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
‎2008 Feb 19 12:21 PM
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
‎2008 Feb 19 12:21 PM
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