‎2007 Oct 04 7:32 AM
Hi,
I have a program where i have designed the selection screen. This program is used by different programs.
My requirement now is i have to add a new field and disable another field if the new field has any value and viceversa.
I cannot go and directly add a new field and disable the old field on the properties of that screen in se51. Since the same screen is used by different programs.
Now if I copy the selection screen program and use it exclusively for my new report, it will take huge number of changes and there are many programs involved in calling this selection screen program. So then I'll have to copy most of the programs and change their corresponding program names as well and I have to add these new program names wherever the old one is used, which doesn't look like a good idea to me.
i am thinking of making a copy of the report program alone and use a select option over there to add a new field. But the old field has been designed on the se51 window. Can anyone tell me what i have to do in the report program to disable the old one if new one has some value and vice versa.
Regards,
Phyrose.
‎2007 Oct 04 8:34 AM
Hi ,
Try this.
At selection-screen output.
LOOP AT SCREEN.
IF screen-name = 'Field name to be disabled'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Hope this solves your problem.
Regards,
Bharat.
Reward points if helpful.
‎2007 Oct 04 8:39 AM
Try using a toggle flag to check whether the fields are filled or not. Now, according to this flag do a LOOP AT SCREEN and set the field as visible or invisible.