‎2006 May 27 7:26 PM
Hi everyone
I want to disable the empty rows in table control.
I have written this code in PBO in
loop.
Module display.
enloop.
if sy-ucomm eq 'SAVE'
describe table itab lines lin.
if sy-stepl ge lin.
SCREEN-INPUT = 0.
MODIFY SCREEN.
endif.
ENDIF.
but it doesn't work for me .The if condition satisfied but in the o/p i see empty rows active and allowing me to give input.
Please let me know if i am missing something
Thaanks in advance.
‎2006 May 28 12:13 AM
Suchitra,
SCREEN is a table that holds all the screen elements, so you will have to loop at it.
if sy-ucomm eq 'SAVE'
describe table itab lines lin.
if sy-stepl ge lin.
<b>LOOP AT SCREEN.
IF SCREEN-NAME = 'CONTROL-FIELDNAME'</b>
SCREEN-INPUT = 0.
MODIFY SCREEN.
<b>ENDLOOP </b>
endif.
ENDIF.
Regards,
Ravi
Note : Please mark the helpful answers
‎2006 May 27 8:00 PM
Hi Suchitra,
Try this way.
if sy-ucomm eq 'SAVE'
describe table itab lines lin.
if sy-stepl ge lin.
<b>SCREEN-OUTPUT = 1.</b>
MODIFY SCREEN.
endif.
ENDIF.
or
if sy-ucomm eq 'SAVE'
describe table itab lines lin.
if sy-stepl ge lin.
<b>SCREEN-active = 0.</b>
MODIFY SCREEN.
endif.
ENDIF.
hope this helps.
Regards,
Vicky
‎2006 May 28 12:13 AM
Suchitra,
SCREEN is a table that holds all the screen elements, so you will have to loop at it.
if sy-ucomm eq 'SAVE'
describe table itab lines lin.
if sy-stepl ge lin.
<b>LOOP AT SCREEN.
IF SCREEN-NAME = 'CONTROL-FIELDNAME'</b>
SCREEN-INPUT = 0.
MODIFY SCREEN.
<b>ENDLOOP </b>
endif.
ENDIF.
Regards,
Ravi
Note : Please mark the helpful answers
‎2006 May 30 1:17 AM