2012 Feb 22 5:04 PM
Hi Guru's,
I m new to ABAP. In SE80, I created screen with two tabs using tabstrip (one to fetch one DB records & another to fetch another DB records). I want the screen to be in display mode except mandatory field in both tabs.
My coding in PBO is,
CALL SUBSCREEN: SUB1 INCLUDING SY-REPID '8010', SUB2 INCLUDING SY-REPID '8011'.
MODULE MODIFYSCREEN.
In this module, I wrote,
Loop at screen.
If screen-name = 'sub1' and screen-group1 = '111'
screen-input = 0.
modify screen.
endif.
elseif screen-name = 'sub2' and screen-group1 = '222'.
screen-input=0.
modify screen.
Endloop.
But it did not work and screen fields are not display mode. Please suggest me.
2012 Feb 22 6:56 PM
Hi,
What you want is your screen fields to be in display mode right? But what you are doing is you are trying to make the subscreen itself to be in display mode. Instead you make use of screen field names only to make it non editable.
Loop at screen.
If screen-name = 'fieldname' and screen-group1 = '111'
screen-input = 0.
modify screen.
endif.
elseif screen-name = 'fieldname' and screen-group1 = '222'.
screen-input=0.
modify screen.
Endloop
*Note: fieldname is the name of the screen field that you assigned in layout.
Hope this helps.
Please revert in case it didn't help.
Thanks and regards.
Aswath
2012 Feb 22 6:56 PM
Hi,
What you want is your screen fields to be in display mode right? But what you are doing is you are trying to make the subscreen itself to be in display mode. Instead you make use of screen field names only to make it non editable.
Loop at screen.
If screen-name = 'fieldname' and screen-group1 = '111'
screen-input = 0.
modify screen.
endif.
elseif screen-name = 'fieldname' and screen-group1 = '222'.
screen-input=0.
modify screen.
Endloop
*Note: fieldname is the name of the screen field that you assigned in layout.
Hope this helps.
Please revert in case it didn't help.
Thanks and regards.
Aswath
2012 Feb 23 4:26 AM
Hi,
Thank you for the reply. I tried it; but it did not work. The screen fields are still in editable mode, not in display mode. What problem is in it?
Some said the problem might be in GUI status. I even set up and called the GUI status and it works correctly. But the problem in setting up the screen fields in display mode still persists. Any help ?
Thanks
Rajee
Edited by: rajeec on Feb 23, 2012 5:27 AM
2012 Feb 23 5:02 AM
Hi,
Where are you writing the logic for making it non editable. You have to write the logic in the PBO of corresponding subscreen for deactivating the fields in corresponding subscreen.
Please show a little how you are doing. It will help the others to identify where you are going wrong.
Thanks.
Aswath.
2012 Feb 23 6:39 AM
I wrote this logic in PBO of main screen (Where created the layout of tabstrip - Coding is in my first message). It did not work. After your reply, I even tried the same in PBO of subscreen 'sub1' amd subscreen 'sub2'. But the same problem occurs.
PBO of subscreen sub1
MODULE MODIFY_SCREEN.
Coding :
LOOP AT SCREEN.
IF Screen-group1 = '111'.
screen-input = 0.
modify screen.
Endif.
ENDLOOP
2012 Feb 23 6:45 AM
Hi,
you wrote
Coding :
LOOP AT SCREEN.
IF Screen-group1 = '111'.
screen-input = 0.
modify screen.
Endif.
ENDLOOP
Its true that if you want to make a field only to be in display mode you have to write the logic in PBO of that screen or subscreen only where you have that field.
Here the condition you are checking is wrong. Dont use screen group. Instead use like this.
LOOP AT SCREEN.
IF Screen-name = 'Your field name which should be in display mode'.
screen-input = '0'.
modify screen.
endif.
Endloop.
and remember you put zero in single quote.
Please revert in case of further issue.
Thanks and regards.
Aswath.
2012 Feb 27 5:01 PM
Hi Aswath,
I tried this and working perfectly :). Sorry for not replying soon as I was facing network issue in these days:(
Thanks
Rajee
2012 Feb 27 5:48 PM