Entering content frame

Background documentation Data Model for the Bookshop Tutorials Locate the document in its SAP Library structure

The data model described here in the basis of the bookshop tutorials.

In the package SBOOKSHOP in your system, you will find the following database tables and other objects used in the tutorials. Only the most important objects are listed here. For a complete list, see the Object Navigator in your system.

Database Tables

SBOOKSHOP contains the following database tables:

Table Name

Key Fields

Other Fields

Meaning

BSAUTHORS

MANDT

ISBN

AUTHFNAME

AUTHLNAME

AUTHFNAM

AUTHLNAM

In addition to the client for each book, this table also contains the ISBN and the first and last names of the author, written once in standard case and once in upper case.

BSBOOK

MANDT

ISBN

TITLE

SUBTITLE

SERIES

PUBLISHER

PUBLYEAR

BOOKPAGES

PRICE_RAW

CURRENCY

COUNTRY

This table contains the titles of the books available in the bookshop.
ISBN and client are the key fields.
The other fields are title, sub-title, book series, publisher, year of publication, number of pages, the recommended retail price, the currency (euro), and the country code.

BSCATALOG

MANDT

CATA_ID

ISBN

CURRENCY

OUR_PRICE

DELIVERY

COVER_URL

This table represents the book catalog.
Each book has a unique number, the
CATA_ID. The CATA_ID and the ISBN number are the key fields for this table.
The other fields are currency (euro), price in our shop, expected delivery time, and the URL of a picture of the book cover.

BSCUSTOMER

MANDT

CUSTOMERID

TITLE

SURNAME

FIRSTNAME

COMPANY

STREET

ZIP

CITY

COUNTRY

DISCOUNT

USRPWD

This is the customer table. All customer data is stored here.
The customer’s e-mail address (this must be unique) and the client are used as the key field.
The other fields are title, first name and surname of the customer, customer address (street, postcode, city, and country), details of any discount arrangement with the customer, and the customer’s password.

BSKEYWORD

MANDT

ISBN

KEYWORD

 

In addition to the client this table contains a keyword for an ISBN.

BSORDER

MANDT

CUSTOMER

ORDER_ID

ISBN

ORDERDATE

AMOUNT

STATUS

This table contains all the orders.
The key fields are the client, the customer ID (that is, the e-mail address), the order ID (assigned when the order is placed), and the ISBN.
Other fields are the date of the order, the number of books ordered, and the order status.

BSTEXTS

MANDT

RELID

SRTFD

SRTF2

ISBN

TEXT_TYPE

REVIEW_NO

INPUTDATE

CLUSTR

CLUSTD

This is the table for long texts in the bookshop.
The key fields are the client, the area in the import/export data table, the user-defined key part of the table
INDX, and the next record counter in the import/export data table.

The other fields are ISBN, the type of a long text in the bookshop, an internal field, the date, a field length for user data, and a database field for the IMPORT/EXPORT tables.

Classes and Methods

The bookshop has the class CL_BOOK_SHOP. This class includes the following methods:

Method

Parameter

Description

SEARCH_BOOK

Book search

 

TITLE

This graphic is explained in the accompanying text Book title

 

AUTHOR

This graphic is explained in the accompanying text Surname of author

 

PUBLISHER

This graphic is explained in the accompanying text Publisher

 

KEYWORD

This graphic is explained in the accompanying text Key words

 

ISBN

This graphic is explained in the accompanying text ISBN

 

ISBN_TAB

This graphic is explained in the accompanying text Table of ISBNs

GET_BOOK_DATA

Reading the book table

 

ISBN_TAB

This graphic is explained in the accompanying text Table of ISBNs

 

BOOKCAT_TAB

This graphic is explained in the accompanying text Table of books

MAINTENANCE_SCREEN

Input and output of book data on the screen

 

NEW_ENTRY

This graphic is explained in the accompanying text Indicator

 

ISBN

This graphic is explained in the accompanying text ISBN

GET_ITEM

Reading a catalog entry

 

CAT_ID

This graphic is explained in the accompanying text Bookshop index

 

BOOK_DATA

This graphic is explained in the accompanying text Structure for transferring all relevant data for a book

CHECK_ISBN

ISBN check

 

ISBN

This graphic is explained in the accompanying text ISBN

 

Flag

This graphic is explained in the accompanying text Indicator

Symbol

Meaning

This graphic is explained in the accompanying text

Import parameter

This graphic is explained in the accompanying text

Export parameter

This graphic is explained in the accompanying text

Return parameter

 

 

Leaving content frame