Screens allow you to enter and to display data.One of their strengths is that they can combine with the ABAP Dictionary to allow you to check the consistency of the data that a user has entered.Screens allow you to create user-friendly dialogs with push buttons, tab strip controls, table controls, and other graphical elements.Let us look at a simple dialog program with a selection screen as its initial screen and a screen for displaying information for a selected data record.When the program starts, the system loads its program context and prepares memory space for the program data objects. The selection screen is displayed.The user enters data on the selection screen and chooses Execute.
In a processing block, the program reads data from the database. To do so, it passes information about the data requested by the user to the database. The database fills a structure with the required data record.The processing logic then calls a screen. This triggers a processing block belonging to the screen called Process Before Output (or PBO). Once the PBO has been processed, the data is transferred to a structure that serves as an interface to the screen. It is then transferred to the screen and displayed.
Any user action on the screen (pressing enter, choosing a menu entry, clicking a pushbutton, ... ) returns control to the runtime system. The screen fields are then transported into the structure that serves as the interface between screen and program, and the runtime system triggers another processing block belonging to the screen, which is always processed after a user interaction, and is called Process After Input (or PAI).You can use the User settings icon (on the far right hand side of the standard toolbar) to configure the R/3 window according to your own preferences.
- Change the colors of various elements of the R/3 interface
- Change the font of texts displayed in the system
- Modify the R/3 window (for example, hide the standard toolbar or restore the default window size
- Show or hide grid lines in lists
- Change the cursor behavior
The changes you make to the user settings are stored on your presentation server, not in the R/3 System.The screen objects text field, input/output field, status icon, group box, radio button, checkbox, and push button all have general attributes, Dictionary attributes, program attributes, and display attributes.
The objects sub screen, tab strip control and table control have general attributes, and special attributes relating to the respective object type.We can divide the attributes of an object into Statically definable attributes that cannot be changed dynamically Statically definable attributes that can be changed dynamically Attributes that can only be changed dynamically.
At the beginning of the PBO, the run time system reads the statically-created and dynamically modifiable attributes of each screen object on the screen into a system table with the line type SCREEN.
When a screen is processed, the system table SCREEN contains an entry for each screen object that has been created in the Screen Painter for that screen.It is initialized in the PBO of each screen, and is filled with the screen objects belonging to that screen.You can change the dynamically-modifiable attributes of the elements on the screen using the construction
LOOP AT SCREEN. ... ENDLOOP.
in a PBO module. To do this, you use the structure SCREEN, which is created automatically by the system, and filled with the values of each successive line of the system table in the LOOP. Active attributes have the value '1', inactive attributes have the value '0'. To change the system table, use MODIFY SCREEN. within the LOOP.
To find the object whose attributes you want to modify, you can use a LOOP on the SCREEN table, and query one of the following fields: SCREEN-NAME, SCREEN-GROUP1 to SCREEN-GROUP4.
Dynamic changes to the attributes of screen objects are temporary.Using this technique to modify the attributes of a screen object (for example, to change whether an input/output field is ready for input), you can replace long sequences of separate screens, which are more costly in terms of both programming time and run time.
If you want to change the attributes of several attributes at once at run time, you can include them in a modification group. To do this, enter the same three-character group name in one of the fields SCREEN-GROUP1 through SCREEN-GROUP4 of each element.Each object can belong to up to four modification groups. You assign the group names in the element list or layout editor in the Screen Painter.
You must program your screen modifications in a module that is processed during the PROCESS BEFORE OUTPUT processing block.You use a loop throught the table SCREEN to change the attributes of an object or a group of objects. (LOOP AT SCREEN WHERE . . . and READ TABLE SCREEN are not supported. )
To activate and deactivate attributes, assign the value 1 (active) or 0 (inactive), and save your changes using the MODIFY SCREEN statement.Note that objects you have defined statically in the Screen Painter as invisible cannot be reactivated with SCREEN-ACTIVE = 1. However, objects that you have statically defined as visible in the Screen Painter can dynamically be made invisible. SCREEN-ACTIVE = 0 has the same effect as the following three statements:
SCREEN-INVISIBLE = 1, SCREEN-INPUT = 0, SCREEN-OUTPUT = 0.
A screen consists of the input/output mask (layout), the screen attributes, and the screen flow logic.Screens have four components: the screen mask, the screen attributes, the element list, and the flow logic. The flow logic contains flow logic code (not ABAP statements).Screens are containers for other screen objects.
Each screen has a set of administration attributes that specify its type, size, and the subsequent screen. It also has settings that influence other properties of the screen and of its components.The administration attributes Program and Screen number identify the screen by its number and the program to which it belongs.
Screen numbers greater than 9000 are reserved for SAP customers. Screen numbers 1000 through 1010 are reserved for the maintenance screens of ABAP Dictionary tables and the standard selection screens of reports.
The screen type identifies the purpose of the screen. Certain other special attributes of a screen and its components depend on this attribute.The "Next screen" attribute allows you to specify the screen that should be processed after the current screen in a fixed sequence.
When you create a screen, you must:
- Set the general screen attributes (on the attribute screen)
- Design the screen layout (in the layout editor)
- Set the field attributes (in the field list)
- Write the flow logic (in the flow logic editor).
To create a screen from the object list in the Object Navigator, create a new development object with the type Screen. Position the cursor on Screens and right-click.The Object Navigator automatically opens the Screen Painter.
When you create a screen, you first have to enter its attributes. Enter a screen number, a short text, and a screen type. You will normally use the screen type Normal. You can specify the number of the next screen in the Next screen field.
If you enter 0 (or nothing) for the next screen, the system resumes processing from the point at which the screen was called once it has finished processing the screen itself.You can also create a screen by writing a CALL SCREEN
Incentives and commission management in sales using CRM