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

Table for Screen Field Properties

Former Member
0 Likes
5,761

Hi Guys,

I have strange requirement.

Lets say i have designed 5 fields in the Dialog Program. 2 fields belongs to Group1,another 2 fields belongs to Group2 and 3rd field is belongs to group3.

Where can i find those values (I mean which table). I belive it should be Program,screen no and data type.

Note : Groups you can set in Attributes of the field in Dialog Program.

Thanks

Poorna

Hi Guys,

I have strange requirement.

Lets say i have designed 5 fields in the Dialog Program. 2 fields belongs to Group1,another 2 fields belongs to Group2 and 3rd field is belongs to group3.

Where can i find those values (I mean which table). I belive it should be Program,screen no and data type.

Note : Groups you can set in Attributes of the field in Dialog Program.

Thanks

Poorna

10 REPLIES 10
Read only

Former Member
0 Likes
2,330

Hi,

It will not be stored anywhere but during runtime you can get it using;

LOOP at SCREEN.

And you can see the structure of SCREEN in SE11.

Group values will be available in any of the fields GROUP1, GROUP2, GROUP3,GROUP4.

Regards

Karthik D

Read only

Former Member
0 Likes
2,330

Hai Poorna ,

This values are not stored in Tables.

In your PBO module just loop around screen and you will get all the details.

ex..

LOOP AT screen.

ENDLOOP.

put a break point on LOOP AT Screen

and try to view SCREEN-NAME or any other detail that you need.

For more information open the structure SCREEN in se12.

Hope the discussion was helpful.

Cheers,

Suvendu

Read only

0 Likes
2,330

Hi.

Say you said. There are 5 number of field on ur screen.

Field1 - Group1

Field2 - Group1

Field3 - Group2

Field4 - Group2

Field5 - Group3

Okey. You assigned Group to Ur field. now You can apply some common opration on

that field Group wise .

If i want to hide filed which is in Group1..

than just Write like this.



Loop at screen.
     if screen-name = 'GROUP1'.
        screen-active = 1.
    endif.
 modify screen. 
endloop.

Through this you can make invisible ur Group1 fields.

Depends on logic what you want to do Group wise.

Regards,

Vipul

Read only

venkat_o
Active Contributor
0 Likes
2,330

Hi Poornima,

<li>We call that table as SCREEN table. It is built at runtime.

<li>Check the below code. Put breakpoint in between LOOP and ENDLOOP and Execute. You can see the values in that table . You dont need to declare that table as well.


LOOP AT SCREEN.
  IF screen-group1 = 'GR1'.
  ELSEIF screen-group1 = 'GR2'.
  ELSEIF screen-group1 = 'GR3'.
  ENDIF.
ENDLOOP.

Thanks

Venkat.O

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
2,330

Hi,

Define the group1 for all the fields as:-

Field1 - GP1

Field2 - GP1

Field3 - GP2

Field4 - GP2

Field5 - GP3

Refer:-

In PBO of screen use:-

LOOP AT SCREEN.
  IF screen-group1 = 'GP1'.
    "code
  ELSEIF screen-group1 = 'GP2'.
    "code
  ELSEIF screen-group1 = 'GP3'.
    "code
  ENDIF.
  MODIFY SCREEN.
ENDLOOP.

Hope this helps you.

Regards,

Tarun

Read only

Former Member
0 Likes
2,330

Hi Guys,

Sorry i am little bit as i am shutdown.

I can not use loop at screen and endloop as i wanted this information outside of the program. but i know information screenname,screen no and field.

Thanks

Poorna

Read only

0 Likes
2,330

hi

loop at screen.

here screen acts as internal table and it gets filled automatically just before the screeen gets displayed as output.

Based on ur logic u can make few fields as input or display or hide dynamically..

regards

Sajid

Read only

0 Likes
2,330

Setting Screen Field Attributes

Every screen field has attributes that you set in the Screen Painter when you define the

screen. At runtime, you may want to change these attributes, depending on what

functions the user has requested in the previous screen. At runtime, attributes for each

screen field are stored in a memory table called SCREEN. You do not need to declare

this table in your program. The system maintains the table for you internally and updates

it with every screen change.

The memory table SCREEN contains the following fields:

Name Length Description

NAME 30 Name of the screen field

GROUP1 3 Field belongs to field group 1

GROUP2 3 Field belongs to field group 2

GROUP3 3 Field belongs to field group 3

GROUP4 3 Field belongs to field group 4

ACTIVE 1 Field is visible and ready for input

REQUIRED 1 Field input is mandatory

INPUT 1 Field is ready for input

OUTPUT 1 Field is for display only

INTENSIFIED 1 Field is highlighted

INVISIBLE 1 Field is suppressed

LENGTH 1 Field output length is reduced

DISPLAY_3D 1 Field is displayed with 3D frames

VALUE_HELP 1 Field is displayed with value help

To activate a field attribute, set its value to 1. To deactivate it, set it to 0. When you set

the ACTIVE attribute to 0, the system suppresses the field and turns off the ready for

input attribute. The user can neither see the field nor enter values into it.

Note

You can define values for each of these attributes in the Attribs. for 1 field section in

the field list of the Screen Painter. If you need more information about attribute

meanings, see BC ABAP/4 Workbench Tools.

Modifying the Screen SAP AG

Setting Screen Field Attributes

32u20134 May 1997

As an example of modifying the screen dynamically, start with transaction tz50

(development class SDWA).

The transaction consists of two screens. In the first screen the user can enter flight

identifiers and either request flight details (by pressing a Display pushbutton) or press the

Change pushbutton to change the data of screen 200.

The field attributes are now set dynamically, according to whether the Display button or

the Change button was selected. In both cases the same screen is now called, but with

different field attributes.

If the same attributes need to be changed for several fields at the same time, these fields

can be grouped together. For example, in order to change the fields in screen 200

dynamically, we assign these fields in the Screen Painter to the group MOD. You can

specify up to four modification groups for each field. The contents of the Groups field

are stored in the SCREEN table.

The changes to the attributes of the fields in this group can be implemented in a PBO

module:

SAP AG Modifying the Screen

Setting Screen Field Attributes

May 1997 32u20135

MODULE MODIFY_SCREEN OUTPUT.

CHECK MODE = CON_SHOW.

L0OP AT SCREEN.

CHECK SCREEN-GROUP1 = u2019MODu2019.

SCREEN-INPUT = u20190u2019.

MODIFY SCREEN.

ENDLOOP.

ENDMODULE.

The memory table SCREEN contains each field of the current screen together with its

attributes.

The LOOP AT SCREEN statement puts this information in the header line of this system

table.

In this example taken from transaction tz50, if the user chooses Display then SCREENINPUT

is set to u20190u2019 and all fields belonging to the MOD group thus become display-only

fields.

Because attributes have been changed, the MODIFY SCREEN statement is used to write

the header line back to the table.

Modifying the Screen SAP AG

Changing Screen Field Attributes with the Function Field Selection

Read only

0 Likes
2,330

You will see the dynamic strcture called 'screen; in debugging.

There we can see this fields we cant seen in se11.

The above documentation about screen fields.

Read only

Former Member
2,330

Hi Guys,

I got solution

use this function to get any screen field attributes out side the dialog Program - it simply need which programname,dynno it will list fields in that screen and corresponding attributes.

Fun. Module : RS_SCREEN_IMPORT

Thanks

Poorna