ABAP. Finding Appropriate Abstractions for Business Application Programming. Horst Keller, SAP AG Tobias Wenner, SAP AG



Similar documents
Optimize Database Access and Increase System Performance Through More Efficient ABAP Programming

ABAP Performance Tuning

ABAP for Functional Consultants

SAP Certified Development Professional - ABAP with SAP NetWeaver 7.0

... Introduction... 17

ALV List with Radio Buttons

Introduction to SAP HANA SQLScript Rich Heilman SESSION CODE: BT162

The New ABAP Debugger - An Introduction. Boris Gebhardt Christoph Stoeck SAP AG

Next Generation ABAP Development

Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner

AP Integration with BRFplus VERSION V APRIL SAP AG

SQL Cockpit & SAP HANA Verify your SQL queries for HANAsuitability

Using SQL Server Management Studio

SAP BI Generic Extraction Using a Function Module

How To... Model a Gateway Service Based on Business Entities

Information Systems SQL. Nikolaj Popov

ABAP SQL Monitor Implementation Guide and Best Practices

Performance Problems in ABAP Programs: How to Fix Them

SAP HANA. Markus Fath, SAP HANA Product Management June 2013

Creating Mobile Applications on Top of SAP, Part 1

How to Implement a SAP HANA Database Procedure and consume it from an ABAP Program Step-by-Step Tutorial

SAP HANA In-Memory Database Sizing Guideline

SAP NetWeaver 7.4 Planning Product Availability Matrix (Planning PAM)

Quick Guide EDI/IDoc Interfacing to SAP ECC from External System

J j enterpririse. Oracle Application Express 3. Develop Native Oracle database-centric web applications quickly and easily with Oracle APEX

Real SQL Programming 1

SAP NetWeaver Application Server architecture

ABAP How To on SQL Trace Analysis

ORACLE DATABASE 11G: COMPLETE

Chapter 2 Database System Concepts and Architecture

Duration Vendor Audience 5 Days Oracle Developers, Technical Consultants, Database Administrators and System Analysts

Merge PDF files in ABAP

CEON ABAP Eclipse Editor White Paper

End to End Development Example in SAP NetWeaver 7.4 & SAP HANA

Raima Database Manager Version 14.0 In-memory Database Engine

Introduction to Database Systems. Chapter 1 Introduction. Chapter 1 Introduction

Developing Applications for Integration between PI and SAP ERP in Different Network Domains or Landscapes

ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT,

Java EE Web Development Course Program

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

Utility Classes - Overview. Version 14 service pack 9. Dalestech Ltd. Page 1 of 23

Consume an External Web Service in a Nutshell with good old ABAP

Splitting the Custom Container & Display more than one ALV

Oracle PL/SQL Injection

How To Create A Table In Sql (Ahem)

How to Implement Mash Up to Show ECC Screen in SAP Cloud for Customer

So far in the first three chapters of this book we have studied an overview of SAP

Java (12 Weeks) Introduction to Java Programming Language

Visual Basic. murach's TRAINING & REFERENCE

Book 3. Database Connectivity. U:\Book\Book_03.doc Database Connectivity

SQL Server An Overview

Step by Step Guide to Create a Generic Datasource Based on Infoset Query Populated Via External Program

Oracle Database: SQL and PL/SQL Fundamentals

How to Improve Database Connectivity With the Data Tools Platform. John Graham (Sybase Data Tooling) Brian Payton (IBM Information Management)

SQL Databases Course. by Applied Technology Research Center. This course provides training for MySQL, Oracle, SQL Server and PostgreSQL databases.

Services. Relational. Databases & JDBC. Today. Relational. Databases SQL JDBC. Next Time. Services. Relational. Databases & JDBC. Today.

Specialized Programme on Web Application Development using Open Source Tools

Lecture 1 Introduction to Android

Duration Vendor Audience 5 Days Oracle End Users, Developers, Technical Consultants and Support Staff

ABAP Debugging Tips and Tricks

Best Practice Guidelines for Development

Skills for Employment Investment Project (SEIP)

Database Programming with PL/SQL: Learning Objectives

ABAP Course. ABAP Objects and Business Server Pages. Product: All. Level: Beginner. Focus: Programming. Version: 1.0

Intro to Embedded SQL Programming for ILE RPG Developers

Symbol Tables. Introduction

Principles of Database. Management: Summary

Computing Concepts with Java Essentials

core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt

SPDD & SPAU Adjustments Handbook

Database FAQs - SQL Server

Nintex Workflow 2013 Help

INTRODUCING ORACLE APPLICATION EXPRESS. Keywords: database, Oracle, web application, forms, reports

C#5.0 IN A NUTSHELL. Joseph O'REILLY. Albahari and Ben Albahari. Fifth Edition. Tokyo. Sebastopol. Beijing. Cambridge. Koln.

LearnFromGuru Polish your knowledge

Oracle Database: SQL and PL/SQL Fundamentals NEW

PG DAC. Syllabus. Content. Eligibility Criteria

Instrumentation Software Profiling

Database Migration from MySQL to RDM Server

About ZPanel. About the framework. The purpose of this guide. Page 1. Author: Bobby Allen Version: 1.1

BC450 ABAP Performance: Analysis and Optimization

Software: Systems and Application Software

Teradata SQL Assistant Version 13.0 (.Net) Enhancements and Differences. Mike Dempsey

SAP NetWeaver Application Server Add-On for Code Vulnerability Analysis

Oracle Database Security and Audit

SAP NetWeaver Application Server Add-On for Code Vulnerability Analysis. Patrick Hildenbrand, Product Management Security, SAP AG September 2014

Java Application Developer Certificate Program Competencies

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

Software Development Kit

Oracle Database: SQL and PL/SQL Fundamentals

Pemrograman Dasar. Basic Elements Of Java

SAP HANA Core Data Services (CDS) Reference

Specialized Programme on Web Application Development using Open Source Tools

ACE 2011 International

Integrating the F5 BigIP with Blackboard

Transcription:

ABAP Finding Appropriate Abstractions for Business Application Programming Horst Keller, SAP AG Tobias Wenner, SAP AG

ABAP Finding Appropriate Abstractions for Business Application Programming Business Application Programming ABAP Runtime Environment ABAP Essential Concepts at one Glance ABAP Development ABAP Strong Points Conclusion SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 2

ABAP Finding Appropriate Abstractions for Business Application Programming Business Application Programming ABAP Runtime Environment ABAP Essential Concepts at one Glance ABAP Development ABAP Strong Points Conclusion SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 3

Business Application Programming Big Picture Presentation Layer UI App Server 1 App Server 2 Application Layer Application Programs Application Programs Persistence Layer Data in Tables of a Central Relational Database SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 4

Business Application Programming The ABAP Way Presentation Layer UI Application Layer ABAP Programs ABAP Runtime Environment Persistence Layer Data in Tables of a Central Relational Database SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 5

ABAP Finding Appropriate Abstractions for Business Application Programming Business Application Programming ABAP Runtime Environment ABAP Essential Concepts at one Glance ABAP Development ABAP Strong Points Conclusion SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 6

Business Application Programming The ABAP Runtime Environment SAP GUI, HTTP(S) ABAP Program ABAP Runtime Environment Hardware-, operating-system-, and database-independent platform (virtual machine) that provides Interfaces Server Management (Memory, Process, Task Handling) Text Environment Locking and Transaction Services for ABAP programs. Native Database Commands SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 7

ABAP Runtime Environment Past to Present Classical ABAP - Reporting Classical Lists (Screen/Spool) REPORT abap_intro_classic_report. TABLES flight_plan. ULINE. SELECT * FROM flight_plan. SAP Basis R/3-System Report Program WRITE: flight_plan-carrid,, flight_plan-connid,, flight_plan-cityfrom,, flight_plan-cityto,. ULINE. ENDSELECT. ABAP Allgemeiner Berichts Aufbereitungs Prozessor SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 8

ABAP Runtime Environment Past to Present Modern ABAP ABAP Objects PROGRAM modern_abap_example. CLASS flight_app. Services Application METHOD get_flights.... ENDMETHOD. METHOD book_flight.... ENDMETHOD. ENDCLASS. Services ABAP Advanced Business Application Programming SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 9

ABAP Finding Appropriate Abstractions for Business Application Programming Business Application Programming ABAP Runtime Environment ABAP Essential Concepts at one Glance ABAP Development ABAP Strong Points Conclusion SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 10

ABAP Language ABAP Essential Concepts at one Glance, Part 1 PROGRAM abap_intro_essentials. Exception Class CLASS cx_no_flights DEFINITION INHERITING FROM cx_static_check. ENDCLASS. Class Definition CLASS get_and_display_flights DEFINITION. PUBLIC SECTION. CLASS-METHODS main. PRIVATE SECTION. TYPES carrid_t TYPE int4. CLASS-DATA self TYPE REF TO get_and_display_flights. METHODS: get_flights IMPORTING carrier TYPE carrid_t RETURNING value(flights) TYPE sflight RAISING cx_no_flights, display_flights IMPORTING flights TYPE flight_tab. ENDCLASS. Static Methods Type declaration Static Attributes Instance Methods SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 11

ABAP Language ABAP Essential Concepts at one Glance, Part 2 Class Implementation CLASS get_and_display_flights IMPLEMENTATION. METHOD main. DATA: carrier TYPE sflight-carrid, my_flights TYPE sflight. CREATE OBJECT self. CALL FUNCTION 'REQUEST_CARRIER' IMPORTING carrier = carrier. TRY. my_flights = self->get_flights( carrier ). CATCH cx_no_flights. MESSAGE text-nof TYPE 'I' DISPLAY LIKE 'E'. RETURN. ENDTRY. self->display_flights( my_flights ). ENDMETHOD. Method Implementation Local Data Object Instantiation Function Call Method Call Exception Handling SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 12

ABAP Language ABAP Essential Concepts at one Glance, Part 3 METHOD get_flights. SELECT * FROM sflight INTO TABLE flights WHERE carrid = carrier. IF sy-subrc <> 0. RAISE EXCEPTION TYPE cx_no_flights. ENDIF. ENDMETHOD. METHOD display_flights. DATA: display_tab TYPE STANDARD TABLE OF sflight, alv TYPE REF TO cl_salv_table, exc TYPE REF TO cx_salv_msg. TRY. display_tab = flights. cl_salv_table=>factory( IMPORTING r_salv_table = alv CHANGING t_table = display_tab ). alv->display( ). CATCH cx_salv_msg INTO exc. MESSAGE exc TYPE 'I' DISPLAY LIKE 'E'. RETURN. ENDTRY. ENDMETHOD. ENDCLASS. Open SQL Internal Table Exception Raising Global Classes Method Call SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 13

ABAP Finding Appropriate Abstractions for Business Application Programming Business Application Programming ABAP Runtime Environment ABAP Essential Concepts at one Glance ABAP Development ABAP Strong Points Conclusion SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 14

ABAP Development ABAP Workbench ABAP Workbench Integrated Tool Environment for all Development Objects Server Side Development Change and Transport System Test Tools SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 15

ABAP Development Future: ABAP in Eclipse SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 16

ABAP Development ABAP Debugger SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 17 Two Process Debugging

ABAP Development ABAP Language - Documentation F1 Comprehensive help for more than 700 ABAP keywords SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 18

ABAP Finding Appropriate Abstractions for Business Application Programming Business Application Programming ABAP Runtime Environment ABAP Essential Concepts at one Glance ABAP Development ABAP Strong Points Conclusion SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 19

ABAP Language ABAP Strong Points Built-in Database Access Open SQL SELECT... FROM... INTO... WHERE... GROUP BY... HAVING... ORDER BY... Native SQL EXEC SQL. SELECT... CREATE TABLE... EXECUTE PROCEDURE... DML and DDL Database Platform Dependent OPEN/FETCH/CLOSE CURSOR... INSERT... UPDATE... MODIFY... DELETE... ENDEXEC. ADBC DATA: sql TYPE REF TO cl_sql_statement, stmt TYPE string. stmt = `SELECT... `. DML Database Independent sql->execute_query( stmt ). SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 20

ABAP Language ABAP Strong Points Handling Tables Tables on Screens DATA itab TYPE TABLE OF... SELECT * FROM dbtab INTO TABLE itab. LOOP AT itab... MODIFY... ENDLOOP. Tables in ABAP: Internal Tables UPDATE dbtab FROM TABLE itab. Database Tables SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 21

ABAP Language ABAP Strong Points Dictionary Reflecting DB Catalog Screen Painter DBTAB COL1 COL2 COL3... ABAP Dictionary DATA screen_field TYPE dbtab-col3. DATA itab TYPE TABLE OF dbtab. SELECT SINGLE col3 FROM dbtab INTO screen_field WHERE col1 = 4711. SELECT * FROM dbtab INTO TABLE itab. Database Tables SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 22

ABAP Language ABAP Strong Points Built-in XML-Support REPORT abap_intro_xml_conversion. DATA: BEGIN OF carrier_wa, carrid TYPE scarr-carrid, carrname TYPE scarr-carrname, url TYPE scarr-url, END OF carrier_wa, carrier_tab LIKE TABLE OF carrier_wa, xml_xstring TYPE xstring. SELECT * FROM scarr INTO CORRESPONDING FIELDS OF TABLE carrier_tab. CALL TRANSFORMATION abap_intro_simple_trans SOURCE carriers = carrier_tab RESULT XML xml_xstring OPTIONS xml_header = 'NO'. cl_abap_browser=>show_xml( xml_xstring = xml_xstring ). cl_abap_browser=>show_html( html_xstring = xml_xstring buttons = 'X' check_html = ' ' ). SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 23 <?sap.transform simple?> <tt:transform xmlns:tt="http://www.sap.com/transformation-templates"> <tt:root name="carriers"/> <tt:template> <html> <body> <h2>carriers:</h2> <table border="2"> <tr> <td><b>id</b></td> <td><b>name</b></td> <td><b>homepage</b></td> </tr> <tt:loop ref=".carriers"> <tr><td> <tt:value ref="$ref.carrid"/> </td> <td> <tt:value ref="$ref.carrname"/> </td> <td> <a><tt:attribute name="href" value-ref="$ref.url" /> <tt:value ref="$ref.url"/></a> </td> </tr> </tt:loop> </table> </body> </html> </tt:template> </tt:transform> Simple Transformation, Standard XSLT is also possible

ABAP Language ABAP Strong Points Proof of Concept THE BEST-RUN BUSINESSES RUN ABAP ABAP-based SAP Applications ABAP is the language in which most of the business applications of the world s largest ERP vendor are developed. SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 24

ABAP Finding Appropriate Abstractions for Business Application Programming Business Application Programming ABAP Runtime Environment ABAP Essential Concepts at one Glance ABAP Development ABAP Strong Points Conclusion SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 25

Conclusion ABAP meets the Demands of an Ever-Changing World by an Ongoing Evolution! R/2 ABAP ABAP/4 ABAP Objects Unicode enabled Modern ABAP SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 26

ABAP Finding Appropriate Abstractions for Business Application Programming THANK YOU FOR YOUR ATTENTION! QUESTIONS SUGGESTIONS DISCUSSION SAP 2011 / ABAP Introduction and Overview / Horst Keller, Tobias Wenner / SAP AG / Page 27

Backup Slides SAP 2008 / ABAP Introduction and Overview / Horst Keller / NW F ABAP / Page 28

ABAP Language ABAP Strong Points The ABAP Type Zoo, Part 1 Types Objects Generic Types Data Types Data Objects data, any Elementary Daty Types Elementary Data Objects simple Fixed Length c d n t Static Data Objects Text Fields Date Fields Numeric Text Fields Time Fields csequence clike decfloat16/34 Decimal FltPt. decfloat f i p x Binary Floating Point Numbers Integers Packed Numbers Byte Fields numeric xsequence Variable Length Dynamic Data Objects SAP 2008 / ABAP Introduction and Overview / Horst Keller / NW F ABAP / Page 29 xstring string Byte Strings Character Strings

ABAP Language ABAP Strong Points The ABAP Type Zoo, Part 2 Types Objects Data Types Data Objects data, any Complex Data Types Complex Data Objects Structured Types Structures Table Types Internal Tables any table Index Tables Standard Tables Sorted Tables Standard Tables Sorted Tables index table [standard] table sorted table Hashed Tables Hashed Tables hashed table Reference Types Reference Variables Data References Object References Data Reference Variables Object Reference Variables Class References Class Reference Variables Object Types Interface References Interface Reference Variables object Classes Objects Interfaces SAP 2008 / ABAP Introduction and Overview / Horst Keller / NW F ABAP / Page 30

ABAP Language ABAP Strong Points Internal Tables from Past to Present Three kinds of internal tables: Standard tables Sorted tables Hashed tables Tables of any Type Tables of References REPORT abap_intro_reference_table. DATA vehicle_tab TYPE TABLE OF REF TO cl_abap_intro_vehicle. DO n TIMES. CREATE OBJECT vehicle. APPEND vehicle TO vehicle_tab. ENDDO. Tables of Structures LOOP AT vehicle_tab INTO vehicle. vehicle->show_speed( ). ENDLOOP. SAP 2008 / ABAP Introduction and Overview / Horst Keller / NW F ABAP / Page 31

ABAP Language ABAP Strong Points Internal Tables with Secondary Keys REPORT demo_secondary_keys. DATA: itab TYPE HASHED TABLE OF example_data=>struc WITH UNIQUE KEY idx WITH NON-UNIQUE SORTED KEY k1 COMPONENTS name postal_code. READ TABLE jtab INTO wa WITH KEY k1 COMPONENTS name =... postal_code =.... Primary unique hashed key Secondary non-unique sorted key Access via secondary key SAP 2008 / ABAP Introduction and Overview / Horst Keller / NW F ABAP / Page 32

ABAP Language ABAP Strong Points Dynamic Programming REPORT abap_intro_dynamic. DATA: type_descr TYPE REF TO cl_abap_typedescr, struct_descr TYPE REF TO cl_abap_structdescr, table_descr TYPE REF TO cl_abap_tabledescr, components TYPE cl_abap_structdescr=>component_table, table_ref TYPE REF TO data. FIELD-SYMBOLS <table> TYPE ANY TABLE. cl_abap_typedescr=>describe_by_name( EXPORTING p_name = dbtab RECEIVING p_descr_ref = type_descr ). RTTS Classes Data Reference Field Symbol components =... struct_descr = cl_abap_structdescr=>create( components ). table_descr = cl_abap_tabledescr=>create( struct_descr ). CREATE DATA table_ref TYPE HANDLE table_descr. ASSIGN table_ref->* TO <table>. TRY. SELECT (cols) FROM (dbtab) INTO CORRESPONDING FIELDS OF TABLE <table> WHERE (where). CATCH cx_sy_sql_error INTO error.... ENDTRY. RTTI RTTC Data Object Instantiation Dynamic Tokens SAP 2008 / ABAP Introduction and Overview / Horst Keller / NW F ABAP / Page 33

ABAP Language ABAP Strong Points Exception Handling CX_ROOT CX_STATIC_CHECK CX_DYNAMIC_CHECK CX_NO_CHECK CLASS cx_... DEFINITION INHERITING FROM cx_..._check.... ENDCLASS. DATA oref TYPE cx_... TRY. method(... ). CATCH cx_... cx_... INTO oref.... CLEANUP.... ENDTRY. METHODS method RAISING cx_... METHOD method. RAISE cx_... ENDMETHOD. SAP 2008 / ABAP Introduction and Overview / Horst Keller / NW F ABAP / Page 34

ABAP Development ABAP Language - Keywords ABAP Not really a Language for Esthets SAP 2008 / ABAP Introduction and Overview / Horst Keller / NW F ABAP / Page 35