Post on 25-Dec-2015
description
transcript
© IBM Corporation 2013
(Optional client logo can
be placed here)
IBM Global Business Services
Course Title
Module 4: Module 4: ABAP Dictionary
IBM Global Business Services
© IBM Corporation 2013ABAP Dictionary3
Housekeeping
Breaks Washrooms Transportation / parking No pagers or cell phones Participation Parking lot issues Questions
IBM Global Business Services
© IBM Corporation 2013ABAP Dictionary4
Module objectives
At the completion of the module, the participants should be able to: Use ABAP dictionary fields in the screen Use ABAP dictionary fields in the program Understand ABAP dictionary integration
IBM Global Business Services
© IBM Corporation 2013ABAP Dictionary5
Module agenda
The topics dealt in this module are: Academy Awards Table Academy Awards Online program ‘Paint’ Dictionary fields Element list for Dictionary Fields Use Dictionary fields Online Help for Dictionary fields ABAP Dictionary integration
IBM Global Business Services
© IBM Corporation 2013ABAP Dictionary6
Academy Awards Table
YMOVIE
Database Table
AAYear
Category
Winner
Notes
Critic
For this module, we will use an ABAP Dictionary table created for the purpose ofdemonstrating Online programming techniques. This table is named ‘YMOVIE’ andit contains information about the Academy Awards.
IBM Global Business Services
© IBM Corporation 2013ABAP Dictionary7
Academy Awards Online program
All of these screen fields, except for the Academy
Awards title, will be ‘painted’ from ABAP
Dictionary fields.
IBM Global Business Services
© IBM Corporation 2013ABAP Dictionary8
‘Paint’ Dictionary fields
Select the desired fields.
By selecting a ‘Key word’ size, you will get a text field.
To ‘paint’ fields from the ABAP Dictionary, make sure you are in the Layout view. Use the ‘Goto-> Secondary Window->Dict/program fields’ menu path in the Screen Painter.
IBM Global Business Services
© IBM Corporation 2013ABAP Dictionary9
Element list for Dictionary Fields
The fields ‘painted’ from the ABAP Dictionary are automatically named
‘<table name>-<field name>’.
Screen Painter
These fields are marked as
referring to ABAP Dictionary fields.
IBM Global Business Services
© IBM Corporation 2013ABAP Dictionary10
Use Dictionary fields
** MZA01O01 - PBO Modules **
MODULE INITIALISE OUTPUT.
CLEAR YMOVIE.
ENDMODULE.
** MZA01TOP - Top Include **
PROGRAM SAPMZA01.
TABLES YMOVIE.
PROCESS BEFORE OUTPUT.
MODULE INITIALIZE.
PROCESS AFTER INPUT.
MODULE SELECT_LISTING.
Screen 9000
** MZA01I01 - PAI Modules **
MODULE SELECT_LISTING INPUT.
* code to select record from YMOVIE
ENDMODULE.
When you ‘paint’ screen fields from
the ABAP Dictionary, you definethe program fields with the
‘TABLES’ statement.
IBM Global Business Services
© IBM Corporation 2013ABAP Dictionary11
Online Help for Dictionary fields
Data element
short text
Data element documentation
Data element supplemental
documentation
System-wide
Automatic
System-wide
Only if maintained
Screen-specific
Only if maintained
If a screen field is ‘painted’ from the ABAP Dictionary, it points to a data element and the data element’s
online help.
F1
IBM Global Business Services
© IBM Corporation 2013ABAP Dictionary12
ABAP Dictionary integration
Notice change in ‘Category’ field length
Execute transaction
If a change is made to an ABAP Dictionary field (for example, category length is changed from 3 to 6 characters) and the appropriate Dictionary objects are
reactivated, the change will take effect throughout the system where this field is used.
Execute transaction
IBM Global Business Services
© IBM Corporation 2013ABAP Dictionary13
Demonstration / Practice
Creating a screen with fields having reference to the ABAP Dictionary.
IBM Global Business Services
© IBM Corporation 2013ABAP Dictionary14
Summary of the lesson learnt so far
1. To ‘paint’ fields from the ABAP Dictionary, make sure you are in the Layout view. Use the ‘Goto-> Secondary Window->Dict/program fields’ menu path in the Screen Painter.
2. If you go to the Element List (field types view), the screens fields ‘painted’ from the ABAP Dictionary are automatically named ‘<table name>-<field name>’.
3. To create the program fields with the same names as the screen fields ‘painted’ from the ABAP Dictionary, you should use the ‘TABLES’ statement in the Top Include.
4. A screen field that is ‘painted’ from the ABAP Dictionary points to a data element. The data element has online help associated with it. If the cursor is positioned in the screen field and the ‘F1’ key is pressed, the system displays a dialog box with this online help.
5. The ABAP Dictionary is integrated throughout the SAP system.
IBM Global Business Services
© IBM Corporation 2013ABAP Dictionary15
Answer a few questions
1. What is the menu path for referring ABAP Dictionary fields to the screen?2. When a screen field is painted from the ABAP Dictionary, does it point to the
data-element’s documentation?
IBM Global Business Services
© IBM Corporation 2013ABAP Dictionary16
Module summary
Now that we have completed the module, we should be able to: Use ABAP dictionary fields in the screen Use ABAP dictionary fields in the program Understand ABAP dictionary integration