• No results found

ABAP FUNDAMENTALS. What is ABAP? 1/16/2011. Spring 2011

N/A
N/A
Protected

Academic year: 2021

Share "ABAP FUNDAMENTALS. What is ABAP? 1/16/2011. Spring 2011"

Copied!
15
0
0

Loading.... (view fulltext now)

Full text

(1)

Spring 2011 Enterprise Programming

ABAP F

UNDAMENTALS

What is ABAP?

Originally: Allgemeiner Berichts-Aufbereitungs-Prozessor (Generic Report Preparation/Generation Processor)

Now: Advanced Business Application Programming

Created by SAP initially for report creation. Later evolved into full language. Made public for program customization and

enhancement by companies.

Notable for its database abstraction (logical databases) and ease of database interaction. Embedded SQL statements in code (Open SQL). Platform independent.

Extended in 1998 to include Object support (ABAP Objects).

Developing using OO model recommended, but legacy procedural coding still supported.

(2)

Learning ABAP—NetWeaver Programming Core

http://www.sap.com/services/education/catalog/netweaver/curriculum.epx?context=%5b%5bABAP_CORE%5d%5d%7c

(3)

What is SAP NetWeaver?

Technical foundation for SAP applications (ERP, CRM, SCM, etc.).

Provides internal connectivity

(integration) between SAP modules and external connectivity with other systems.

Eases integration between systems. Provides framework for development. Supports development in Java and ABAP

Graphic copyright SAP

Prehistory of NetWeaver

(4)

SAP Basis Admin—sample job ad

3-tiered architecture

Presentation Layer

Database Layer

(5)

3-tiered architecture + ABAP

Presentation Layer

Application Layer

Database Layer

ABAP Execution

ABAP Program &

Data Storage

ABAP Programming

& Output

3-tiered architecture + ABAP (General)

Presentation Layer Application Layer Database Layer

Run Transaction/Program

Screen

Screen

ABAP Program

Program Logic

Program Repository

Database Table(s)

Screen

Local Data Variables

(6)

Developing in an Established Environment

Programming in an environment with many pre-existing named components.

Name collision can break existing functionality.

Program namespaces beginning A through X are reserved for use by SAP. Y and Z can be used by customers.

Modification/programming only possible with a developer key and appropriate configuration. (SCC4)

Key is client and username dependent. Keys provided by SAP based on license agreement. May require additional payment.

Typical Company SAP Landscape

Typical landscape involves multiple systems—development (DEV), testing (QAS), production (PROD), training (TRN).

Developed components move from system to system via transports. Development done within packages which are tied to transport

requests. Requests are exported/imported for transportation. (e.g. DEV  QAS)

Transport management key system administration task to ensure dependencies and system integrity maintained.

(7)

Typical Company Installation Landscape

Server SAP ERP Client xxx Development (DEV) Server SAP ERP Client xxx Test/Quality Assurance (QAS) Server SAP ERP Client xxx Production (PROD) Server SAP ERP Client xxx Training (TRN)

Transport Transport

Programming Process

1. Create new or select existing package.

2. Create new or select existing transport request for package. 3. Begin creating a new program.

4. Enter developer key to authorize development (if not done previously).

5. Create, debug program. Save. 6. Test. Revise as necessary. 7. Activate program.

8. Transport package.

Items that will not be transported can be assigned to the local package $TMP.

Within our development landscape, transports are essentially to ‘dummy systems’.

(8)

Beginning Programming

ABAP Development Rules:

ABAP programs made up of individual sentences/statements. Each statement begins with a keyword.

Conventional to type keywords in all uppercase letters and variables, operators, etc. in all lowercase.

Built in Pretty Printer

Each statement ends with a period. Statements can be indented as desired. Statements can extend over multiple lines. Lines with * in column 1 are comment lines. Double quotes (“) are to-end-of-line comments.

Source: SAP BC100, Page 60-61

Various settings can be maintained through Utilities Settings, ABAP Editor

Launch directly with transaction SE38 or SE80 for ABAP Workbench. To avoid name collision, in all development done on our system begin

your programs with the prefix Zxx_ where xx is your individual user number (the last 2 digits of your user name).

If you do your own practice development, enter source code from various sources, etc. you must comply with this requirement. If you have access to multiple SAP systems note that this number will

vary among systems.

If you want to create multiple instances of the same program

(9)

Programming Basics—Begin Creating New Program

Option 1: Use transaction SE80 to launch ABAP Development Workbench.

Select Package, and enter the name of the package you wish to work with.

If package not previously created, will be prompted to create

For class: Zxx_PKGcc (where c is sequential number starting 00)

Programming Basics—Package and Transport Creation

If no transport request exists, create one. Use search feature if one exists.

Use your name in the Description. The system will provide a request number.

Pre-populated to last request (if exists)

(10)

Programming Basics—Program Creation

Right click on package in the Object Name list and select Create  Program.

Program name in ALL CAPS (remember naming rules).

Unless needed (to be discussed later) TOP INCLUDE should be off.

Programming Basics—Creation Sequence

Title—brief program description. Type—Executable program Status—Test Program

(11)

Programming Basics—Begin Creating New Program

Option 2: Use transaction SE38 to launch ABAP Editor. Specify Program Name. Select Create.

Cannot create a new package with this sequence! But if one already exists, can use it.

Programming Basics—Enter, Check, Pretty Print, Run

Use editor to enter code. Many right-click options. Check operation validates syntax. Pretty Printer ‘cleans up’ code layout. Direct Processing to run.

(12)

Additional ABAP Workbench Notes

Appendix

The following slides show screen shots for reference which are displayed live in lecture.

(13)

SE16 showing table TSTCT limited to English

(14)

SE38 ABAP Editor

(15)

Copyrights

Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.

Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Oracle is a registered trademark of Oracle Corporation.

HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc.

JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.

Other products mentioned in this presentation are trademarks of their respective owners.

Presentation prepared by and copyright of Dr. Tony Pittarese, East Tennessee State University, Computer and

Information Sciences Dept. (pittares@etsu.edu)

Podcast lecture related to this presentation available via ETSU iTunesU.

Figure

Graphic copyright SAP

References

Related documents

Diabetes incidence rates for men and women are presented in figure 2 by levels of total (leisure and occupational) phys- ical activity stratified by approximate tertile of body

Xue( Snow) Rui Bhoopesh Mishra Ken Kemner Robert Sanford Tom Johnson Craig Lundstrom et al. Silke Nissen Jarrod Pollock

2003: Records of two bumble bee species new for the Czech Republic and Slovakia (Hymenoptera: Apoidea: Bombini). 2005:

The purpose of this qualitative multiple case study was to gain an understanding of how leaders in an engineering consulting organization facilitate the transfer of tacit

In Chapter Three, I seek to establish a parallel between Qatar’s foreign policy ambitions, its anomalous embracing of the Islamist tendencies of the Arab Spring whilst maintaining

It is cultivated commer- cially in Costa Rica as a spice herb; it contains an oil having an anise-like odor, and the fresh aerial parts of this plant are sold in the super- market

We currently recommend INTRACOR and pha- coemulsification to patients who request refractive surgery and good distance and near visual acuity, because of its efficacy, its good

Review periods are dependent on individual risk and need, but if the case is managed at Multi Agency Public Projection Arrangement Level 2 or 3 cases are reviewed within a maximum