Sie sind auf Seite 1von 13

IBM Global Services

ABAP Dictionary

ABAP Dictionary |

Dec-2008

2005 IBM Corporation

IBM Global Services

Objectives
The participants will be able to:
Use ABAP dictionary fields in the screen.
Use ABAP dictionary fields in the program.
Understand ABAP dictionary integration.

ABAP Dictionary |

Dec-2008

2005 IBM Corporation

IBM Global Services

Academy Awards Table


For this chapter and many of the following chapters, we will use an ABAP
Dictionary table created for the purpose of demonstrating online programming
techniques. This table is named YMOVIE and it contains information about the
Academy Awards.

YMOVIE
Database Table
AAYear
Category
Winner
Notes
Critic

ABAP Dictionary |

Dec-2008

2005 IBM Corporation

IBM Global Services

Academy Awards Online Program


All of these screen fields,
except for the Academy
Awards title, will be
painted from ABAP
Dictionary fields.

ABAP Dictionary |

Dec-2008

2005 IBM Corporation

IBM Global Services

Paint Dictionary Fields


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
Select the desired fields.

ABAP Dictionary |

By selecting a Key word size,


you will get a text field.

Dec-2008

2005 IBM Corporation

IBM Global Services

Element List for Dictionary Fields


Screen Painter

These fields are


marked as
referring to ABAP
Dictionary fields.

The fields painted from the


ABAP Dictionary are
automatically named
<table name>-<field name>.
6

ABAP Dictionary |

Dec-2008

2005 IBM Corporation

IBM Global Services

Use Dictionary Fields

When you
paint screen fields from
the ABAP Dictionary, you define
the program fields with the
TABLES statement.

** MZA01TOP - Top Include **


PROGRAM SAPMZA01.
TABLES YMOVIE.

** MZA01O01 - PBO Modules **


Screen 9000

MODULE INITIALISE OUTPUT.


CLEAR YMOVIE.

PROCESS BEFORE OUTPUT.

ENDMODULE.

MODULE INITIALIZE.
** MZA01I01 - PAI Modules **
PROCESS AFTER INPUT.
MODULE SELECT_LISTING.

MODULE SELECT_LISTING INPUT.


* code to select record from YMOVIE
ENDMODULE.

ABAP Dictionary |

Dec-2008

2005 IBM Corporation

IBM Global Services

Online Help for Dictionary Fields


If a screen field is
painted from the
ABAP Dictionary,
it points to a data
element and the
data elements
online help.

F1

Data element
short text
Data element
documentation
Data element
supplemental
documentation

system-wide
automatic

system-wide
only if maintained

screen-specific
only if maintained
8

ABAP Dictionary |

Dec-2008

2005 IBM Corporation

IBM Global Services

ABAP Dictionary Integration

Execute
transaction

If a change is made to an ABAP Dictionary field (e.g., 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

ABAP Dictionary |

Notice change
in Category
field length

Dec-2008

2005 IBM Corporation

IBM Global Services

Demonstration
Creating a screen with fields having reference to the ABAP Dictionary.

10

ABAP Dictionary |

Dec-2008

2005 IBM Corporation

IBM Global Services

Practice
Creating a screen with fields having reference to the ABAP Dictionary.

11

ABAP Dictionary |

Dec-2008

2005 IBM Corporation

IBM Global Services

Summary
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.
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>.
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.
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.
The ABAP Dictionary is integrated throughout the SAP system.

12

ABAP Dictionary |

Dec-2008

2005 IBM Corporation

IBM Global Services

Questions
What is the menu path for referring ABAP Dictionary fields to the screen in screen
painter ?
When a screen field is painted from the ABAP Dictionary, does it point to the dataelements documentation ?

13

ABAP Dictionary |

Dec-2008

2005 IBM Corporation

Das könnte Ihnen auch gefallen