Вы находитесь на странице: 1из 154

AB1002 - DEVELOPMENT WORKBENCH & ABAP4 DICTIONARY v2.

India SAP CoE, Slide 1

DEVELOPMENT WORKBENCH & ABAP4 DICTIONARY 1 2

Introduction Syntax Description


3

Demonstration
Exercises HelpMe

5
India SAP CoE, Slide 2

DEVELOPMENT WORKBENCH & ABAP4 DICTIONARY 1 2

Introduction Syntax Description


3

Demonstration
Exercises HelpMe

5
India SAP CoE, Slide 3

Introduction

ABAP dictionary is the central repository for creation and management of definitions used in ABAP. ABAP dictionary is integrated in ABAP workbench and therefore all tools of the workbench like Programs, Screens, function modules can actively access objects defined in data dictionary. ABAP workbench is an integrated tool for creating an ABAP application.

India SAP CoE, Slide 4

ABAP Dictionary
We shall see the each of the following Functions of the dictionary Tables in the ABAP dictionary Performance in table access Consistency through input checks Search helps Lock objects Views

India SAP CoE, Slide 5

DEVELOPMENT WORKBENCH & ABAP4 DICTIONARY 1 2

Introduction Syntax description


3

Demonstration
Exercises HelpMe

5
India SAP CoE, Slide 6

Functions of the dictionary

India SAP CoE, Slide 7

Functions of the dictionary


Type-definitions Database objects Services of the dictionary

India SAP CoE, Slide 8

Functions of the dictionary

India SAP CoE, Slide 9

Type definitions
Analogous to the predefined ABAP types such as C or I , one may define user-defined types in the dictionary. The following user-defined types are allowed Data elements: Describe an elementary type by defining the data type, length and possibly decimal places. Structures: Consist of components that can have any type.

Table types: Describe the structure of an internal table.

India SAP CoE, Slide 10

Type Definitions

Any complex user-defined type may be built using the previously mentioned basic types.

India SAP CoE, Slide 11

Database Objects

India SAP CoE, Slide 12

Services of ABAP Dictionary

F1-> Documentation for the data element F4-> Input help for screen fields
India SAP CoE, Slide 13

India SAP CoE, Slide 14

Tables in the dictionary

India SAP CoE, Slide 15

Tables in the dictionary


Database table and its components Two-level domain concept Various definitions of a table in the database Technical settings of a table Enhancements to tables (and structures)

India SAP CoE, Slide 16

Database table and its components

A database table is the central data structure of the ABAP/4 data dictionary.

India SAP CoE, Slide 17

Database table and its components

Describes the business context of a field Determines technical characteristics of a field

India SAP CoE, Slide 18

Two Level Domain Example

A domain defines a field technically and therefore it may be used at different business levels.

India SAP CoE, Slide 19

Definitions of Table in Database


In SAP R/3 tables are defined as A) Transparent tables: All of the fields of a dictionary table correspond to a field in the real database table. B) Pooled tables: Different tables which are not linked to each other with a common key are combined into a TABLE POOL. Several logical tables thus exist as a single real database table. C) Cluster tables: Several tables linked by a common key may sometimes be combined by the data dictionary and made to exist on the database schema as a single table. SAP is evolving R/3 tables in transparent tables.

India SAP CoE, Slide 20

Definitions of Table in Database

India SAP CoE, Slide 21

Technical Settings in Dictionary

India SAP CoE, Slide 22

Technical Settings in Dictionary

India SAP CoE, Slide 23

Technical Settings in Dictionary

India SAP CoE, Slide 24

Technical Settings in Dictionary


Logging

India SAP CoE, Slide 25

Enhancing dictionary elements


Enhance tables using Append structures. Enhance tables using Customizing includes.

India SAP CoE, Slide 26

Enhancement using Append structures

Append structures allow you to attach fields to a table without actually having to modify the table itself. You can use the fields in append structures in ABAP programs just as you would any other field in the table.
India SAP CoE, Slide 27

Enhancement using Append structures

Click on the append structure tab and opt to create new structure.

India SAP CoE, Slide 28

Enhancement using Append structures

Customers can add their own fields to any table or structure they want.

India SAP CoE, Slide 29

Enh. using Customizing includes

Some of the tables and structures delivered with the R/3 standard contain special include statements. These are often inserted in those standard tables that need to have customer-specific fields added to them. Such includes are Customizing includes. (CI).
India SAP CoE, Slide 30

Enh. using Customizing includes

A Customizing include is a structure that satisfies a special naming convention. (name begins with CI_).
India SAP CoE, Slide 31

Enh. using Customizing includes

Customers can add their own fields to any table or structure they want.

India SAP CoE, Slide 32

Append structures v/s Customizing includes


In contrast to append structures, Customizing includes can be inserted into more than one table. As an example the customizing include that we created (CI_DEMO) could be a part of multiple tables in the database whereas the append structure (ZDEMO_APPEND) can only be assigned to one table. (here MARA). This provides for data consistency throughout the tables and structures affected whenever the include is altered.

India SAP CoE, Slide 33

Performance during table access

India SAP CoE, Slide 34

Performance during table access


Indexes Primary and secondary indexes Structure of an index Accessing tables using indexes

Table buffering Advantages of buffering Concept of buffering Buffering types Buffer synchronization

India SAP CoE, Slide 35

Primary and secondary indexes


Index: Technical key of a database table. Primary index: The primary index contains the key fields of the table and a pointer to the non-key fields of the table. The primary index is created automatically when the table is created in the database. Secondary index: Additional indexes could be created considering the most frequently accessed dimensions of the table.

India SAP CoE, Slide 36

Structure of an Index

India SAP CoE, Slide 37

Accessing tables using Indexes

India SAP CoE, Slide 38

Database access using Buffer concept

Buffering allows you to access data quicker by letting you access it from the application server instead of the database.

India SAP CoE, Slide 39

Advantages of buffering
Table buffering increases the performance when the records of the table are read. As records of a buffered table are read directly from the local buffer of the application server on which the accessing transaction is running, time required to access data is greatly reduced. The access improves by a factor of 10 to 100 depending on the structure of the table and on the exact system configuration.

India SAP CoE, Slide 40

Concept of buffering

India SAP CoE, Slide 41

Buffering types

India SAP CoE, Slide 42

Buffering types

India SAP CoE, Slide 43

Buffering types

India SAP CoE, Slide 44

Synchronizing local buffers

India SAP CoE, Slide 45

Consistency through input checks

India SAP CoE, Slide 46

Consistency through input checks


Fixed values Value table Foreign key Field assignment using check field Foreign key table/check table Semantic attributes of foreign key Text table

India SAP CoE, Slide 47

Fixed values definition

India SAP CoE, Slide 48

Fixed values definition

India SAP CoE, Slide 49

Value table

India SAP CoE, Slide 50

Value Table

India SAP CoE, Slide 51

Foreign Key Definition

A foreign key creates a link between two tables T1 and T2. Every primary key field from T2 (check table) is assigned a field from table T1 (foreign key field). The fields from T1 assigned to primary key fields are marked as foreign key fields.
India SAP CoE, Slide 52

Foreign Key concept with an Example


Example: In this example, the foreign key table is table SBOOK. The purpose of the foreign key is to ensure that only valid counters of carriers can be assigned to a booking. Check table SCOUNTER contains exactly this information. Each counter is identified with three key fields in this table: MANDT, CARRID, and COUNTNUM. In order to define the foreign key, these three fields are assigned to fields of the foreign key table (foreign key fields) with which the input to be checked is entered on the screen. In table SBOOK these are the fields: MANDT, CARRID, COUNTER. The entry is accepted if it represents a valid counter; otherwise the system will reject it.

The foreign key is defined for field SBOOK-COUNTER (check field), which means that the entry in this field is checked. Field COUNTER is therefore called the check field for this foreign key.

India SAP CoE, Slide 53

Example foreign key

India SAP CoE, Slide 54

Foreign key check Feature

India SAP CoE, Slide 55

Violation of Foreign Key check


The flight cannot be booked because American Airlines (AA) does not have a counter 8. No data record is selected in table SCOUNTER for the entries in the example. The entry for table SBOOK is rejected.

India SAP CoE, Slide 56

Advantage of Foreign Key checks

India SAP CoE, Slide 57

Advantage of Foreign Key with an Example


The check table is the table whose key fields are checked. This table is also called the referenced table. An entry is to be written in the foreign key table. This entry must be consistent with the key fields of the check table. The field of the foreign key table to be checked is called the check field. Foreign keys can only be used in screens. Data records can be written to the table without being checked using an ABAP program.

Example: A new entry is to be written in table SPFLI (flight schedule). There is a check whether the airline carrier entered is stored in table SCARR (carrier) for field SPFLI-CARRID. The record is only copied to table SPFLI (foreign key table) if this is the case. A foreign key is defined for field SPFLI-CARRID (check field), i.e. the checks are on this field. The corresponding check table is table SCARR with the primary key fields MANDT and CARRID.

India SAP CoE, Slide 58

Semantic Attributes

India SAP CoE, Slide 59

Definition of Semantic Attributes


There are the following kinds of foreign key fields: Not specified: No information about the kind of foreign key field can be given No key fields/candidates: The foreign key fields are neither primary key fields of the foreign key table nor do they uniquely identify a record of the foreign key table (key candidates). The foreign key fields therefore do not (partially) identify the foreign key table. Key fields/candidates: The foreign key fields are either primary key fields of the foreign key table or they uniquely identify a record of the foreign key table (key candidates). The foreign key fields therefore (partially) identify the foreign key table. Key fields of a text table: The foreign key table is a text table of the check table, i.e. the key of the foreign key table only differs from the key of the check table in an additional language key field. This is a special case of the category Key fields / candidates.

India SAP CoE, Slide 60

Text Table

India SAP CoE, Slide 61

Text Table feature Table SMEAL contains the meals served to the passengers
during a flight. The meal names are maintained in table SMEALT.

Table SMEALT is the text table for table SMEAL since the key of SMEALT consists of the key of SMEAL and an additional language key field (field with data type LANG).
Table SMEALT can contain explanatory text in several languages for each key entry of SMEAL. To link the key entries with the text, the text table SMEALT must be linked with table SMEAL using a foreign key. Key fields of a text table must be chosen for the type of the foreign key fields. The foreign key relationship is defined from SMEALT to SMEAL. Only one text table can be created for a table.

India SAP CoE, Slide 62

Search Helps

India SAP CoE, Slide 63

Search helps
Standard search help Types of search helps Concept of search help Search Help Interface Dialog behavior of search helps Selection method for search helps Performance of search helps Attaching search helps Hierarchy of search helps

India SAP CoE, Slide 64

Standard Search Help

The input help (F4 help) is a standard function of the R/3 System. It permits the user to display a list of possible values for a screen field. A value can be directly copied to an input field by list selection.

India SAP CoE, Slide 65

TYPES OF SEARCH HELPS


Elementary search helps
Describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).

Collective search help


Combine several elementary search helps. A collective search help thus can offer several alternative search paths.

India SAP CoE, Slide 66

Block diagram of Search Help

Context data: You first have to define the context data to be used in the input help process. The context contains the information obtained in previous dialog steps and the entries already made by the user in the current input mask. This information is normally used to restrict the possible values for the current input field.

India SAP CoE, Slide 67

Block diagram of Search Help


Dialog behavior: It describes the order of the dialog windows to be displayed during the input help and what they should look like. Data collection method: It defines where the values offered to the user for selection come from. Return values: When a value is selected from the list of possible entries, it is stored in the search field. This often results in the contents of further screen fields, such as explanatory text, being updated. You therefore should define which values can be returned to the screen. In addition to describing an input help, you must define the fields for which it should be used. This is part of the field definition (of the search fields).

India SAP CoE, Slide 68

Search Help Interface

Search help interface determines how the exchange of values between the screen template and the selection method is implemented.

India SAP CoE, Slide 69

Value Transport for Input Helps

India SAP CoE, Slide 70

Description of dialog behavior

A hit list might contain plentiful number of entries. A dialog provides the user with an option to restrict the entries displayed on the hit list.
India SAP CoE, Slide 71

Dialog Types
The dialog type of an elementary search help defines how the hit list is displayed when the input help is called. It defines the dialog steps executed for input help.

India SAP CoE, Slide 72

Dialog Types
The following dialog types are possible: Immediate value display: The hit list is immediately displayed when the input help is called. This is only meaningful if the hit list usually only contains a few entries. Complex dialog with value restriction: The dialog window for restricting values is offered immediately. Choose this option if the list of possible entries is usually very large. If the user limits the amount of data to be processed, the hit list will become more comprehensible and the system load during value selection will be reduced. Dialog depending on number of values: If the hit list contains less than 100 entries, it is displayed immediately. If the hit list contains more than 100 entries, the dialog box for restricting values is displayed.

India SAP CoE, Slide 73

Selection method for Search help

Selection method refers to the database object (database table or view) from which data is selected and displayed in the hit list.
India SAP CoE, Slide 74

Performance of an Input help

We must ensure that the hit list is displayed in minimum time with minimum load on the system.

India SAP CoE, Slide 75

Performance of an Input Help


It is imperative to optimize accessing behavior especially when selection uses a view and thus more than one table. This can be done by restricting the hit list By additional restricting conditions from the context. Restricting conditions entered by the user in a dialog. Performance of the input help could be greatly improved by creating an index on the fields used to formulate the restrictions.

India SAP CoE, Slide 76

Attaching a search help to a field


A search help can influence the behavior of a field when the input help is called. The search help must be assigned to the field in order to do this. You have the following options for this assignment: Attach search help to a data element / table or structure field / screen field / check table. Conventionally search helps are attached to table fields or data elements. We shall see the same.

India SAP CoE, Slide 77

Attaching a search help to a table field

Choose the field name, click on search help tab and provide the name of the search help.

India SAP CoE, Slide 78

Attaching a search help to a table field

Attach the search help to the table field

India SAP CoE, Slide 79

Attaching a search help to a table field

The search help ZSTRAVELAG_NAME is therefore directly attached to the field AGENCYNUM of table ZSTRAVELAG.

India SAP CoE, Slide 80

Attaching a search help to a data element

Provide the search help name and the parameter name under the further characteristics tab of the data element.

India SAP CoE, Slide 81

Attaching a search help to a screen element


A search help can be directly assigned to a screen field in two ways. The name of the search help must be entered in the Screen Painter in the Attributes for the field in the field Search help. The name of the search help can be defined for selection screens in ABAP reports in the PARAMETERS or SELECT-OPTIONS statement directly following the supplement MATCHCODE OBJECT. However, input help is only available for this particular screen.

India SAP CoE, Slide 82

Collective search help

A Collective search help provides alternative search Paths by combining elementary search helps.

India SAP CoE, Slide 83

Collective search help

A collective search help also has interface parameters like an elementary search help.

India SAP CoE, Slide 84

Collective search help

Parameter assignment needs to be done for each of the Included search helps.

India SAP CoE, Slide 85

Collective search help

User may choose the tab and thus the elementary search method.
India SAP CoE, Slide 86

Lock objects

India SAP CoE, Slide 87

Lock Objects
Lock object concept Lock modes Creating a lock object (example) Lock object sample code

India SAP CoE, Slide 88

Lock Objects
SAP data dictionary provides you with a locking mechanism to synchronize simultaneous data access by different users.

India SAP CoE, Slide 89

Lock Objects
Lock objects are created in SE11. Customer lock objects must begin with EY or EZ .

Three possible lock modes exist for lock objects.

India SAP CoE, Slide 90

Lock Mode
Lock Mode E (Extensible) X (Exclusive) S (Shared) Meaning Lock for data change (accumulative exclusive lock) Lock for data change (exclusive write lock) Lock for protected data display (shared lock)

Lock Mode

Lock mode E: This sets a lock for changing data for single user. This lock can be accumulated. Lock mode X: This mode is used like mode E for changing data. The only technical difference from mode E is that the respective lock does not allow accumulation.
SAP AG 2002

Lock mode S: This mode ensures that data displayed in your program cannot be changed by other users during the entire display time. Here you do not want to change the data yourself (allows read only access for data).
India SAP CoE, Slide 91

Creating Lock object

Enter lock object name beginning with EY or EZ and hit create.

India SAP CoE, Slide 92

Creating Lock object

Enter table names containing data records that should be locked and the lock mode.

India SAP CoE, Slide 93

Creating Lock object

The primary keys of the specified tables are automatically selected as lock parameters.

India SAP CoE, Slide 94

Creating Lock object


To set a lock in the application program call a function module ENQUEUE_<LOCK_OBJECT>. For our example, it would be ENQUEUE_EZMARA. To release the lock in the application program call a function module DEQUEUE_<LOCK_OBJECT>. For our example, it would be DEQUEUE_EZMARA. Refer the code executed by user (say abap1) for matnr = 000000000000000012.

India SAP CoE, Slide 95

Creating Lock object

India SAP CoE, Slide 96

Creating Lock object

If another user (say abap2) tries to access the same data i.e. matnr = 000000000000000012,via a program or a transaction it would deny him read or write access.

India SAP CoE, Slide 97

Parameters in Enqueue Module


Parameters in ENQUEUE Module
Parameters
mode_< TabName >

Values
'E' 'X' 'S'

Meaning
Exclusive lock (accumulative) Exclusive lock (not accumulative) Shared lock (accumulative) Field value to be used for locking Lock acc. to corresponding lock parameter (Default) Lock for table line with initial field value Lock remains in program Lock passed to V1 update (default) Lock in program + passed to V1 update If external lock, no further lock attempt (default) If external lock, second lock attempt Setting lock without local lock container (default) Setting lock with local lock container

<Lock parameter> x_<Lock parameter>

<Value> SPACE 'X'

_scope

'1' '2' '3'

_wait

SPACE 'X'

_collect

SPACE 'X'

SAP AG 2002

India SAP CoE, Slide 98

Views

India SAP CoE, Slide 99

Views
Importance/Use of views Join/Projection/Selection w.r.t views Inner and Outer joins Types of views Database view Projection view Maintenance view Help view

India SAP CoE, Slide 100

Importance/Use of Views
Data for an application object is often distributed on several database tables. Database systems therefore provide you with a way of defining application-specific views on the data contained in several tables. These are called views. Data from several tables can be combined in a meaningful way using a view (join). You can also hide information that is of no interest to you (projection) or only display those data records that satisfy certain conditions (selection).

India SAP CoE, Slide 101

Join, Projection and Selection


CROSS PRODUCT Given two tables TABA and TABB. Table TABA has 2 entries and table TABB has 4 entries

Each record of TABA is first combined with each record of TABB. If a join condition is not defined, the cross product of tables TABA and TABB is displayed with the view.
India SAP CoE, Slide 102

Join, Projection and Selection


Join condition
A join condition describes how the records of the two tables are connected.

India SAP CoE, Slide 103

Inner Join and Outer Join


The data that can be selected with a view depends primarily on whether the view implements an inner join or an outer join. With an inner join, you only get the records of the cross-product for which there is an entry in all tables used in the view. With an outer join, records are also selected for which there is no entry in some of the tables used in the view. (ABAP allows left outer join.)

India SAP CoE, Slide 104

Join, Projection and Selection


Projection
Sometimes some of the fields of the tables involved in a view are not of interest. The set of fields used in the view can be defined explicitly (projection). In our example, Field 4 is of no interest and can be hidden.

India SAP CoE, Slide 105

Join, Projection and Selection


Selection Conditions
Selection conditions that are used as a filter can be defined for a view.

India SAP CoE, Slide 106

View Types
Four different view types are supported. These differ in the way in which the view is implemented and in the methods permitted for accessing the view data . Database views are implemented with an equivalent view on the database. Projection views are used to hide fields of a table (only projection). Help views can be used as selection method in Search help. Maintenance views permit you to maintain the data distributed on several tables for one application object at one time.

India SAP CoE, Slide 107

Database Views
Database views should be created if want to select logically connected data from different tables simultaneously. Database views implement an inner join. Application programs can access the data of a database view using the database interface. (Just as we write select queries on database tables, we can write them for views as well.)

India SAP CoE, Slide 108

Includes in Database Views


An entire table can be included in a database view. In this case all the fields of the included table will become fields of the view (whereby you can explicitly exclude certain fields). To include one of the tables in the view, enter character * in field View field, the name of the table to be included in field Table and character * again in field Field name on the View fields tab page of the maintenance screen of the view. You can also exclude individual fields of an included table. If you do not want to include a field of the included table in the view, enter - in field View field, the name of the included table in field Table and the name of the field to be excluded in field Field name.

India SAP CoE, Slide 109

Inserts with Database Views


If a database view contains only one single table, data can be inserted in this table with the view .

You have the following options for the contents of the table fields not contained in the view: If the field is defined on the database with NOT NULL as initial value, the field is filled with the corresponding initial value.
If the field is defined on the database as NOT NULL without initial value, an insert is not possible. This results in a database error.

If the field is not defined on the database as NOT NULL, there will be a NULL value in this field.

India SAP CoE, Slide 110

Projection Views
Projection views are used to hide fields of a table. This can minimize interfaces; for example when you access the database, you only read and write the field contents actually needed

India SAP CoE, Slide 111

Maintenance Views
A maintenance view permits you to maintain the data of an application object together. The maintenance status determines which accesses to the data of the underlying tables are possible with the maintenance view.

India SAP CoE, Slide 112

Maintenance Status
The maintenance status of a view controls whether data records can also be changed or inserted in the tables contained in the view. The maintenance status can be defined as follows: Read only: Data can only be read through the view. Read, change, delete, insert: Data of the tables contained in the view can be changed, deleted, and inserted through the view. Read and change: Existing view entries can be changed. However, records cannot be deleted or inserted. Read and change (time-dependent views): Only entries whose non-time dependent part of the key is the same as that of existing entries may be inserted.

India SAP CoE, Slide 113

Help Views
Help view is created if a view with outer join is needed as selection method of a search help.

India SAP CoE, Slide 114

Restrictions for Maintenance and Help Views


There are some restrictions for selecting the secondary tables of a maintenance view or help view. The secondary tables have to be in an N:1 dependency to the primary table or directly preceding secondary table. This ensures that there is at most one dependent record in each of the secondary tables for a data record in the primary table.

India SAP CoE, Slide 115

Append Views
Append views are used for enhancements of database views of the SAP standard. With an append view, fields of the base tables of the view can be included in the view without modifications. This is analogous to enhancing a table with an append structure. An append view is assigned to exactly one database view. More than one append view can be created for a database view.

India SAP CoE, Slide 116

DEVELOPMENT WORKBENCH & ABAP4 DICTIONARY 1 2

Introduction Syntax Description


3

Demonstration
Exercises HelpMe

5
India SAP CoE, Slide 117

Demonstration
1) Steps to create a Transparent Table 2) Steps to create a Data Element. 3) Steps to create a Domain 4) Steps to create a Database View 5) Steps to create an Elementary Search Help 6) Steps to create a Collective Search Help

India SAP CoE, Slide 118

Create transparent table

Go to transaction SE11. Enter name of table you want to create (beginning with Y or Z) and click on create pushbutton
India SAP CoE, Slide 119

Create transparent table

Enter the delivery class and the table maintenance criteria


India SAP CoE, Slide 120

Create transparent table

Enter the name of the table field and the data element. The System automatically populates the technical details for existing data elements.
India SAP CoE, Slide 121

Create transparent table

To create a data element simply double click on it. Alternately create a data element by simply choosing the data type radio button on SE11 initial screen.
India SAP CoE, Slide 122

Create data element

The system prompts you to create a new data element. Choose the Yes pushbutton.
India SAP CoE, Slide 123

Create data element

Under the data type tab enter the domain name which determines the technical characteristics of the field.
India SAP CoE, Slide 124

Create domain

If the domain does not exist in the data dictionary the system prompts you to create one.
India SAP CoE, Slide 125

Create domain

Give the technical characteristics under the definition tab. Value range allows you value restriction at domain level.
India SAP CoE, Slide 126

Currency/Quantity fields in a table

A currency or a quantity field must be assigned a reference field from a reference table containing applicable qty unit or currency unit.
India SAP CoE, Slide 127

Currency/Quantity fields in a table

A field containing currency amounts (data type CURR) must be assigned a reference field including the currency key (data type CUKY).
India SAP CoE, Slide 128

Create transparent table

Maintain the technical settings of the table by clicking on the tab


India SAP CoE, Slide 129

Create database view


Enter the name of the view on in the initial screen and say create.

Choose database view as the view type.


India SAP CoE, Slide 130

Create database view

Enter the table names and the join conditions for the database view.

India SAP CoE, Slide 131

Create database view

Under the tab View Flds, specify the names of the fields from either table whose data you want to access using the view.
India SAP CoE, Slide 132

Create database view

The system allows you to enter data restricting conditions under the tab Selection conditions.

India SAP CoE, Slide 133

Create database view

Finally enter the maintenance status.

India SAP CoE, Slide 134

Elementary Search Help

Enter the search help name and click on create.

India SAP CoE, Slide 135

Elementary Search Help

Choose elementary search help radio button option as the search help type.

India SAP CoE, Slide 136

Elementary Search Help

Enter the search help parameters, the selection method and activate the search help.
India SAP CoE, Slide 137

Collective Search Help

Enter the search help name and click on create.


India SAP CoE, Slide 138

Collective Search Help

Choose Collective search help radio button option as the search help type.

India SAP CoE, Slide 139

Collective Search Help

Enter the search help parameters.


India SAP CoE, Slide 140

Collective Search Help

Instead of the selection method, we enter the included search helps for the collective search help.

India SAP CoE, Slide 141

Collective Search Help

We need to assign parameters for each of the included search helps.


India SAP CoE, Slide 142

Collective Search Help

Complete the parameter assignment by clicking on the push button


India SAP CoE, Slide 143

Collective Search Help

Collective search help offers the user to obtain F4 help using any of the included search helps.
India SAP CoE, Slide 144

DEVELOPMENT WORKBENCH & ABAP4 DICTIONARY 1 2

Introduction Syntax Description


3

Demonstration
Exercises HelpMe

5
India SAP CoE, Slide 145

Exercises
1 Foreign Key Relationship I Maintain the foreign key relationships of your tables ZEMPLOYxx and ZFUNCTIONxx. Define a foreign key check for each of the following fields: ZEMPLOYxx-Client ZEMPLOYxx-Carrier ZEMPLOYxx-Function or ZFUNCTIONxx-Client ZFUNCTIONxx-Carrier or ZSALARYxx-Client ZSALARYxx-Carrier ZSALARYxx-Function ZSALARYxx-Currency
India SAP CoE, Slide 146

Use the tables of the flight model or tables T000 (client) and TCURC (currency codes) in addition to your tables to define the foreign key. Maintain the data for your table ZEMPLOYxx. Reconsider the settings made for Problem 1! 2 Foreign Key Relationship II Some employees of carriers work in travel agencies in order to sell flights for their companies there. Enhance table ZEMPLOYxx by a field that is assigned to each employee or to the travel agency in which he or she works.
Enhance table ZEMPLOYxx accordingly. Maintain the foreign key relationship and some data records.

India SAP CoE, Slide 147

Exercise
3 Foreign Key Relationship III (Supplementary exercise) Create a text table ZFUNCTIONTxx for table ZFUNCTIONxx to define the function of the employees of the carriers in all countries.

Create the corresponding table and use the standard data elements SPRAS and S_TEXT for the field definition. Maintain the foreign key relationships.

India SAP CoE, Slide 148

DEVELOPMENT WORKBENCH & ABAP4 DICTIONARY 1 2

Introduction Syntax Description


3

Demonstration
Exercises HelpMe

5
India SAP CoE, Slide 149

HelpMe

Tips and Tricks Additional Info

India SAP CoE, Slide 150

HelpMe
Tips and Tricks
Some useful transaction codes: 1) Dictionary maintenance (SE11) 2) Dictionary display (SE12) 3) R/3 Repository Information System (SE84) 4) Repository Information System ABAP Dictionary (SE15) 5) Data display/maintenance (Data Browser) (SE16) 6) Technical settings (SE13) 7) Database utility (SE14) 8) Table view generation (SE54) 9) Extended table maintenance (SM30)

India SAP CoE, Slide 151

HelpMe
Start

Additional Info

Decision Tree for Buffering

Are temp. inconsistencies in the read data acceptable? Are most accesses read only? Yes
Table may be buffered.

No

Table may not be buffered.

Is the expected table size smaller than 8KB? No Is the table mostly accessed with SELECT SINGLE? No Is the expected table size larger than 1MB (>> 1000 records)? No

Yes

Full buffering

Yes

Single-record buffering Buffering depends on installation. Further considerations must be made: Full or generic buffering possible? Secondary indexes or buffering? Generic buffering with suitable number of generic key fields Full buffering

Yes

Yes Is a left-justified part of the key usually specified when the table is accessed?
SAP AG 2002

No

India SAP CoE, Slide 152

HelpMe
Base table 1

Additional Info

View as Selection Method of a Search Help

Base table 2

DB view

Primary table

Secondary table

Help view
SAP AG 2002

India SAP CoE, Slide 153

HelpMe

Resolution of conflict in case multiple search helps exist for a field.

India SAP CoE, Slide 154

Вам также может понравиться