Файл: BC430_EN_Col62_FV_Part_A4_-_ABAP_Dictionary.pdf

ВУЗ: Не указан

Категория: Не указан

Дисциплина: Не указана

Добавлен: 03.04.2021

Просмотров: 2286

Скачиваний: 40

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.
background image

BC430

Lesson: Maintenance Views

3.

Generate a maintenace interface for the view.

a)

Choose

Utilities

Table maintenance generator

.

b)

Enter authorization group

SUNI

and function group

ZZBC430##

in the next screen.

c)

Mark maintenance type

one-step

. Select number

0100

as maintenance

screen number of the overview screen.

d)

Choose

Create

. The development class of the function group and the

generated maintenance objects are prompted. In both cases, choose

Local object

.

4.

Then maintain the data of a new travel agency using the enhanced table
maintenance. Choose

System

Services

Table maintenance

Enhance.

Tab.maint.

.

a)

Enter the data of a new travel agency.

b)

With the Data Browser (in the menu environment of the initial screen
of the ABAP Dictionary), verify that the data of the new travel agency
was written in tables SBUSPART and STRAVELAG.

Task 2:

Bundle maintenance view in a view cluster.

Note:

You want to serve several maintenance views of dependent tables

on one single transaction screen. To do this, create a complex maintenance
view over several customer tables. In this exercise, use the table from the
flight data model again. You will copy these tables including their entire
content on the customer namespace.

1.

First of all copy the tables SCARR, SPFLI and SFLIGHT into the customer
namespace with attached monitor number (ZCARR##, ZPFLI## und
ZFLIGHT##). Maintain the foreign keys appropriately in the new tables.

a)

Copy and activate the tables using the SE11. Adjust the foreign key
relationships ZPFLI## (CARRID -> ZCARR##) and ZFLIGHT##
(CARRID -> ZCARR##, CONNID -> ZPFLI##)

2.

Copy the content of the original tables into the newly created tables using a
report.

a)

See source text of the model solution. You can also find and copy the
respective report in the system.

Continued on next page

2006/Q2

© 2007 SAP AG. All rights reserved.

203


background image

Unit 7: Views and Maintenance Views

BC430

3.

Create a two-step maintenance view (screen numbers e.g. 100 and 110)
for every table copied.

a)

You have two possibilities to go into the suitable screen of the
transaction SE54:

1.

In SE11, go to the corresponding table via menu path

Utilities ->

Table maintenance generator

into the generation environment.

2.

Start transaction SE54 and enter the repsective table.

Select

Generated object

and press the

Create/Change

button.

b)

In the next screen, enter the authorization group

SUNI

and, as function

group, the respective table names with the prefix

ZFP_

.

c)

Mark the maintenance type

two-step

. Select the numbers

0100

and

0110

as maintenance screen numbers of the overview screen and

of the individual screen.

d)

Choose

Create.

The development class of the function group and the

generated maintenance objects are prompted. In both cases, choose

Local object

.

e)

Proceed as with all copied tables.

4.

Create a view cluster with the name

ZPC_FLIGHT##

.

a)

Start the transaction SE54. In the initial screen, choose

Edit View

Cluster

to access the screen for editing/creating a view cluster.

b)

Enter the name of the cluster in the

View cluster

field.

c)

Press the button

Create/Change

.

d)

Ignore the message “No changes please (data belong to SAP)”. As long
as you stay in the customer namespace (Z* or Y*), this message is
meaningless. More exact information in

SAP Note No.: 671067

5.

Give a meaningful short description in the header entry.

6.

Change to the object structure and enter the following new entries:

Continued on next page

204

© 2007 SAP AG. All rights reserved.

2006/Q2


background image

BC430

Lesson: Maintenance Views

View/Tab.

Short description

Prede-

cessor

Dep

Pos

ZCARR##

Carriers

ZCARR##

R

1

ZPFLI##

Flight connections

ZCARR##

S

2

ZFLIGHT##

Flights of the connection ZPFLI##

S

3

a)

In the navigation window, double-click

Dialog structure

on the

Object

structure

node

b)

Press the button

New entries

.

c)

Enter the values respectively in the table.

d)

Select the ZCARR## table as the initial object via the

START

column.

7.

Generate the field dependencies for every entry in the list.

a)

Mark every line of the object structure and generate respectively the
field dependencies via the button

Field dependency

8.

Activate the view cluster

a)

Double-click the dialog for the

header entry

and press the button

Activate

9.

Generate a new entry for an airline and create two flights each for these two
new flight connections. Output the new entries via a report in a list.

a)

Call up the transaction SM34.

b)

Enter the name of your view cluster in the input field and activate the

Maintain

button.

c)

Import the new entries, beginning with

ZCARR

.

Note:

You can navigate on the left-hand side of the screen and

enter or change the data on the right-hand side.

d)

The data are written on the database by using the

Save

button.

e)

Write a report with the SE38 or the SE80 in

ABAP

, which issues the

entries for the new carrier.

Result

REPORT

SAPBC430S_FILL_CLUSTER_TAB

.

DATA wa_scarr

TYPE scarr.

DATA wa_spfli

TYPE spfli.

DATA wa_flight TYPE sflight.

Continued on next page

2006/Q2

© 2007 SAP AG. All rights reserved.

205


background image

Unit 7: Views and Maintenance Views

BC430

DATA my_error TYPE i VALUE 0.

START-OF-SELECTION.

* Replace ## by Your user-number

DELETE FROM zcarr##.

DELETE FROM zpfli##.

DELETE FROM zflight##.

SELECT * FROM scarr INTO wa_scarr.

INSERT INTO zcarr## VALUES wa_scarr.

ENDSELECT.

IF sy-subrc = 0.

SELECT * FROM spfli INTO wa_spfli.

INSERT INTO zpfli## VALUES wa_spfli.

ENDSELECT.

IF sy-subrc = 0.

SELECT * FROM sflight INTO wa_flight.

INSERT INTO zflight## VALUES wa_flight.

ENDSELECT.

IF sy-subrc <> 0.

my_error = 1.

ENDIF.

ELSE.

my_error = 2.

ENDIF.

ELSE.

my_error = 3.

ENDIF.

IF my_error = 0.

WRITE / 'Datatransport successfully finished'.

ELSE.

WRITE: / 'ERROR:', my_error.

ENDIF.

206

© 2007 SAP AG. All rights reserved.

2006/Q2


background image

BC430

Lesson: Maintenance Views

Lesson Summary

You should now be able to:

Create a maintenance view

Create simple maintenance views

Create complex maintenance views

2006/Q2

© 2007 SAP AG. All rights reserved.

207