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

To make empty rows inactive after saving

Former Member
0 Likes
424

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
389

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

3 REPLIES 3
Read only

Former Member
0 Likes
389

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

Read only

Former Member
0 Likes
390

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

Read only

0 Likes
389

Hi Guys,

Thanks for your advice and effort.