You are on page 1of 33

D .

MANESH

SAP ABAP
Study Material
SAP-ERP introduction :-
What is SAP ?
▪ SAP – System Application Programming.
▪ SAP is a centralized enterprise management system known as
Enterprise Resource Planning (ERP).
▪ SAP was found in the year 1972. It’s a German based company.
Initially it was named as SAP-AG.
▪ In the year 1972, the SAP was named as System Analysis and
Program Development , but later the changed to System
Application and Products in Data Processing.
▪ SAP is the top ERP product. Around the 80% worldwide
business use SAP-ERP.
What is ERP ?
▪ ERP – Enterprise Resource Planning.
▪ It is used to integrate different data source and business units.

Human resource Sales

ERP Centralised System

Finance Material

▪ ERP is a Centralised System.


▪ In olden days Manufacturing Requirement Planning (MRP-II)
and Material Requirement Planning (MRP) were used before
ERP was evolved.
▪ MRP and MRP-II does not have integration between different
business units.
▪ ERP is evolved from MRP-II.
▪ MRP-II was evolved from MRP.
ERP MRP-II MRP

Uses of ERP :-
▪ It is an centralised system to provide the strong integration
between the different business or functional areas.
▪ It provides the correct information on time to take the business
decisions.
▪ The higher management (directors,managers,leads,etc,.) with
the knowledge of ERP will be able to achieve their goals and
targets using proper implementation of ERP.
▪ Better business plan and resource utilization.
▪ On time delivery and customer satisfaction.
▪ There are more than 150 ERP vendors in market. For example;
o Oracle
o Peoplesoft
o Microsoft … etc.,
Among them SAP is the best vendor.
Difference between ERP and MRP :-
▪ In business point of view ERP is expanded from the co-
ordination of the manufacturing process to an enterprise wide
backend integration process.
▪ In technical point of view, ERP is expanded from the legacy
implementation to more flexible tiers architecture (Clients
server architecture).
Client Server System (CSS) :-

Client 1

SERVER SERVICE

REQUEST Client 2

Client 3

Client :-
It is a software or hardware combination which can send the
request for services from the control respiratory system.
Server :-
It is a software or hardware combination which can provide the
services to a group of clients in the shared environment.

Types of business units :-


• Sales and Distribution Department (SD)
• Finance and Controlling Department (FICO)
• Material and Management Department (MM)
• Human Resource Department (HR)
• Plant Management Department (PM)
These are the basic departments in every enterprise.
Sales and Distribution (SD) :-
▪ SAP sales and distribution is an important module of SAP ERP
consisting of business processes required in selling, shipping,
billing of a product.
▪ Key sub-modules of SAP SD are customer and vendor master
data, sales, delivery, billing, pricing and credit management.
▪ SD means number of sales occurred in a company of daily basis.
Finance and Controlling (FICO) :-
▪ SAP FICO is the finance and cost controlling module in SAP ERP,
where FI stands for Financial Accounting and CO stands for
Controlling.
▪ SAP FICO module is very robust and covers all business
processes encountered in various industries.
▪ It is one of the very important and widely implemented
modules in SAP.
▪ The main role of FICO is to maintain the flow of income and
expenditure of the organisation.
Material and Management (MM) :-
▪ SAP MM module is a SAP ERP component that helps
organisations with material management, inventory
management, and warehouse management in the supply chain
process.
▪ It is a part of SAP ECC’s logistic functions which consists of
several components and sub-components.
▪ The most prominent and widely used components are master
data, purchasing and inventory.
▪ Order of these components have their sub-components that
are essential and all of the processes are executed by using
transactions in SAP MM process flow.
▪ The main role of the MM is to produce/manufacture the raw
materials required for the organisation, also work on the end
product.
Human Resource (HR) :-
▪ SAP Human Capital Management (SAP HCM) is an important
module in SAP.
▪ It is also known as SAP Human resource management system
(SAP HRMS) or SAP Human Resource (HR).
▪ SAP HR software allows you to automate record keeping
process. It is an ideal frame work for the HR department to take
advertise of administration and payroll documents.
▪ The role of the HR is to recruit the candidates for the
companies as well as layoff/fire from the companies.
Example:-
METRO SHOES PVT LTD.

HR
Inventory
Customer Sales team Manufacture

Production planning team Finance

Vendors
Data Sets :-
▪ There are two types of managing the data
o De-Centralized System
o Centralized System
De-Centralized System :-

Sales team Finance team HR team

Inventory team Production planning team

➢ In de-centralized data is maintained locally at the individual


departments.
➢ Each team has their own data. Every team consists their
independent data.
➢ The data is locally organized at their own space.
➢ De-centralized system departments do not have access to
information or data from another department.
➢ The only problem with the de-centralized system is that the
data may not be organized properly and data will not be
shared to another departments. Which may also leads to the
end of business or loss in the business.
Centralized System :-

Sales team Finance team HR team

Centralized System

Inventory team Production planning team

➢ In centralized system the data maintained at central location


and it is shared with various departments.
➢ The department has the access to information or data from
another department.
➢ Multiple data is organized at one place.
➢ SAP ERP is an centralized depository and all the companies
integrated.
➢ In centralized system, all the data will be well organized and
the information is passed directly. There wont be any sort of
reputation loss. Every work which is done will be
immediately passed to the centralized system.
SAP Consultant :-

SAP Consultant

Technical Functional End User


Consultant Consultant (customer)

End User :-
End user will be having knowledge only on the business and
having knowledge on SAP.
Functional Consultant :-
They have enough knowledge on their process except in special
area of business.
For Example :-
▪ MM consultant peoples are expert in the inventory and
management.
▪ SD consultant are expert in the sales and distribution
management.
▪ FICO are expert in the financial data of the organisation.
Technical Consultant :-
There are so many technical consultant such as security,
HANA, web development, work flow, ABAP etc.,
The ABAPers are the people who develop the day to day
business applications which is been used by the customers.
Note :-
The document which is been given to the technical consultant by
the functional consultant which contains the information of the end
user/customer is called as Functional Specification Document (FSD).

SAP ERP is Data Independent :-


• The data base consists of all the data of day to day sales and
date to date transactions of the business. The data base is used
to store the business information. For example Sales
data/information, Finance data/information, Material
data/information etc.,
• There are many types of databases to store the data.
For example :-
o ORACLE Database
o Microsoft SQL Database
o IBM Database
o Mango Database
o SAP HANA Database
• SAP ERP is a software application product.
• The SAP ERP product is designed is such a way that it can work
in any type of database.
• So, It is database independent.

Oracle DB
Mango DB

SAP ERP B.S SAP HANA DB

IBM DB
SAP ERP is Language Independent :-
• There are many types of software in market like ‘.NET’, ‘Web
Designing Technologies’.
• To use these type of software you need minimum
knowledge on
➢ C Language
➢ C++
➢ JAVA
➢ PHP
➢ CSS
➢ JAVA Scripting
• But to learn and know about SAP ERP there is no need of
programming knowledge.
• This is language independent.
Eg:

Browser Server
www.gmail.com Google server
Database

Gmail account SQL Google


Database

User ID: Server


Password:

Note :- SQL – Structural Query Language.


• The input details (user id & password) were taken by the
application server, the application server translate your
information details through the SQL translator, then the SQL
translated information is sent to the database and now the
database is going to search your information.
• If the data is available in the database, then it will show the
positive response. If in case the data is not available, then it
shows error.

SAP ERP is Database Independent :-

ABAP Program Oracle DB


DB Interface

Application Server Microsoft DB

SQL
Mango DB

• In application server by using ABAP program we write a


SQL. That will work on any sort of database. For example:
Oracle database, Microsoft database, Mango database
etc., and mainly there is no need to learn any type of SQL
because the SQL has designed an interface in the middle is
known as Database interface.
• When we going to write a SQL in ABAP program then the
SQL goes to the Database interface, then the database
interface will check either we have Oracle, Microsoft,
Mango etc., The written SQL will be translated into Oracle
understandable SQL by using database interface.
• Whatever the instructions that we are writing in the
program, they will be auto translated into database
understandable. The database interface is playing a
mediator program or being like a middle person.
• The database interface is taking the instructions from the
application server and it is translating information into
➢ Oracle Database understandable SQL
➢ Microsoft Database understandable SQL
➢ Mango Database understandable SQL
➢ IBM Database understandable SQL
➢ SAP HANA Database understandable SQL
• The SAP business suite is going to work in any database.
• The SAP designed the business suite in such a way that is
compactable with any sort of database which are
available in the market today.

What is ABAP ?
• ABAP – Advanced Business Application Programming
• ABAP is the SPA’s own specific programming language.
• It came in the year 1980.
• Since 1980, all the SAP applications are being built only
using the ABAP programming language.
• It’s a fourth generation language.
• The fourth generation language indicates two types of
programming techniques.
➢ Procedural Programming techniques
(subroutines & functional modules).
➢ Object oriented programming techniques.
Entire SAP is ABAP platform :-
• Write/create new application (or) custom application
by object which should start with either ‘Z’ or ‘Y’.
• We can make modifications in existing programs
(standard applications by object).
• We can create our own program/custom specific
programs.
• In this 30% to 40% code is system generated and we
are going to write just 60% to 70% of manual coding.
The SAP has designed in such a way that it has
minimized the programming part.
• The most of the programming was written and
designed by the SAP itself.
• The coding is easy and easy to learn, anyone can learn,
those are same like English statements.
➢ Each statement end with period.
➢ Statements like write, display data, select,
delete, clear, app end, move etc.,

Note :- ‘.’ Is known as period, every program should end with


period.
• SAP ABAP is non-case sensitive.
Eg :- write, WRITE, wRITE.
• It is not a language dependent.
• It is not a platform dependent. It is database
independent.
Open SQL and native SQL in SAP ABAP :-
• In ABAP programming language, there are 2 types of SQL being
used :- 1. Open SQL
2. Native SQL
Open SQL :-
• Open SQL allows you too access the database tables declared in
the ABAP dictionary regardless of the database platform that
the R/3 system is using.
• Open SQL consists of a set of ABAP statements that perform
operations on the controlled database in the R/3 system. The
results of the operations and any error messages are
independent of the database system in use. Open SQL through
provides a uniform syntax and semantics for all the database
systems supporting by SAP ABAP programs that only use open
SQL statements will work in any R/3 systems, regardless of
database systems in use. Open SQL statements can only work
with database tables that have been created in the ABAP
dictionary.
Native SQL :-
Native SQL allows you to use database specific SQL statements in
an ABAP program. This means that you can use database tables that
are not administered by ABAP dictionary, and therefore integrate
data that is not part of the R/3 system.
*SAP ERP Business Suite:-
The SAP ERP business suite is a collection of fully integrated
applications such as :-
SAP Customer Relationship Management (CRM),
SAP Enterprise Resource Planning (ERP),
SAP Product Lifecycle Management (PLM),
SAP Supplier Relationship Management (SRM),
SAP Supply Chain Management (SCM) modules.
Eg:-

Application server
DB specific SQL

OPEN SQL
ABAP Programs
ERP Application DB interface
Data needs DATA BASE
to be extracted

EXEC.
Native SQL
ENDEXC.

SAP ERP Business Suite :-

• Whenever an ERP application is executed in an SAP ERP


Business suite that is going to communicate with the
application sever where the ABAP programs are going to run.
• Whenever a data needs to be extracted, it has to repeat the
database and get the required business data back to the
application server and the user is going to see it on the ERP
application.
• There are 2 types of SQLs used in the ERP application
Open SQL :-
• In ABAP we use open SQL statement. Which is subset of SQL
statement and it can be used with any type of database. The
open SQL statements are not database dependent.
• Open SQL Process :-
The open SQL statements are going through database interface
which will translate it according to the type of database and
database specific couri will be generated. Then the data will come
back again with database interface reorganise the information
how the SAP can understand. This is known as Open SQL
statement.
• So open SQL statements are database independent statements.
Open SQLs are nothing but which is common SQL statement for
all the database such that the database interface is going to
translate them, so no need to learn SQL coding when you are
using open SQL.
Native SQL :-
The native SQL statements are written in between
EXEC….ENDEXC which are database dependent.
EXEC.
Native
SQL
ENDXC.

• The statement will not go into the database interface, they


directly go and work on the corresponding database. They will
interact directly with the database.
• These instructions are going to work directly on the database
without any sort of translation.
• In this Native SQL we have to write exact SQL statements which
the database can understand. So we have to know the
database specific SQL. Then by writing SQL in between
EXEC….ENDEXC then the SQL will directly go and work on the
database. And it is going to fix the data.
• Here we are writing database understandable SQL directly in
the ABAP program.
• Native SQLs are nothing but SQLs which can directly run on the
database.

What is SAP R/3 ?


• SAP R/3 is a 3-tier architecture consists of 3 layers
*Presentation layer
*Application layer
*Database layer
• In simple words , we can say it’s a client sever architecture
• ”R” signifies real time system
• ”3” represents 3-tier architecture

USER’s PC :-
User can access SAP system in 2 ways,
1. Through SAP GUI
2. Through Web Browser
Through GUI :-
Which can work use on laptops and systems
Through Web Browser:- Which can work on the web page and
mobile devices

client Presentation layer User enters data

Processing data

Application sever Application Layer

Requesting data from data base

Database Data Base Layer Stores and provides data

Presentation Layer :-
The presentation layer sends the user’s input to the application
sever and receives the data display from it. While a SAP GUI
component is running it remains linked to a user’s terminal session in
the R/3 system.

Application Layer :-
The Application layer passes the request from one application
server to another within the system. It also contain information
about sever groups and the current load balancing within them. It
uses this information to assign an appropriate server when a user
logs onto the sever.

Database Layer :-
The Database layer consists of central database system containing
all of the data in the R/3 system. The database system has 2
components. One is DBMS ( database management system ) and
another one is database itself. SAP has manufactured it’s own
database named “HANA” , but it is compactable with all major
database such as ORACLE. All R/3 data is stored in the database.
For example, the database contains the control and customizing data
that determines how R/3 system runs. It also contain the program
code for applications. Applications consists of programming codes,
screen definitions, menus, function modules and various other
components. These all stored in special section of database called
R/3 repository and are accordingly called repository object. R/3
repository object are used in ABAP workbench.

SAP R/3 ( 3-Tier Architecture ) :-


SAP R/3 - Three Tier Architecture
user 1 (clients) user 2

Presentation Layer SAP GUI WEB GUI


Request Service

Application Layer Dispatcher Gateway

Shared Memory Work Process1 Work Process2

Request Service

Database Layer Database interface/DBMS


Request Service

Database
Note :-
• Users can be connected through the SAP GUI / WEB GUI by the
URLs present in the presentation layer.
• The request is going to be sent and the requested service
comes back on the server.

Dispatcher :-
It distributes request from the presentation layer to the work
process.
Gateway :-
It enables communication between SAP system and external
system.
Shared Memory :-
It enables communication between ICM and ABAP work
processes.
ABAP - Advanced Business Application Programming
ICM – Internet Communication Manager
ICM :-
It enables communication between SAP system and HTTP, HTTPS,
SMTP protocol. It means by entering system URL in the browser, it
can access SAP from browser also.
Work Process ( ABAP ) :-
It separately executes dialog steps in R/3 applications
Types of Works Process are given as below :-
Dialog Responsible for Dialog process (user is executing)
Update Responsible for Database Update
(creation/deletion/changing of a document)
Background Responsible for background programming (without
any user interaction)
Spool Responsible for print requests
Enqueue/Lock Responsible for data entry locks (locked under one
user, so other user can’t access it until he come out
of it)
Dequeue Responsible for transaction messages, notifications
/Message and informations

SAP R/2 ( 2–Tier Architecture ) :-


• Presentation layer is present in a separate system.
• Database layer and application layers are present in another
system.
• There is a two end flow activities between these systems.

PL ( Presentation Layer )

AL ( Application Layer )
DL ( Database Layer )
SAP R/1 ( 1–Tier Architecture ) :-
• In one tier architecture all the three layers are present in one
single system.

PL ( Presentation Layer )
AL ( Application Layer )
DL ( Database Layer )

SAP PI/PO :-
• PI – Process Integration
• PO – Process Orchestration
The team which converts the data into understandable language
between SAP to NON-SAP system is called as SAP PI/PO team.
Gateway Process :-
The gateway interfaces with SAP to NON-SAP system and SAP to
SAP system.
PI/PO team
Interface - IDOC
- Proxies
- Webservices Banking System

SAP
Business Suite Gateway

RFC SAP Ariba


SAP – SAP System :-
The establishment of SAP – SAP is through something
known as RFC ( Remote Function Call ). We are going to remotely
connect to another system by using the process known as RFC.
SAP – NON SAP System :-
Whenever the data exchanges one system to another
system generally for the NON-SAP System, we use the process like
IDOC ( Intermediate Document ), Proxies , Webservices in the
gateway process and there will be a theme known as PI/PO team,
which is a middleware theme. They are going to connect the
integration between the system. It is used to transfer the data from
one format to another format.
Eg:- The IDOC information was sent from SAP will take by the PI/PO
team and changes it into understandable language of banking
system. In the same way the banking system sends the information,
then the PI/PO team receives the information and translates it into
SAP understandable language. So the exchange of the data between
two completely different systems is established using the gateway
service, it could be SAP-SAP system or SAP – NON-SAP system.

Proxy Data Organisation – Tags :-


Example through an XML format;
XML format
<NAME>
<FIRST>Ram</FIRST>
<MIDDLE>Kishore</MIDDLE>
<LAST>Valuu</VALUE>
</NAME>
IDOC – Segments :-

Name
First Ram
Middle Kishore
Last Valuu
Seg2

Name-First
Name-Middle
Name-Last

Application Layer Components :-


These ALC are of four types;
1. Dispatcher
2. Gateway
3. Shared Memory
4. Work Process
a. Background Work Process
b. Dialog Work Process
c. Enque Work Process
d. Message Work Process
e. Spool Work Process
f. Update Work Process
Note:- To monitor the work processes the transaction/standard
applications are : SM50/SM51
Dispatcher :-
➢ Provides link between presentation layer and application
layer.
➢ Takes request, identifies the type of request.
o Like print request , etc.
➢ Assigns the request to corresponding available work process
➢ Send the processed request to the presentation layer.
Gateway :-
➢ Distribute/Exchange data from SAP to SAP system or SAP to
NON-SAP system.
➢ Is this communication protocol for remote enabled functions
and business applications programming interfaces (BAPI’s), in
order to distribute data between the systems.
Shared Memory :-
➢ Is the common main memory which could be shared by all
the different work processes.
➢ Like a virtual memory.
➢ Allocates the memory until the work processes completed
and deallocated the memory ones a job/process is
completed.
Work Process :-
➢ Used to process different types of user requests.
Background Work Process :-
Used to execute/process a program periodically – Hourly,
Daily, etc.,
• Ex: Salaries transferred by HR team to all the employees.
• Money transferred from SBI to ICICI in non-banking
hours.
Job status
Sched Released Ready Active Finished Cancelled

Dialog Work Process :-


o Maintains the screens and screen fields.
Enque Work Process :-
o Locking mechanism. Lock a database table to avoid DML
commands.
o The lock requests are processed.
o SM12 >> used to click/monitor the lock entries.
Message Work Process :-
o Maintain central messages – via message class.
Spool Work Process :-
o Printer requests in FIFO (First in First out) are taken care by
the spool work process.
Update Work Process :-
o Request on data manipulation – create/delete/etc.,
Steps to start SAP Server ( MMC – Management Console ) :-
• Double click on SAP MMC icon.
• Right click on the required SAP System.>> Click on start.
• Enter the required password ( ex: INDIA123 ) >> Click on OK
button.
Note: Wait until the colour of the system icon becomes green.
(grey - > yellow - > green)
Note : Press an icon refresh to change the current system status.
Note : Make sure all work process statuses are WAIT (Ready to
accept request) and start statuses are YES (Ready to provide
service).
• Minimise the Window.

System Landscape

E1D E1Q E1P


Development Quality Production

• In real time the servers are present in remote locations. So we


do not start/stop the servers. They are always turned on.

Step to add system to LogOn Pad :-


• Double click on SAP LogOn icon
• Click on new item button/icon. >> Click on new button.
• Enter the required system connection parameter details, such
as description, application server, system number, system ID.
Note : In the real time system connection parameter details are
given in such project (screenshot is sent by the team-
lead/manager)
Ex:
Real time Practice system
Description E1D-Development system E1D-Development system
Application server 122.175.43.121 gcecc62
System number 00 00
System ID ED1 ED1

• Click on FINISH button.


Note : Follow the similar steps to add for each system to LogOn Pad.

What is SAP System Landscape?


SAP System Landscape consists of three systems such as

- Development system (DEV)


- Quality system (QA)
- Production system. (PROD)

In all the three independent systems the SAP ERP system business
suite is installed. These systems are integrated to one another using a
process known as Transport Layer Management (TLM).
Development system :-

• Development system/server is also known as sand box client.


• Developers develop the programs in the development server,
and then transport it to Quality system to test the server, after
testing it transport to production server.
• Any modification or creation of an application can only be done
by the Development System/server.
• It is the server where the consultants do the new
customization, write new programs as per the business
requirement. It has three clients. Such as

1. Sand Box
2. Customizing client
3. Development-testing

1. Sand Box – Sand box client is the place where all the system design
work takes place

2. Customizing client – After configuration in the sand box, if


everything is ok then recreate the same configuration in configuration
client

3. Development-testing – This client is used for unit testing. In some


projects integration testing also done in this client.

Quality Assurance System :-


• Quality system/server is where the team members and other
members test the new customization, programs etc.
• Major business scenario will be tested in the quality system by
the functional team.
• Quality system is exclusively testing for application.
• In Quality system we cannot make any type of changes or
modifications.
• It can run the application but cannot create the application.

Production System :-
• Production system/server is also known as Golden Client.
• It will be accessible , it is a separate system where the actual
business will run on this system.
• The day to day business transactions and updates are done by
the end users/customers in the production system.
• The production system/server is only accessible by the end
user/business user/client.

A request will be sent from Development (DEV) >> Quality


Assurance (QA) >> Production (PROD).

System Landscape

Transport Layer Management

Development System Quality System Production System

(Technical Consultant) (Functional Consultant) (End User/Client)

Transport Layer Management :-

Transport Layer Management is generated to transport created


object/programs from one system to another system.
Types of Applications :-

There are two types of applications;

• Standard Applications
• Custom Applications

Standard Applications:-

▪ It is an default application.
▪ Which are already built and available.
▪ These are the applications coming with the ERP Business
Suite.
▪ These default applications are directly going to used by the
business users by based on the small sort of configurations
which are going to be done by the functional team.
▪ These standard application configuration/problems will be
recognized by the functional team/server/system and it
will be sent to the technical team/server/system to make
required changes.
▪ The changes which are done in the standard application is
called as enhancing.

Custom Applications :-

▪ We are going to create an application which is not


available.
▪ The application is created as per the business process.
▪ The custom applications are created by the ABAPers
based on the client/business user/customer request, who
are present in technical system/server/team.
▪ These custom applications are created in the technical
server/system/team.
▪ The custom application names should be started with
either ‘Z’ or ‘Y’.

You might also like