14.01.2020 Views

ABAP_to_the_Future

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

15

ABAP Programming for SAP HANA

green hats there are, and that’s all you want to know (just the total number), you

most likely don’t read all the data into an internal table, see how big that table is,

and then throw away the internal table. Instead, you would say SELECT COUNT( * )

and thus tell the database to go and count the records and transfer back the total

(i.e., minimize data transfer between the database and the server). If you think of

stored procedures and views as just fancier versio ns of the aggregation features

you use every day, then suddenly they no longer seem as strange and scary as

space aliens from the Planet Bong.

OpenSQL in ABAP

The OpenSQL capabilities in ABAP have been vastly extended in release 7.4. If you

make use of some of the fancy new features when doing a SELECT statement in ABAP,

then you are effect already doing code pushdown—that is, outsourcing some work to

the database generally with the aim of reducing the amount of data sent back. Therefore,

normally you only need to define special views and stored procedures when the

extended OpenSQL capabilities just cannot cut the mustard.

What’s more, this is something of a race; extra capabilities are being introduced into

SAP HANA views and stored procedures with each support pack. But at the same time,

the capabilities of OpenSQL in ABAP are also increasing with each support pack

15.2 Top-Down Development

With top-down development (Figure 15.1), ABAP is the king of the castle. All artifacts

(views and stored procedures) are created in the ABAP system and then replicated

inside SAP HANA. This means you can keep using ABAP for all development

and use the normal change and tr ansport system to move your changes

through the system landscape.

In order to develop SAP HANA artifacts from within the ABAP development environment,

you have to build and call tw o new types of ABAP repository object:

core data services (CDS) views and AB AP Managed Database Procedure (AMDP)

objects. This section introduces you to both objects. You’ll learn how to build and

call the CDS view object, which gets created in the database via a so-called DDL in

the ABAP system. Then you’ll implement the code in an ABAP method using the

SQLScript language so that that method generates and calls an equivalent stored

procedure, the AMDP object, in the SAP HANA database at runtime.

658

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!