Студопедия
Случайная страница | ТОМ-1 | ТОМ-2 | ТОМ-3
АрхитектураБиологияГеографияДругоеИностранные языки
ИнформатикаИсторияКультураЛитератураМатематика
МедицинаМеханикаОбразованиеОхрана трудаПедагогика
ПолитикаПравоПрограммированиеПсихологияРелигия
СоциологияСпортСтроительствоФизикаФилософия
ФинансыХимияЭкологияЭкономикаЭлектроника

SET PF-STATUSand SET TITLEBAR

Wa_flight-seatsocc / wa_flight-seatsmax. | INSERT wa_flight INTO TABLE it_flight. | ID ’ACTVT’ FIELD ’02’. | WRITE: / ’Authority-Check Error’(001). ENDCASE. | Wa-percentage, ’%’. | Wa_sbook-loccurkey. | SELECT-OPTIONSname FORdata_object. | MESSAGE e045(bc400) WITH pa_car. ENDIF. | CALL SCREEN 100. | CLEAR wa_sbook. |


Читайте также:
  1. SET PF-STATUSи SET TITLEBAR

 

are automatically generated as a comment in the module. You can then remove the comment asterisks, enter the title and status descriptions, and create the title and status by means of forward navigation.

 

 

 

 

 

Figure 189: Including the Template


 

In order to load an available status (standard status for list or selection screen, status of another program) to your status as a template, you can use the menu Extras → Adjust Template in the Menu Painter. With this function, you can load the subobjects of any status to the current status.

 

 

 

 

Figure 190: Maintaining the Menu Bar in the Menu Painter

 

If so desired, the system will suggest standard values for your menu bar, which you can overwrite.

 

The menu bar can contain up to eight menus: You can define up to six of these yourself, the System and Help menus are standard and are added automatically by the system.


 

 

 
Figure 191: Maintaining the Function Key Assignment in the Menu Painter

 

Function key assignment is split into three areas:

 

Standard Toolbar

The buttons of the standard toolbar are linked to fixed corresponding function key (or combinations of function keys). For example, the pushbutton with the disk symbol is linked to the key combination Ctrl+S. This means

that functions that are assigned to the buttons of the standard toolbar by specifying the corresponding function code can also be triggered using the corresponding function key (combinations).

 

Recommended Function Key Settings

The system proposes the functions that you should generally assign to specific function keys. The user is accustomed to this assignment. Hence, you should not change them without a good reason.

 

Freely Assigned Function Keys

All other function key (combinations) that are freely assigned with function codes are listed.

 

You can also define buttons on an application toolbar for frequently used function keys. These pushbuttons can have icons or text or both.

 

Do not confuse the pushbuttons of the application tool bar with those that you can implement using the Layout Editor on the screen. Nonetheless, pushbuttons and function keys as well as the menu entries of a status have the same effect as pushbuttons that are placed directly on the screen. They enter their function code in the command field of the screen and trigger the field transport to the program as well as PAI processing. The functions of the list status that you have defined


 

yourself are an exception as they trigger the ABAP event AT USER-COMMAND, whereby the corresponding function code is transferred to the system field

sy-ucomm. For more information, refer to the keyword documentation for “AT USER-COMMAND” or course BC405 (list programming).

 

 

 

 

 

Figure 192: Referencing to Subobjects of an Available Status

 

You can use the icon depicted in the above graphic (or the F4 key) to display all subobjects (menu bars, function key assignments or application toolbars) that have already been defined for the program. When a subobject is selected, a reference is made to it. This means that you use the same subject in the local status. However, all functions of the subobject for the local status are automatically set to inactive (non-selectable). Functions that do make sense in the local status and are set up as selectable must now be activated. The following graphic illustrates this:


 

 

 
Figure 193: Setting Functions to Active or Inactive in the Status

 

You can use the pushbutton depicted in the graphic to also set functions to inactive. In our example, we reference the subobjects of the list status when we define the

screen status. In the screen status, if we add the new function code SAVE to the toolbar and the Flight data menu, then the system will tell us that the current status refers to the menu bar and toolbar of the list status and that a change is made to the original. If we confirm the dialog box, then the function code is added

to the menu bar or application toolbar of the list status. There, however, it is displayed as inactive.


 

 

303 Exercise 17: Creating an Interface

 

Exercise Duration: 40 Minutes

 

 

Exercise Objectives

 

After completing this exercise, you will be able to:

• Implement the GUI title and GUI status for the screens of your program

 

 

Business Example

 

The title and status are to be implemented for the screens (list and screen) of your program ZBC400_##_DYNPRO_1.

 

System Data

 

System: Will be assigned Client: Will be assigned User ID: Will be assigned Password: Will be assigned

Set up instructions: No special instructions when using a standard training

system

 

Task 1:

 

Implementing the GUI status (and title) for the list

 

1. Extend your program ZBC400_##_DYNPRO_1 or copy the template SAPBC400UDS_DYNPRO_3 to the new name ZBC400_##_DYNPRO_4 for further processing.

 

2. Create the status (type: Dialog Status) using forward navigation:

 

Use the appropriate processing block of your program for assigning the status to the list. Implement the corresponding assignment and create the status using forward navigation.

 

The status you are creating must correspond to the standard list status. Hence, load this to your status as a template. Change the name of the first menu from List to Bookings.

 

3. Add the function code SAVE. Users should be able to trigger this by choosing the Save pushbutton in the standard toolbar. Users should also be able to choose Save from an item in the Bookings menu. In this status, however, the function code should be inactive.

 

Activate the status and the program.

 

4. Optional: GUI title for the list

 

Continued on next page


 

Define and set a title for the basic list using forward navigation.

 

Task 2:

 

Implementing the GUI status (and title) for the screen

 

1. Create the status for your screen (type: Dialog Status) using forward navigation:

 

Use the appropriate part of your program for assigning the status to the screen. Implement the corresponding assignment and create the status using forward navigation.

 

2. Reference to the previously create list status. Activate the function codes

BACK and SAVE in the current status

 

3. Optional: GUI title for the screen

 

Define and set a title to the screen using forward navigation.


 

Solution 17: Creating an Interface

 

Task 1:

 

Implementing the GUI status (and title) for the list

 

1. Extend your program ZBC400_##_DYNPRO_1 or copy the template SAPBC400UDS_DYNPRO_3 to the new name ZBC400_##_DYNPRO_4 for further processing.

 

a) Carry out this step as usual.

 

2. Create the status (type: Dialog Status) using forward navigation:

 

Use the appropriate processing block of your program for assigning the status to the list. Implement the corresponding assignment and create the status using forward navigation.

 

The status you are creating must correspond to the standard list status. Hence, load this to your status as a template. Change the name of the first menu from List to Bookings.

 

a) In the program source code, add the SET PF-STATUS ’LIST’.

statement to the START-OF-SELECTION event.

Caution: Text between the two apostrophes must be in upper

case.

 

b) Double-click the status name in the SET PF-STATUS ’LIST’.

statement.

 

c) The system displays a dialog box containing the words “The GUI

interface status ‘LIST’ does not exist. Do you want to create it?” Choose Yes to confirm.

d) Enter the short text.

 

e) Choose the status type Dialog status.

 

f) In the Menu Painter, choose the menu Extras → Adjust Template to load the standard list status as a template.

 

g) Change the List name for the first menu to Bookings and confirm this in the dialog box that appears.

 

3. Add the function code SAVE. Users should be able to trigger this by choosing the Save pushbutton in the standard toolbar. Users should also be able to choose Save from an item in the Bookings menu. In this status, however, the function code should be inactive.

 

Continued on next page


 

Activate the status and the program.

 

a) In the standard toolbar, enter the function code SAVE above the Save

icon and choose Enter.

 

b) Double-click to open the Bookings menu, enter SAVE as a function code, and assign the text “Save bookings”.

 

c) Choose Active <-> Inactive to deactivate SAVE for this status. d) Activate the whole status and the program.

4. Optional: GUI title for the list

 

Define and set a title for the basic list using forward navigation.

 

a) In the START-OF-SELECTION processing block, add the SET TITLEBAR ’LIST’. statement.

 

b) Create the title using forward navigation and enter the title text in the dialog box.

 

c) Activate your program and the interface.

 

Task 2:

 

Implementing the GUI status (and title) for the screen

 

1. Create the status for your screen (type: Dialog Status) using forward navigation:

 

Use the appropriate part of your program for assigning the status to the screen. Implement the corresponding assignment and create the status using forward navigation.

 

a) Navigate to the change mode of screen 100. In the PBO block of the flow logic, add the statement MODULE STATUS_0100..

 

b) Create the module by means of forward navigation: double-click on itsname; choose Yes to confirm the settings in the dialog box. In the next dialog box, choose Main Program and add the following source code (or uncomment it):

 


Дата добавления: 2015-11-16; просмотров: 73 | Нарушение авторских прав


<== предыдущая страница | следующая страница ==>
MODULE user_command_100.| MODULE status_0100.

mybiblioteka.su - 2015-2024 год. (0.02 сек.)