1 / 38

Lesson 8: Input Screens II

Lesson 8: Input Screens II. Todd A. Boyle, Ph.D. St. Francis Xavier University. Input Screens. So far we have examined the radio button, text box, borders, and a simple push button.

mcarmody
Télécharger la présentation

Lesson 8: Input Screens II

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lesson 8: Input Screens II Todd A. Boyle, Ph.D. St. Francis Xavier University

  2. Input Screens • So far we have examined the radio button, text box, borders, and a simple push button. • We will now look at the push button in further detail, as well as the title bar, menu items, function keys, and icons.

  3. Program Goal • Design a flight report. • We will do this by first creating a very simple input screen. • You will then modify ZWSINCLASS31, creating your own custom input screen, similar to the following:

  4. Push Buttons • Instead of using the push button to simply run the report, we can program it to carry out other functions such as i.) creating an external file, or ii.) running the report and creating an external file.

  5. Push Buttons • We give each push button a function code (FctCode) value. • When we exit the screen and return back to the ABAP program, we can check to see which push button was pressed by using the SY-UCOMM system variable.

  6. Push Buttons • To illustrate, let us change our calculator program to use push buttons instead of a radio button. • We will create ADD and SUBTRACT push buttons. • We will give each push button a FctCode value. We will use values of ADD and SUB. • We will then return to the ABAP program and examine the SY-UCOMM variable to determine which push button was pressed.

  7. Push Buttons • We use the same technique for any push button. • Create the button (e.g., to write data to an external file). • Set the FctCode (e.g., FILE) • In the ABAP program, check if SY-UCOMM equals the FctCode, if they are equal, that button was pressed. CASE SY-UCOMM. WHEN ‘FILE’. write the data to the external file. WHEN second push button FctCode logic for second push button. ENDCASE.

  8. Menu Items • Now that we have FctCode values, we can create a menu item for each of our push buttons. • Menus are screen and program independent. • The menu is first displayed then the screen. • The menu is called by the screen in the PBO module.

  9. Next step • Return to the program • Activate the program • Activate the screen • Run the program

  10. Title bar • The last thing we will do to make the report look professional is add a title bar.

  11. Remember to activate • Make sure you activate the menu, screen, and program before running the report.

  12. A more realistic example • Now that we understand how to create a simple screen, let us try a more realistic example. • INCLASS91.DOC • See ZWSINCLASS91 for the solution.

More Related