Topics Covered
- ERP
- SAP
- Role of ABAPer
- Types of project
- Source code
- Datatypes
- Technical requirement to create program
SAP ABAP Introduction
- SAP - System Application and Product in data processing
- ERP - Enterprise Resource Planning
- ECC - Enterprise Central Component
- ABAP - Advance Bussiness Application Programming
1.ERP
ERP contains predefine database tables and programs
Some of the ERP products available in the markets are
- BAAN - Small and Medium scale industries [Vendors and Customers]
- RAMCO - Small and Medium scale industries [Finance]
- Peoplesoft - Large scale industries [Human Resource]
- Oracle Apps - Large scale industries [Finance]
- SAP - Large scale industries
Note:
Enterprise means big companies
Resource means money, material, man power, machineries, marketing, etc
Planning means how to properly utilise these resources for companies betterment
Planning means how to properly utilise these resources for companies betterment
2.SAP
- SAP has tightly integrated across all the modules and departments [HR,MM, SD, FICO, etc]
- SAP is developed in multi-language and supports multi currencies
- SAP is developed by 5 former IBM employees
- SAP is ready made product with customisation facility
- SAP is platform independent
- SAP supports cross application. ie, [SAP to SAP, SAP to non-SAP, non-SAP to SAP]
- SAP has its own programming language called ABAP
- SAP ABAP is not case sensitive language
- SAP ABAP is used to customise standard functionality of SAP
3.Role of ABAPer
ABAPer are responsible to create RICEFW
R - ReportsI - InterfaceC - ConversionE - EnhancementF - FormsW - Workbench
1. Reports:
Based on the given input fetching the data from database table and displaying it in a predefined formate is called reports. There are 3 types of reports
- Classical reports - Display the entire information in a single list.
- Interactive reports - Display the summarised information in the basic list and detailed information in the next list.
- ALV reports - Display the output with predefined functionalities such as borders, sorting, etc
Interface are used to establish the connection between SAP to SAP and SAP to non-SAP
Example: ALE/IDOC and BAPI
3. Conversion:
Conversion program are used to upload the data from the legacy system(file) to SAP system
Example: BDC, LSMW and BAPI
4. Enhancement:
Enhancement are used to add some additional functionalities to standard SAP functionalities without disturbing the existing functionalities
Example: User exit, Customer exit, Enhancement point, BADI
5. Forms:
Forms are used to prepare the business documents such as offer letters, invoice etc
Example: SMARTFORMS, SAP Script
6. Workflow:
Workflow used to automate the existing business process
ie.. Workflow is used to identify the workload of an employee as well as performance of an employee
4.Types of project
- Implementation project
- Upgradation project
- Maintenance/Support project
- Rollout project
1.Implementation project:
If we want to implement SAP from scratch, then it means implementation project.
Phases:
- Project preparation phase
- Business blue print phase
- Realisation phase
- Post preparation phase
- Go-live and support phase
Whenever there is change in SAP version, we have to implement the new features into our existing implementation is called upgradation project.
3.Maintenance/Support project:
3.Maintenance/Support project:
After project in live, it needs 24/7 support is called support project.
4.Rollout project:
Whenever company purchase a new company or to implement a new module, it means rollout project.
5.Source code
The source code of an ABAP program consists of either a statement or comment.
Statement:
Statement is the collection of operators, operands, variable and keyword.
Operators and Operands:
In ABAP we have 3 types of operators mathematical operator, comparative operator, relational or logical operator.
1.Mathematical Operator
Operators | Description | Example
+ | Addition | 3+2 = 5
- | Subtraction | 3-2 = 1
* | Multiplication | 3*2 = 6
** | Exponential | 3**2 = 9
/ | Division | 4/2 = 2
mod | Modulo division 5mod2 = 1
2.Comparative Operator
Description ` | Operator
Less Than | < or LT
Less Than or EquaL | <= or LE
Greater Than | > or GT
Greater Than or Equal | >= or GE
Equal | = or EQ
Not Equal | <> or NE
3.Relational Operator
Operator | Example
OR | a<b or a<c
NOT | a<b not a<c
Variables
Variable is the name given to the memory location.
ie.. int a = 10, where value 10 is stored in memory location 'a'
Keywords
Keywords are used to identify the type of the statement.There are many keywords like
1.Calling Keywords
2.Controlling Keywords
3.Declarative Keywords (Data, Parameter, Types, Tables, etc)
4.Definition Keywords
5.Database Keywords
6.Event Keywords
7.Operational Keywords
Comments:
Comments are non executable statements, they are used to improve the readability of the code.
Single line comment - use *
Multiline comment. - use
To comment part of the line - use "
6.Datatypes
There are two type of data types
Numeric datatypes - Integer(I), Float(F), Packed decimal(P)
Character datatype - Char(C), Date(D), Time(T), Numeric(N)
Note:
N is alphanumeric, it accepts both integer as well as character.
I, F, D, T are Fixed length data type.
P, C, N are variable length data type.
Integer(I):
Syntax: Data <variable name> Type I.
Data roll_number Type I.
Note:
Initial value of I is 0,
Float(F):
Syntax: Data <variable_name> Type F.
Data mark_1 Type F. // 10.00
Note:
Initial value of F is .00,
Packed Decimal(P):
Syntax: Data <variable_name>(<length>) Type P decimal <no>.
Data item_price(10) Type P decimal 2.
Note:
Initial value of P is .00. // Based on 'no'
Char(C):
Syntax: Data <Variable_name>(<length>) Type C.
Data name(40) Type C.
Note:
Initial value of C is 'space'.
Numeric Char(N):
Syntax: Data <Variable_name>(<length>) Type N.
Data roll_number(5) Type N.
Note:
Initial value of N is 00000.
Date:
Syntax: Data <variable_name> Type D.
Data creation_date Type D. //yyyymmdd
Note:
Initial value of D is 00000000.
Time(T):
Syntax: Data <variable_name> Type T.
Data delivery_time Type T. //hh:mm:ss
Note:
Initial value of integer is 000000.
Example:
Data: A Type I,
B Type I,
C Type I.
//Assignment
A = 10.
B = 20.
//Logic
C = A + B.
//Display
write C.
Output:
30
Note:
- In ABAP each statement ends with period(.)
- 'write' is operational statement to display the output.
- Chain operator(:) is used to declare more than one variable separated by Comma(,) and ends with Period(.)
- Data: A Type I,B Type I,C Type I.A = 10.B = 20.C = A + B.write C.
7.Technical requirement to create program
- In ABAP, All the custom program must start with either z or y.
- In ABAP, All the program must be stored in either local package/default package ($tmp) or custom package (zpackage)
- Latest version of ECC is 7.4
Steps to create the program
- Open sap log on
- Goto SE38(ABAP Editor)
- Provide the program name and click create button
- Provide title/description
- Select the type of the program as executable
- Click save button
- Enter package name or save on local package($tmp)
Steps to execute the program
- Save the program - ctrl+s
- Check the program - ctrl+F2
- Activate the program - ctrl+F3
- Execute the program - F8
Note:
- Parameter is the keyword which accepts the inputs at runtime.
- Name of the parameter should not exceeds the length of 8 character.
- Parameter cannot accept the Float data type, only accepts packed decimal.
- Default is the keyword used to provide default value to thr input variable.
- Obligatory is the keyword used to make input field mandatory.
Example:
//Declaration
Parameter: input_1 Type I default 10,
input_2 Type I obligatory.
Data: output Type I.
//Logic
output = input_1 + input_2.
//Display output
write output.
Errors:
// name more than 8 char
Parameter: Name_of_the_country Type C(5).
// only P is allowed
Parameter: Item_price Type F.
No comments:
Post a Comment