Sap abap part1

34
Introduction

description

SAP-ABAP BASICS!

Transcript of Sap abap part1

Page 1: Sap abap part1

Introduction

Page 2: Sap abap part1

What is ERP:

E: Enterprise / Company Ex: Reddy Labs, Reliance, GE, GM, BMW

R: Resources

Man -> employee

Machines -> plants/manufacturing units

Materials -> items/products (raw, semi finished, finished)

Money -> finance (profit/loss)

P: Planning (effective plans for maximum profits with minimum resources)

Page 3: Sap abap part1

ERP Software:

A Software which is used to maintain and plan all the business activities of a company/enterprise is called ERP software.

The business activities are :

• How many customers/vendors/materials

• How many sales orders/delivery orders/invoice

• How much profits/loss

• How many employees/leaves/provident funds/income tax

• How many plants/stock available/stock damaged etc.

Page 4: Sap abap part1

• The various ERP software's are :

People Soft

• Used by small companies

• Supports less number of business applications/scenarios/programs

• Supports less number of business modules

• Less cost software

• Very good at HR module

Oracle :

• Used by medium sized companies

• Supports limited number of business applications

• Supports limited number of business modules

• High cost software

• Very good at finance (FI) module

Page 5: Sap abap part1

SAP

Page 6: Sap abap part1

SAP : It stands for Systems , Applications and Products in Data Processing

• It is an ERP software which is used by medium sized as well as top MNC’s

• SAP supports every business scenario/application commonly used in business

• SAP supports almost every Business module in the business (around 45+ modules)

• Very high cost software

• It is excellent at integration between all the SAP modules

• Various Technical products are available from SAP like

• BW/BI/BO, XI/PI , WebDynpro Abap/Java, EP, NWBC etc.

• So, SAP does n’t depend on any other Non SAP module

• We can’t do any black business in SAP (i.e., the information is stored in a secured way where you can’t do any black business)

Page 7: Sap abap part1

History Of SAP

Page 8: Sap abap part1

History of SAP:

• In 1972, five IBM employees started a company by name SAP AG

• Their objective was to develop a business software or ERP software

• In 1980 the company released the first ERP software by name SAP R/2, where R stands for real time and 2 stands for two tier architecture

• In 1990 the company released advanced version of SAP R/2 by name SAP R/3, where 3 stands for three tier architecture

• Even today also we are using SAP R/3

Page 9: Sap abap part1

What is ABAP

Page 10: Sap abap part1

What is ABAP

Abap stands for

ADVANCED

BUSINESS

APPLICATION

PROGRAMMING LANGUAGE

It is a 4th generation language, That is why it is written as ABAP/4.

The entire ERP software is developed by using a single programming language which is called as ABAP.

Once we have a good knowledge on ABAP, we can work on any SAP module.

Page 11: Sap abap part1

SAP Modules :

We have various business modules in SAP. Some of them are :

SD : sales and distribution

MM : material management

FI : finance

CO : controlling

HR : human resources

CRM : customer relation management

SRM : supply relation management

SCM : Supply chain management

APO : Advanced Planner and Optimizer

Page 12: Sap abap part1

SAP Consultants

Functional Consultants: A consultant who is responsible for configuring the real time business scenarios like how many plants, sales organizations, materials etc in SAP software is called as functional consultants.

ABAP Consultants: A consultant who is responsible for developing new programs, screens, tables and customizing standard SAP programs is called as ABAP consultants.

BASIS Consultants: A consultant responsible for installing the SAP software, configuring the servers, controlling network traffic, creating usernames and passwords etc are called as BASIS consultants.

Page 13: Sap abap part1

Roles and responsibilities of ABAP consultants:

Receiving a ticket/Bug in the form of Functional specification document

from TL

Analyze the business requirement as per the given Functional spec

Estimate the number of hours for business requirement

Develop the object

Perform unit testing

Release the developed object to testing server

Prepare Technical Specification document for object .

Page 14: Sap abap part1

System Landscape:

Normally, every project in real time will consists of three servers

Development Server: A server where all the SAP consultants will be developing the real time objects for a business requirement is called development server. Once the development is finished, we should do a sample testing called as unit testing.

Quality Server: A server where all the functional consultants or testing consultants will be testing the developed objects is called a testing server. It is also called as quality server.

Production Server: A server where all the developed objects will be used in the live business market to maintain the business is called production server. It contains the live business data of customers.

Page 15: Sap abap part1

Note: As an ABAP consultant, we will be working only at development sever, not the quality and production severs. ABAP consultants with more than 4 or 5 years of experience will have the access to quality sever but not production server.

Sand Box Sever:

It is a server where we do our R&D work is called a sand box sever. Everybody will have access to the sand box server.

Page 16: Sap abap part1

SAP R/3 Architecture

Page 17: Sap abap part1

SAP R/3 Architecture :

In software engineering there are 3 architectures

• Single tier architecture

• Two tier architecture

• Three tier architecture

• Single tier architecture: A system which is responsible for loading the program, compiling, interpreting, executing as well as storing the data in the same system is called single tier architecture. In simple words a system responsible for front end and back end operations is called single tier architecture.

Ex: All ‘C’ language programs in olden days are written using single tier architecture.

Page 18: Sap abap part1

• Two tier architecture: In this architecture we have two layers, server layer and client layer.

2. a. Sever layer: In this layer we have a single system with very high configuration called as server. This sever is responsible for executing the programs as well as storing the data.

2. b. Client layer: In this later we have multiple systems which are connected to a server. All the business users will be operating from client systems. The server will receive the request from the client system and gives back the response (i.e. result).

Ex: SAP R/2, Oracle

Page 19: Sap abap part1

Disadvantages of two tier architecture:

• As the number of client systems increases the load on the database server will increase and the response time will be delayed

• Since the response time is delayed the output will be very slow on the client system which is very big disadvantage

• To overcome this problem we have a new architecture called as three tier architecture

• Three tier architecture: In this architecture we have three layers, they are database server layer, application server layer and presentation sever layer.

Page 20: Sap abap part1

3. a. Database server layer: A server which is responsible only for storing the data is called database server layer.

3. b. Application sever layer: A server which is responsible for only executing the applications or programs is called application sever layer.

3. c. Presentation server layer: A server which is responsible for just presenting the output and taking the input is called as presentation sever layer.

Ex: SAP R/3 architecture.

Page 21: Sap abap part1

Login to SAP

Page 22: Sap abap part1

Log into SAP:

• Double click on SAP GUI or SAP LOGON icon

• Select development server name (ECC6)

• Click on LOGON

• Provide username: SAPUSER password: INDIA123

• Press enter

• SAP EASY ACCESS screen is displayed

Page 23: Sap abap part1

Transaction Code: It is a unique code or shortcut code to execute a specific program and its corresponding screen.

Ex:

SE11: Displays ABAP dictionary

SE38: Displays ABAP editor

SE37: Displays ABAP function builder

SE21: Displays ABAP package builder

SE80: Displays ABAP development work bench …. Etc.

Page 24: Sap abap part1

Naming conventions:

These objects will starts with any characterExcept Y and Z.

The objects must start with either Y or Z.

These objects can’t be modified directly. These objects can be changed however we want.

Page 25: Sap abap part1

PACKAGE:

It is a container of developed objects

Each project contains a single package per module

Packages are created by BASIS consultants or team leads when the project is started

All our objects must be stored in the package only

SE21 is the TCODE for creating a package

Steps to create a package:

• Go SE21

• Give the package name ZARJUN

• Click on create, provide short description

• Click on create or save, Press enter 2 times

• Click on save, a package is created

Page 26: Sap abap part1

Transport Request Number: A number which is used to transport an object from one server to another server within system landscape is called transport request number.

ECCK is the name of development server

SEO9 is the TCODE for releasing TR

Ex:

Page 27: Sap abap part1

Package types:

Page 28: Sap abap part1

Developing/Creating an ABAP Program

Page 29: Sap abap part1

Steps to create a program:

• Go to SE38,

• Give the program name ‘zsample’

• Click on create, provide description or Title

• Select type = ‘EXECUTABLE’

• Click on save

• Provide the package name and press enter

• Click on create request icon

• Provide short description and press enter

• A transport request number will be generated, just press enter

• The ABAP editor is opened

• Click on save and activate

Page 30: Sap abap part1

Introduction to WRITE statement

Page 31: Sap abap part1

WRITE: It is the statement which is used to print a text on the output screen.

It is similar to PRINTF in ‘C’ language

Ex:

Write ‘hello world’.

Syntax:

‘:’ Chain Operator: It is a statement which is used to display multiple texts which are separated by commas using a single write statement.

Page 32: Sap abap part1

Report zsample.

Write ‘hello world’.

Write ‘welcome to sap abap’

Write / ‘igrow soft’.

Write : / ‘cno’, ‘cname’, ‘city’.

Write : / 3 ‘cno’, 15 ‘cname’, 25 ‘city’.

Write: / 25(25) ‘ABAP BY ARJUN’ left-justified color 1. (Displays background color)

Write: / 25(25 ) ‘ABAP BY ARJUN’ centered color 2.

Write: / 25(25 ) ‘ABAP BY ARJUN’ right-justified color 3.

Write: / 25(25) ‘ABAP BY ARJUN’ right-justified color 6 inverse. (Displays font color)

Page 33: Sap abap part1

System Variables:

• A variable which is defined by the system is called a system variable

• All system variables are automatically assigned with some values

• All system variables will start with ‘SY’ or ‘SYST’

• All system variables are stored in SYST structure

Ex:

Write / sy-uline. (Displays horizontal line across the page width)

Write / 25 sy-vline. (Displays Vertical line of height 1 line)

Write / sy-datum. (Displays system’s date as per date settings in SU3 Tcode)

Write / sy-uzeit. (Displays system’s time)

Write / sy-uname. (Displays system’s user name)

Write / sy-repid. (Displays report name)

Page 34: Sap abap part1

Ex to draw a box:

Write / 25(25) sy-uline.

Write / 25 sy-vline.

Write 49 sy-vline.

Write / 25(25) sy-uline.

Assignment:

Develop a report to display customer details as below.