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

display mode in tabstrip screen

0 Kudos
820

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
555

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

7 REPLIES 7
Read only

Former Member
0 Kudos
556

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

Read only

0 Kudos
555

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

Read only

0 Kudos
555

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.

Read only

0 Kudos
555

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

Read only

0 Kudos
555

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.

Read only

0 Kudos
555

Hi Aswath,

I tried this and working perfectly :). Sorry for not replying soon as I was facing network issue in these days:(

Thanks

Rajee

Read only

0 Kudos
555

Hi,

Its nice to hear it worked.

Thanks.

Aswath.