+ All Categories
Home > Documents > 0 ABAP Overview - 2hrs

0 ABAP Overview - 2hrs

Date post: 13-Dec-2015
Category:
Upload: satishputran
View: 225 times
Download: 4 times
Share this document with a friend
Description:
ABAP Overview
Popular Tags:
48
Beyond the Obvious Beyond the Obvious SAP R/3 System Overview & ABAP/4 Programming
Transcript
Page 1: 0 ABAP Overview - 2hrs

Beyond the ObviousBeyond the Obvious

SAP R/3 System Overview

& ABAP/4 Programming

Page 2: 0 ABAP Overview - 2hrs

SAP R/3 System

• Overview of R/3 System

Page 3: 0 ABAP Overview - 2hrs

Logical View of R/3 System

Page 4: 0 ABAP Overview - 2hrs

ABAP/4 - SAP R/3 PROGRAMMING LANGUAGE

Advanced Business Application Programming

Page 5: 0 ABAP Overview - 2hrs

ABAP/4

• Fourth generation language

• Event driven

• All SAP R/3 applications and parts of Basis are developed in ABAP

• Verbose language

Page 6: 0 ABAP Overview - 2hrs

Topics of Discussion

• ABAP Development Workbench• Data Dictionary• Reports• BDC• SAP Script• Module Pool

Page 7: 0 ABAP Overview - 2hrs

ABAP Development Workbench

Page 8: 0 ABAP Overview - 2hrs

ABAP Development Workbench

ABAP Development Workbench is a graphical

programming environment which enables us to create

new ABAP applications and change existing SAP

applications.

Page 9: 0 ABAP Overview - 2hrs

ABAP Workbench - Transaction code -S001

Tools -> ABAP Workbench

Page 10: 0 ABAP Overview - 2hrs

Repository Browser - Transaction code - SE80

Page 11: 0 ABAP Overview - 2hrs

Data Dictionary - SE11

Page 12: 0 ABAP Overview - 2hrs

Function Builder - SE37

Page 13: 0 ABAP Overview - 2hrs

Screen Painter - SE51

Page 14: 0 ABAP Overview - 2hrs

Creating a Program

Click the button ABAP Editor in the Workbench

Page 15: 0 ABAP Overview - 2hrs

…Creating a program

The program attributes screen looks like this

Page 16: 0 ABAP Overview - 2hrs

... Debugging

Page 17: 0 ABAP Overview - 2hrs

Runtime Analysis

• Tells us how long do specific operations take during the run

• Gives the trace list of subroutines that have been

processed

• SQL trace helps to trace database calls to find out

the tables used by the application

Page 18: 0 ABAP Overview - 2hrs

Development class

• A set of logically related development environment objects.

• A development class together with its objects is

transportable.

• Each development class is under the administration

of one user.

Page 19: 0 ABAP Overview - 2hrs

Creating development class

Page 20: 0 ABAP Overview - 2hrs

Data Dictionary

Page 21: 0 ABAP Overview - 2hrs

Data Dictionary

• ABAP Development workbench tool

• Stores system wide data definition

• Completely integrated with ABAP Workbench

Page 22: 0 ABAP Overview - 2hrs

Data Dictionary objects

• Data Elements

• Domains

• Tables

• Structures

• Views

Page 23: 0 ABAP Overview - 2hrs

REPORTS

Page 24: 0 ABAP Overview - 2hrs

ABAP/4 Reporting

Objectives

• Understand data declarations, commands, system

fields used in reports• Understand the selection screens • Understand the program level events, conditions &

loops• Understand the data retrieval from the tables and

Internal tables • Understand the modularization techniques,

field symbols and logical databases

Page 25: 0 ABAP Overview - 2hrs

Types of programs

Type 1

• run on its own

• Can be started it in the R/3 system without a

transaction code

• Can be executed in background

Type M ( Module pool)

• Program cannot run on its own and can be called via

a transaction code

Type I ( Include )

Page 26: 0 ABAP Overview - 2hrs

Program Selections

• SELECT-OPTIONS StatementSELECT-OPTIONS <Name> FOR <Table field> NO EXTENSION OBLIGATORY LOWER CASE

SELECT-OPTIONS allows specification of multiple values and ranges. This can only be declared for fields within tables defined in the TABLES statement.

Example SELECT-OPTIONS: S_KUNNR FOR KNA1-KUNNRSELECT-OPTIONS: S_KUNNR FOR KNA1-KUNNR.

Page 27: 0 ABAP Overview - 2hrs

Program Selections

• PARAMETERS StatementPARAMETERS <Name> TYPE LIKE OBLIGATORY AS CHECKBOX DEFAULT

This statement allows entry of a single value on the selection screen.

Example :PARAMETERPARAMETER : P_KUNNR LIKE KNA1-KUNNRP_KUNNR LIKE KNA1-KUNNR.

Page 28: 0 ABAP Overview - 2hrs

Blocking Selection Screen

• A sample screen – SELECTION-SCREEN BEGIN OF BLOCK RAD1

WITH FRAME TITLE TEXT-002.PARAMETERS R1 RADIOBUTTON GROUP GR1.PARAMETERS R2 RADIOBUTTON GROUP GR1.PARAMETERS R3 RADIOBUTTON GROUP GR1.SELECTION-SCREEN END OF BLOCK RAD1.

Page 29: 0 ABAP Overview - 2hrs

DATA Definitions

• TYPES Statement

TYPES <name> TYPE or LIKE

DECIMALS

SAP allows the creation of new user defined data types. And this does not create a variable, just a new type that can be used in creating a variable.

Example :

TYPES : CC LIKE BKPF-BUKRSTYPES : CC LIKE BKPF-BUKRS

DATA : NEW_CC TYPE CC.DATA : NEW_CC TYPE CC.

Page 30: 0 ABAP Overview - 2hrs

Data Definitions

• Internal TablesDATA : BEGIN OF <name> OCCURS x,(variable definitions)END OF <name>.Internal Tables are defined as an extension of a structure,

with the addition of an OCCURS clause.Example

DATA : BEGIN OF T_WRK,DATA : BEGIN OF T_WRK, T_KUNNR LIKE KNA1-KUNNR,T_KUNNR LIKE KNA1-KUNNR, SW TYPE C,SW TYPE C, END OF T_WRK.END OF T_WRK.

Page 31: 0 ABAP Overview - 2hrs

Program Level Events

• INITIALIZATION.• AT SELECTION-SCREEN• AT SELECTION-SCREEN OUTPUT• START-OF-SELECTION• END-OF-SELECTION• TOP-OF-PAGE• END-OF-PAGE• AT LINE-SELECTION• AT USER-COMMAND

Page 32: 0 ABAP Overview - 2hrs

• IF Statement CASE Statement

Page 33: 0 ABAP Overview - 2hrs

Modularization techniques

• Defining Macros

• Include program

• Subroutines

• Function Module

Page 34: 0 ABAP Overview - 2hrs

BDC

Page 35: 0 ABAP Overview - 2hrs

BDC - Batch Data Communication

• To transfer data from non-SAP systems ( ie. already available in electronic form )

• Suitable for entering large amounts of data as it executes the transactions automatically

• Similar to entering the data in the transactions manually

Page 36: 0 ABAP Overview - 2hrs

BDC Methods

• Classical Method

• Call Transaction

• Call Dialog

Page 37: 0 ABAP Overview - 2hrs

Preparing a BDC Table

• The BDC table should have five fields viz.,

1) Program name

2) Screen number

3) Screen begin

4) Field name

5) Field value

Page 38: 0 ABAP Overview - 2hrs

Preparing a BDC Table

For eg.

Prog Screen Scrn Field Field name No begin name valueSAPMMO3M 0060 X RM03M- MATNR mat.no RM03M-MBRSH indu. sec ..SAPMM03M 0080 X RM03M-WERKS target pla ..

Page 39: 0 ABAP Overview - 2hrs

SAP Script

Page 40: 0 ABAP Overview - 2hrs

SAP Script

Objectives

• Understand Forms, various components of forms

such as windows, pages, character format,

paragraph format etc.

• Understand the control commands, symbols and

function modules in SAP Script.

Page 41: 0 ABAP Overview - 2hrs

Forms

• Controls the page layout and text formatting

A form of the graphical Form Painter consists of

• Header data

• Page layout

• Paragraph format

• Character format

• Documentation

Page 42: 0 ABAP Overview - 2hrs

… SAP Script - Control commands

• PERFORM Command

To Call an ABAP subroutine (form) from any program

Syntax

/: PERFORM <form> IN PROGRAM <prog>

/: USING &VAR1&

/: CHANGING &VAR2&

/: ENDPERFORM

Page 43: 0 ABAP Overview - 2hrs

Function Modules in SAP Script

• Form functions

• OPEN_FORM Opens the form output.

• WRITE_FORM Calls a form element

• CLOSE_FORM Ends the form output.

• START_FORM Starts a new form.

• Database

• READ_TEXT Reads a text module and passes

it to the specified work areas.

Page 44: 0 ABAP Overview - 2hrs

Module Pool

Page 45: 0 ABAP Overview - 2hrs

Creating Screens

Click screen painter button in Workbench

Page 46: 0 ABAP Overview - 2hrs

Structure of program

Page 47: 0 ABAP Overview - 2hrs

Flow logic

The flow logic of a screen drives the processingsequence for that particular screen. Flow logic describes how the program reacts to the user actions.The events used for this purpose are,

• Process before output (PBO)• Process after input (PAI)• Process on value request (POV)• Process on help request (POH)

Page 48: 0 ABAP Overview - 2hrs

Recommended