Sunteți pe pagina 1din 31

Introduction to ERP:

ENTERPRISE RESOURCE PLANNING (ERP): ERP is a package which provides solution for departmental functionalities of an organization.
An ERP System automates and integrates core business processes such as taking customer orders, scheduling operations, and keeping inventory records and financial data. ERP systems can drive huge improvements in the effectiveness of any organization by:

assisting you in defining your business processes and ensuring they are complied with throughout the supply chain; protecting your critical business data through well-defined roles and security access enabling you to plan your work load based on existing orders and forecasts providing you with the tools to give a high level of service to your customers translating your data into decision making information

1. Why we need ERP?


a. b. c. d. You Have Lots of Different Software for Different Processes. You Don't Have Easy Access to Information About Your Business. Accounting Takes Longer and Is More Difficult. Sales and the Customer Experience Are Suffering. e. Your IT Is Too Complex and Time-Consuming. 2. Advantages of ERP?

1. Complete visibility into all the important processes across various departments of an organization (especially for senior management personnel). 2. Automatic and coherent work-flow from one department / function to another to ensure smooth transition/ completion of processes. 3. A unified and single reporting system to analyze the statistics/ numbers/ status etc in real-time, across all the functions / departments.

4. Since same software is used across all departments this can avoid individual departments having to buy and maintain their own software systems. 5. Certain ERP vendors can extend their ERP systems to provide Business Intelligencefunctionalities as well. 6. Advanced e-commerce integration is possible with ERP systems that can handle web-based order tracking/ processing. 7. There are various modules in an ERP system like Finance/ Accounts, Human Resource Management, Manufacturing, Marketing / Sales, Supply Chain / Warehouse Management, CRM, Project Management, etc. 8. Since ERP is a modular software system, its possible to implement either a few modules (or) many modules based on the requirements of an organization. If more modules implemented, the integration between various departments might be better. 9. Single Database is implemented on the back-end to store all the information required by the ERP system and that enables centralized storage / back-up of all enterprise data. 10. ERP systems are more secure as centralized security policies can be applied to them and all the transactions happening via the ERP systems can be tracked. 11. ERP systems provide visibility and hence enable better/ faster collaboration across all the departments. 12. It is possible to integrate other systems (like bar-code reader, for example) to the ERP system through an API (Application Programming Interface). 13. ERP systems make it easier for order tracking, inventory tracking, revenue tracking, sales forecasting and related activities. 14. ERP systems are a boon for managing globally dispersed enterprise companies

Major ERP Packages :

Introduction to SAP & R/3 Architecture

SAP :
SAP AG is a German multinational software corporation that makes enterprise software to manage business operations and customer relations. Headquartered in Walldorf, Baden-Wrttemberg, Germany, with regional offices around the world, SAP is the leader in the market of enterprise applications in terms of software and software-related service.

Founder(s)

Dietmar Hopp Hans-Werner Hector Hasso Plattner Klaus Tschira Claus Wellenreuther

History of SAP :
Foundation[edit]
When Xerox decided to exit the computer industry, they asked IBM to migrate their business systems to IBM technology. As part of IBM's compensation for the migration, IBM was given the rights to the SDS/SAPE software, reportedly for a contract credit of $80,000. Five IBM engineers from the AI departament [3][4] (Dietmar Hopp, Klaus Tschira, Hans-Werner Hector, Hasso Plattner, and Claus Wellenreuther, all from Mannheim, Baden-Wrttemberg) were working in an enterprise-wide system based in this software, only to be told that it would be no longer necessary. Rather than abandon the project, they decided to leave IBM and start another company.[5] They had 8% in IBM founding. In exchange for this stock, they got the rights to the SAPE software as part of the deal.[citation needed]. In June 1972 they founded Systemanalyse und Programmentwicklung ("System Analysis and Program Development") as a private partnership under the German Civil Code.[5] The acronymwas later changed to stand for Systeme, Anwendungen und Produkte in der Datenverarbeitung ("Systems, Applications and Products in Data Processing" ). Their first client was the German branch of Imperial Chemical Industries[6] in stringen, where they developed mainframe programs for payroll and accounting. Instead of storing the data on punch cards mechanically, as IBM did, they stored it locally. Therefore, they called their software a real-time system, since there was no need to process the punch cards overnight (for this reason their flagship product carried an R in its name until the late 1990s). This first version was also a standalone software, that could be offered to other interested parties.

The ERP
In 1973, their first commercial product was launched. The SAP R/1, as it was called, [7] offered a common system for multiple tasks. This permitted the use of a centralized data storage, improving the maintenance of the data. From a technical point of view, therefore, a database was necessary. [8] In 1976, "SAP GmbH" was founded, and moved its headquarters the following year to Walldorf. SAP AG became the company's official name after the 2005 annual general meeting. AG is short for Aktiengesellschaft (public limited company). Three years later, in 1979, SAP launched SAP R/2, expanding the capabilities of the system to other areas, such as material management and production planning.[7]

In 1981, SAP brought a re-designed product to market. However, SAP R/2 did not improve until the period between 1985 and 1990. SAP developed and released several versions of R/3 in 1992 through 1995. By the mid-1990s, SAP followed the trend from mainframe computing to client/server architectures. The development of SAPs internet strategy with mySAP.com redesigned the concept of business processes (integration via Internet). [5] SAP was awarded Industry Weeks Best Managed Companies in 1999.[9]

Corporate Restructuring
In August 1988, SAP GmbH transferred into SAP AG (a corporation by German law), and public trading started 4 November. Shares were listed on the Frankfurt and Stuttgart stock exchanges.[5] In 1995, SAP was included in the German stock index DAX. On 22 September 2003, SAP was included in the Dow Jones STOXX 50.[10] in November 2010, SAP lost a $1.3 billion intellectual property lawsuit (related to the actions of the SAP subsidiary TomorrowNow) to Oracle Corporation cited as the largest software piracyjudgment in history.[11] SAP filed posttrial motions to lower the damage awarded to Oracle and stated it may also file an appeal. [12] On 9 September 2011, the verdict was overturned by Judge Phyllis J. Hamilton, who called the penalty "grossly excessive." [13]

Acquisitions
In 2001 SAP acquired Israeli company TopTier Software (founded in 1997) for $400 million. [14] The founder of TopTier Software Shai Agassi joined SAP and eventually was given the responsibility for the company's overall technology strategy and execution.[15] In 2008, SAP acquired Business Objects, a business intelligence company, and added its products to its portfolio. In 2010, SAP acquired Sybase in a major acquisition move. Sybase being the largest business software and service provider specializing in information management and mobile data use. In December 2011, SAP AG agreed to buy SuccessFactors Inc. for $3.4 billion in cash or 52 percent more than the share closing price on 2 December 2011.[16] In May 2012, SAP AG announced acquisition of the Sunnyvale, California-based supply chain network operator Ariba Inc. for an estimated $4.3 billion dollars. SAP said it will offer $45 a share. [17] In June 2013, SAP AG announced the proposed acquisition of Hybris (company).

Features of SAP :
a. It provides highly flexible solutions. b. The applications can be integrated easily to any kind of system.

SAP R/1: is 1-tier architecture. In which all 3 layers [Presentation + Application +Database] are installed in one systems/server. ( Server One Presentation + Application + Database ). SAP R/2: is 2-tier architecture. In which all 3 layers [Presentation + Application +Database] are installed in two separate systems/server. ( Server One - Presentation , Server Two - Application +Database) SAP R/3: is 3-tier architecture. In which all 3 layers [Presentation + Application +Database] are installed in three separate systems/server. (server One -Presentation, server Two - Application, Server Three - Database)

SAP R/2 :
SAP R/2 is a real-time (ERP) software produced by SAP. SAP R/2 followed the company's first product, a material management called RM/1. What was unique about R/2 was that it was a packaged software application that processed real-time on a mainframe computer taking advantage of time sharing option and integrated all of an enterprise's functions, such as accounting, manufacturing processes, supply chain logistics and human resources.

SAP R/3 :
SAP R/3 is the former name of the enterprise resource planning software produced by SAP AG. It is an enterprise-wide information system designed to coordinate all the resources, information, and activities needed to complete business processes such as order fulfillment or billing.

SAP R/3 APPLICATION MODULES:


SAP comes with various modules which can be broadly classified into for application areas specified above. A complete list of SAP Modules is available here: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. Basis ABAP/4 Programming FI (Financial Accounting) CO (Controlling) EC (Enterprise Controlling) TR (Treasury) IM (Investment Management) HR (Human Resource) SD (Sales and Distribution) Logistics Information System MM (Materials Management) PM (Plant Maintenance) PP (Production Planning) QM - Quality Management BW (Business Warehousing) IS (Industry Solutions) / SAP for Industries specific solutions CS (Customer Service) SMB CA (Cross Application Components) PS (Project Systems) mySAP SEM

22. 23. 24. 25. 26.

mySAP CRM (Customer Relationship Management) mySAP Product Life Cycle Management SCM (SAP Supply Chain Management) Netweaver mySAP SRM (Supplier Relationship Management).

SAP LANDSCAPE:

SAP ADVANTAGES: o SAP can support any database at the back end. o Platform independent. o Supports multiple languages. o Faster b/w networks. o Transaction failure is very less comparing 2 other erp packages (0.03%). R/3 real time data processing in 3 tier architecture. R/3 Architecture Components: 1. Dispatcher - This component acts as an interface between the PL and AS. It receives user's request from PL and allocates a work area for each request from the user. 2. Work Process - This component allocates memory area for each request received from dispatcher on a roll-in and roll-out basis. Once a request is processed, the memory area is rolled out to allocate for next request from dispatcher. 3. Database Connectivity - OPEN SQL - It receives each user's request in open SQL format (INSERT, UPDATE, DELETE, MODIFY) and converts them in native SQL format (Database used at the back end). - NATIVE SQL - It checks for syntax errors in requests received and passes the request to database through gateway service. 4. Message Service - If there is any syntax errors in requests received, the Native SQL component uses message service to raise error messages for the end user from the message pool. Message pool is a container of user defined and pre-defined messages. 5. Gateway Service - If there is a distributed database at the back end, user's queries are redirected to appropriate database using gateway service. This component acts as an interface between AS and DL. What Is CLIENT In Sap? o CLINET represents an organization or a company. o CLIENT is the topmost hierarchy in SAP database. o Each functional module in SAP is assigned a client. o The data is protected at the client level ie the user of CLIENT A cannot see the data in CLIENT B.

Navigate to SAP SCREEN: 1. Menu: By navigating through the menu. 2. Transaction code: By entering the t-code in command field(shortcut).

Introduction to ABAP/4 ABAP/4 ABAP (Advanced Business Application Programming) is a high Level programming language created by the German software company SAP. It is currently positioned as the language for programming SAP's Web Application Server, part of its Net Weaver platform for building business applications. Its syntax is somewhat similar to COBOL. Role of ABAPer: o Screen creation. o Table creation. o Data migration. o Reporting. o Redirecting SAP data from d-base to o/p devices. (Scripts & forms). Abap program Layout: -> Abap Program is not independent, but a component of an Application. o o o o o o
o

ABAP is not case sensitive. ABAP is case sensitive only during comparison. Every ABAP statement should end with a period (full stop). CTRL+S shortcut key is used to save ABAP codes in editor. CTRL+F1 shortcut key is used to transform the screen into CHANGE/DISPLAY mode. CTRL+F2 shortcut key is used to check for syntax errors in source code. CTRL+F3 shortcut key is used to activate current program.

Abap accept values from GUI screen only. ACTIVATION: Steps: Sap checks for syntax of the program. Sap compiles the program. When Compiled, intermediate code: ABAP-LOAD is generated. ABAP-LOAD is placed in runtime environment (RTE). RTE executes the ABAP-LOAD. If the program is not activated the ABAP-LOAD is discarded every time, if activated the ABAP-LOAD is places in RTE permanently. When Activated, RTE executes directly the ABAP-LOAD as it was already loaded on activation.

Without Activation : You cannot execute program outside Abap Editor. Cannot set dynamic breakpoints in the debugger. If you make changes to Active Program Then we will have both ACTIVE and INACTIVE versions of the program and Active is replaced on activation of the INACTIVE version.

Transaction Codes
SAP Online Service System SE12 Dictionary: Initial Screen enter object name SE37 ABAP/4 Function Library. ABAP/4 Function Modules SE14 ABAP/4 Dictionary: Database Utility. SE38 SE38 SE38 ABAP Editor ABAP/4 Editor. ABAP/4 Program Development SE39 Split-screen Editor: Program Compare SE41 SE16 SE16 Data Browser SE43 Maintain Area Menu Screen Painter Screen Painter: Initial Screen. SE17 SE30 General Table Display SE54 ABAP/4 Runtime Analysis SE61 SE30 ABAP/4 Runtime Analysis: Initial Screen. SE30 SE32 Run Time Analysis ABAP/4 Text Element Maintenance SE35 SE36 ABAP/4 Dialog Modules ABAP/4: Logical SE63 SE64 SE65 Translation Terminology R/3 documents. Short text SE62 SE63 Industry utilities Translate Short/Long Text. R/3 Documentation Generate View Maintenance Module Data Browser: Initial Screen. SE51 SE51 Menu Painter SE13 Access tables in ABAP/4 Dictionary. SE37 Databases

OSS1

OY19

Compare Tables ABAP Development Workbench

S001

S002 SA38 SCAT

System Administration. SE14 Execute a program. Computer Aided Test Tool SE15 Utilities for Dictionary Tables ABAP/4 Repository Information System SE15 ABAP/4 Repository Information System.

SCU0 SE01

Compare Tables Old Transport & Corrections screen

SE09 SE10 SE10

Workbench Organizer Customizing Organizer

SE16 Customizing organizer requests for user (To release for transport - enter user name, press Enter. Select changed object and select ReleaseSE10 New Transport & Correction screen) SE11 ABAP/4 Dictionary Maintenance SE12 ABAP/4 Dictionary Display SE13 Maintain Technical Settings (Tables) SE11 ABAP/4 Dictionary.

Display table contents

statistics SE66 R/3 Documentation Statistics (Test!)

SE77

SAPscript Translation Styles

SE87

Data Modeler Information System

SE80 SE68 Translation Administration SE80 SE71 SE71 SAPscript layout set SAPscript Layouts Create/Change SE72 SE73 SAPscript styles SAPscript font maintenance (revised) SE74 SAPscript format conversion SE75 SE76 SAPscript Settings SE86 SAPscript Translation Layout Sets SE85 SE84 SE82 SE81

ABAP/4 Development Workbench Repository Browser: Initial Screen.

SE88

Development Coordination Info System

SE91 SE92

Maintain Messages Maintain system log messages

SAP Application Hierarchy SE93 Customer Application Hierarchy SE93 ABAP/4 Repository Information System ABAP/4 Dictionary Information System ABAP/4 Repository Information System SEU

Maintain Transaction Codes Maintain Transaction Object Browser

Multitasking Commands
[+] Variable manipulation(TRANSLATE, CONDENSE, TAB, ROUND, MOD..) Commands to change the contents of ABAP data fields RANGE Command Create a range table which is used to store a range of values, same structure as a select option ABAP WRITE command Display basic report output to user ABAP MODIFY command Modifying data within an ABAP internal table or database table UPDATE command Updating data within an SAP database table AUTHORITY-CHECK SAP command Used to check if a user has authroity to view/change sap data

EJECT command to force a new page when printing Forces new page when printing ABAP code listing DESCRIBE SAP command The describe command is used to describe certain properties of and internal table STRLEN command Get value length of a SAP field using STRLEN command MEMORY ID - Export and Import Pass data between sap programs using MEMORY ID (Export/Import) SELECT Command Selecting data from SAP databases SUBMIT report (Excecute rep from within a rep) Executing a report from within another report using the SUBMIT statement VARYING Command Function of the DO loop which allows you to move horizontaly along a table row without actually having to specify each individual field name STARTING NEW TASK Execute function module using STARTING NEW TASK statement IN UPDATE TASK Execute function module using IN UPDATE TASK statement IN BACKGROUND TASK Execute function module using IN BACKGROUND TASK statement DELETE command Delete entries of an SAP internal table using the DELETE command READ command Get entries of an SAP internal table using the READ command

COLLECT command Insert entries into an SAP internal table and sum up interger values using the COLLECT command PERFORM command - passing internal table Using the perform command to pass internal table.

Comments Full Line comments (*Hello all). Inline Comments (A=10. Value of A is 10). Errors Syntax Error Program is not following the standard programming rules. Runtime Error Program is syntactically correct and compiled but failed to execute.(ST22). Logical Errors - Prog is syntactically correct and compiled but the output is not as expected. ABAP/4 Editor ( SE38 )
ABAP Editor is a source-code editing tool designed to handle the specifics of ABAP coding. It is one of the main components of the ABAP Workbench.

Topics
Overview of the ABAP Editor Provides an overview of the features of the editor, the different modes it has Front-End (new and old) and Back-End and a procedure for switching between these modes. Creating a Program A guided procedure for creating a new program in the ABAP Workbench. Editing a Program Provides a set of procedures for editing ABAP source code such as navigating in the source code, using the Find and Replace function, inserting statement patterns and the Pretty Printer function and so on. Checking a Program Describes the process of performing standard and extended syntactical and semantic checks. Saving and Activating a Program A procedure describing how to save and activate an ABAP program. Local Editing Describes how to download your source in order to edit it locally and how to upload it back to the system.

Steps for Creating a Program


There are three options to create a program in the Repository Browser: a. In the navigation area, choose the object type Program and enter the name of the program in the input field below. Confirm with Enter. If the program does not exist, the system displays a dialog that allows you to create a program. 1.

b. Display the package where you want to create the program. You can access the dialog for creating a program from the context menu for the package ( Create Program) or the Programs node. c. Choose the button Edit Object on the initial screen of the Object Navigator. On the Program tab page, choose Continue. You can use steps 1a and 1b to create any type of object in the Repository Browser. 2. If you want to create an Executable Program (Report), deselect the option With TOP Include. If you want to create a Module Pool, choose this option. 3. Choose Enter to continue. 4. If you have selected the option With TOP Include, a dialog box appears in which you should enter a name for the TOP include. 5. Choose Enter to continue. A dialog box appears in which you can set other program attributes. For more information on each of the attributes, see also Maintaining Program Attributes. 6. Enter the program attributes and choose Save. The system displays the Create Object Catalog Entry dialog box. 7. Assign a package to the program. 8. Choose Save to confirm your entries. The program is added to the object list of the assigned package and is displayed under the Programs object node. The system starts the ABAP Editor and the program is displayed in change mode.

Elements in R/3 Screen


http://www.abapprogramming.net/2007/08/lesson-39-screen-elements-for-output.html

Operators in ABAP
Assignment Operators The assignment operators = and ?= associate the source and target field of an assignment. The operator = also associates actual parameters with formal parameters, for example in procedure calls or when working with data clusters. Arithmetic Operators The arithmetic operators +, -, *, /, DIV, MOD, and ** associate two or more numeric operands with an arithmetic expression. In addition, the characters + and - act as plus/minus signs in arithmetic expressions. Bit Operators The bit operators BIT-AND, BIT-OR, and BIT-XOR associate two or more byte-like operands with a bit expression. The bit operator BIT-NOT negates a byte-like operand. String Operators The string operator && chains two character-like operands to a string expression. Relational Operators The relational operators =, <>, <, >, <=, >=, and so on associate two operands of any data type with a logical expression. There are additional relational operators for specific data types.

Boolean Operators The boolean operators AND, OR, and EQUIV associate the results of individual logical expressions with a logical expression. The result of a logical expression is either true or false. The boolean operator NOT inverts the result of a logical expression. Literal Operator The literal operator & associates two literals or two string templates with a literal or a string template.

Data, Parameter & Constant Statements Data: Used to declare data types. Data A type I. Parameter: PARAMETERS statement to declare variables in a similar manner to the DATA statement
Variables declared with the PARAMETERSstatement are called parameters. For each parameter declared, an input field appears on the corresponding selection screen.

Constant : Declared similar to that of DATA but the value of a constant must be defined when you
declare it. It cannot subsequently be changed. CONSTANTS: pi TYPE p DECIMALS 10 VALUE '3.1415926536'.

Data Types & Classification:

Data Types (Numeric, Non-Numeric):

Numeric Int(Whole Numbers) , Float(to store Large and very small values), Packed(to store fixed number of decimal points). Non-Numeric Char (alpha-numeric), Num (Numbers stored as characters), Date (YYYYMMDD), Time (HHMMSS), String. DataType Initial Length INTEGER FLOAT PACKED CHAR NUM DATE TIME 4bytes 8 8 1 1 8 6 Valid Length Default Value 0 0 0 space 0 00000000 000000

4 8 1-16 1-65535 1-65535 8 6

Data Objects & Classification 1.Data objects are the physical units a program uses at runtime. 2.Each data object has a specific data type assigned to it. 3.Each data object occupies some space in memory.

Text Elements
Text elements are used to store texts displayed on the selection screens or output screens of ABAP reports, but are not hard-coded in programs. The different types of text element include: Report or program titles List headers Column headers Selection texts Text symbols

String Operations

CONCATENATE <Str1> <str2><str N> into <str> separated by <Separator>

REPLACE <str1> with <str2> into <str>. SPLIT <String> AT <separator> into <str1> <str2>.<str N>. SHIFT: By default shift to left by one place SHIFT <str> <LEFT/RIGHT/CIRCULAR> by <N> places. (N>0) SHIFT <str> LEFT DELETING LEADING <CHAR>.

SEARCH: searches for the required main string in the main string SEARCH <str> FOR <str1>. CO(Contains only): IF <str1> CO <str2>. Is TRUE if string1 contains only the characters from string2 the comparison is case sensitive including spaces

Control Statements If. { IF, IF-ELSE} Case. { CASE-ENDCASE} Loops.


LOOPS:

Unconditional Loop. ( DO -----------ENDDO.) Used when exact Number of iterations is known. Conditional Loop. (WHILE---------ENDWHILE). Looping based on condition. Single Loop. (LOOP---------ENDLOOP). Used for Processing Internal Table data. Query Loop. (SELECT ---------ENDSELECT) To fetch data from DB table.

Field strings
A field string is a type of variable, and is the equivalent of a structure in the DDIC but is defined within an ABAP/4 program. Like a structure, a field string is a series of fields grouped together under a common name. The difference lies mainly in where the definition resides. The term structure in R/3 applies only to a Data Dictionary object containing a collection of fields. The term field string applies to a collection of fields defined in an ABAP/4 program. data: begin of fs1, f1[(l)] [type t] [decimals d] [value 'xxx'], f2[(l)] [type t] [decimals d] [value 'xxx'], ... end of fs1.

ABAP Dictionary

ABAP Dictionary Introduction ABAP/Data DICTIONARY (SE11) : To define and maintain global data definitions. Changes to ABAP DICT is effected in all the three layers of sap through activation. Changes stay local to workbench till activation. Anything we define in ABAP DICT is called Dictionary Object. Advantages: Reusability, Non-Redundant, Globally.

The most important object types in the ABAP Dictionary are:1. 2. 3. 4. 5. 6. 7. Tables Views Data type. Type Group (data element, structure, table type). Domains Search Helps Lock objects

Data Dictionary Functions It allows you to add, delete, modify, and, in general terms, manage the definitions of the dictionary data (activation, version handling, etc.). It allows you to reserve the data integrity. It is a central source of information. From the dictionary, you can get information about the defined relations between the system tables. It allows direct access to the data in the underlying database system. The dictionary tells whether a table is active, empty, or contains data, and so forth. It acts as the central layer for software development. The ABAP dictionary is an active component of the SAP environment. Every created or modified element of the data dictionary (every definition) can simultaneously and automatically be used in every software component that includes that definition. The ABAP dictionary is integrated in the development environment and in the SAP application environment using call interfaces. With those call interfaces, the programs can directly access the information stored in the dictionary.

Data Dictionary Objects


Tables Tables are defined in the ABAP Dictionary independently of the database. From this table definition follows the creation of a table with the same structure in the underlying database. Views Views are logical views of more than one table. The structure of the view is defined in the ABAP Dictionary. A view of the database can then be created from this structure. Types The structure of a type can be defined globally in ABAP programs. Changes to a type automatically take effect in all the programs using the type. Lock objects These objects are used to synchronize access to the same data by more than one user. Function modules that can be used in application programs are generated from the definition of a lock object in the ABAP Dictionary. Domains Different fields having the same technical type can be combined in domains. A domain defines the value range of all table fields and structure components that refer to this domain.

Data Base Tables


Tables can be defined independently of the database in the ABAP Dictionary. The fields of the table

are defined with their (database-independent) data types and lengths. A table definition in the ABAP Dictionary contains the following components: Table Fields: Table fields define the field names and data types of the fields contained in the table Foreign keys: Foreign keys define the relationships between the table and other tables. Technical settings: Technical settings control the creation of the table in the database. Indexes: To speed up data selection, secondary indexes can be created for the table. TYPES of Tables:
Transparent Table : (One to one relation)Exists with the same structure both in dictionary as well as in database exactly with the same data and fields. Pooled Table (Many to one relationship) Pooled tables are logical tables that must be assigned to a table pool when they are defined. Pooled tables are used to store control data. Several pooled tables can be cominied in a table pool. The data of these pooled tables are then sorted in a common table in the database. Cluster Table (Many to one relationship) Cluster tables are logical tables that must be assigned to a table cluster when they are defined. Cluster tables can be used to strore control data. They can also be used to store temporary data or texts, such as documentation.

Structures
A structure (structured type) comprises components (fields). Types are defined for the components A component can refer to an elementary type (via a data element or by directly specifying the data type and length in the structure definition), another structure or a table type. A structure can therefore be nested to any depth.

Views The data of a view is derived from one or more tables, but not stored physically. The simplest form of deriving data is to mask out one or more fields from a base table (projection) or to include only certain entries of a base table in the view (selection). More complicated views can comprise several base tables, the individual tables being linked with a relational join operation.
Database views are implemented with an equivalent view on the database. Projection views are used to hide fields of a table (only projection). Help views can be used as selection method in search helps. Maintenance views permit you to maintain the data distributed on several tables for one application object at one time.

Data Elements
Data element contains the business and technical information about a field. It contains Data type, length, field labels. Data element can contain a domain within it for type and length information instead of 'built-in type' and we can also associate search help with Data Element.

Type Groups

Type-group or Type pool is a collection of Data types and Constants which can be called globally from any program. eg: Type groups delivered by SAP - ABAP,SLIS..

Any ABAP program can use this definition with the TYPE-POOLS statement: TYPE-POOLS hktst. DATA: dat1 TYPE hktst_typ1, dat2 TYPE hktst_typ2 VALUE '1.23'. WRITE: dat2, / hktst_eleven. The output is: 1.23, 11 Maximum length of type-group name can be 5. in Type Group is that every object must start with <name of type group>_. In this example the constants that are declared starts with ZATYP_. The system gives syntax error in case the above naming convention is not followed.

Domains
A domain describes the technical attributes of a field, such as the data type or the number of positions in a field. The domain defines primarily a value range describing the valid data values for the fields referring to this domain.

Search helps
The search key is invoked automatically from a search help when the user presses the F4 key to display allowable values for the field to choose. 1. 2. Elementary Search Help. Collective Search Help. (Combination of few elementary search helps). Elementary Search help: 1. Dialog (Window to select, filter values). 2. Hit list. (List of data).

Lock objects
It is used to synchronize access to the same data by more than one user.

Primary Key And Foreign Key



A primary key is a field or group of fields that uniquely identify a record in a table. Primary key fields cannot be NULL and cannot contain duplicate values. If you want to link two tables, then primary key of one table will be added to another table where primary key of first table will be become the foreign key of second table.

Table Maintenance Generator


Table Maintenance Generator is a tool used to modify the tables created by end users and can be changed as required, such as making an entry to that table, deleting an entry etc.
Prerequisite To make this feature work care should be taken while creating the database table that in the 'Delivery and Maintenance' tab, the 'Table View Maint.' should have the "Maintenance allowed" property defined.

Transaction Codes: SE54: Generate Table Maintenance Dialog SE55: Table view maintenance DDIC call SE56: Table view display DDIC call SE57: Deletion of Table Maintenance SM30: Maintenance Table Views:

SAP ABAP Packages

Creating a package
At the beginning of a development project the aspects of software logistics and naming conventions (Z or a customer namespace) are first challenges. Usually packages and namespace prefixes for development objects are defined to group some objects according some obvious properties: there is one package for FI development, another one for HCM and so on.

Go to SE80, and choose packages in the dropdown list. Then type the name of the package you want to create, and press enter. System will prompt you to create the package.

Difference between local objects & packages Local objects cannot be transported but the packages can be transported by assigning a transport request to them. Transferring local objects to packages

go to SE80-->local object now click on your object which is inside local objects and do right click >other function>change package assignment-->give the name of package

SAP ABAP Variants

Variants Introduction
Variants allow you to save sets of input values for programs that you often start with the same selections. You can use them for any programs except subroutine pools (type S). Variant : When a program or report is executed ,specific settings can be saved, that saved settings is called a variant. It saves time by auto-entering the parameters on the screen.

Creating variants in ABAP Editor & Data Dictionary


On the initial screen of the ABAP Editor, enter the name of the program for which you want to create a variant, select Variants in the Sub-objects group box, and choose Change. On the variant maintenance initial screen, enter the name of the variant you want to create. Note the naming convention for variants (see below). Choose Create. If the program has more than one selection screen, a dialog box appears in which you can assign the variant to one or more screens. The dialog box does not appear if the program only has one selection screen. In this case, the selection screen of the program appears straight away.

SAP ABAP Message Classes:


Messages (SE91): These are like alerts for end-users to provide response to a specific action or an operation. Messages can be called in any program unit using the keyword Message. Syntax: Message I002 (ZMSG). Message Types: I (Information), S (status), A (Abort), W (Warning), E (Error), X (Exit with dump). 3 digit message number (000 to 999).

Selection screen Introduction


There are three ABAP statements for defining selection screens: PARAMETERS for single fields SELECT-OPTIONS for complex selections

SELECTION-SCREEN for formatting the selection screen and defining user-specific selection screens

Parameter Statement (for a single field ex:Country) If you want to enable the user to enter values for single fields on the selection screen, you must define specific variables (parameters) in the declaration part using the PARAMETERS statement. Each parameter declared with the PARAMETERS statement appears as an input field on the relevant selection screen. Parameters are used for simple queries of single values. For example, you can use parameters to control the program flow. Select-options Statement (for range ex: from to)
The by far most important function of selection screens is to allow users to minimize the data to be read before database tables are actually accessed. In this context, a user can also be a calling ABAP program. This important function of selection screens is also illustrated in Executing Reports Directly.

Screen Table and fields:

SCREEN is like an internal table with a header line. However, you do not have to declare it in your program. You cannot display it in the Debugger, and cannot use any work area other
The final column contains the corresponding attributes of the screen fields in the Screen Painter.

Dynamic screen modification by using Modif Id key


Dynamic screen modification is where based on user selection , certain changes are made on the screen elements. There are many changes possible but the most commonly used is activation and deactivation of that screen element. To dynamically display or hide a screen element , follow this procedure. 1. Declare a checkbox or radio button which can be used to hide/unhide the screen element. 2. Always add User-command to that checkbox or radio button other wise dynamic screen modification is not possible.

3. Club the elements you want to display or hide by using modif id 4. At selection screen output , loop at screen and check the value of checkbox . 5. Deactivate all screen group elements by modif id by using screen-active =0 for that group. 6. Use modify screen before the loop to modify.

SAP ABAP Open SQL Statements

Select = used to select the fields of the database table.


SELECT INTO FROM [WHERE [GROUP BY [HAVING [ORDER BY <result> <target> <source> <condition>] <fields>] <cond>] <fields>].

Insert = used to Adds lines to database tables

Inserting single line:

INSERT INTO <target> VALUES <wa> . The contents of the work area <wa> are written to the database table <dbtab>. The work area <wa> must be a data object with at least the same length and alignment as the line structure of the database table. The data is placed in the database table according to the line structure of the table, and regardless of the structure of the work area. It is a good idea to define the work area with reference to the structure of the database table. Inserting Multiple Lines:

NSERT <target> FROM TABLE <itab> [ACCEPTING DUPLICATE KEYS] . This writes all lines of the internal table <itab> to the database table in one single operation. The same rules apply to the line type of <itab> as to the work area <wa> described above. If the system is able to insert all of the lines from the internal table, SY-SUBRC is set to 0. If one or more lines cannot be inserted because the database already contains a line with the same primary key, a runtime error occurs. You can prevent the runtime error occurring by using the addition ACCEPTING DUPLICATE KEYS. In this case, the lines that would otherwise cause runtime errors are discarded, and SY-SUBRC is set to 4. The system field SY-DBCNT contains the number of lines inserted into the database table, regardless of the value in SY-SUBRC. Whenever you want to insert more than one line into a database table, it is more efficient to work with an internal table than to insert the lines one by one.

Modify = Used to Inserts lines into database tables or changes the contents of existing lines.
MODIFY <target> FROM TABLE <itab> .

Update = Used to Changes the contents of lines of database tables


UPDATE (<name>) [CLIENT SPECIFIED] <lines>.

Delete = Deletes lines from database tables.


DELETE FROM <target> WHERE <cond> .

SAP ABAP Internal Tables


1. Internal Table: Array of Structure.
It is a standard data type object, which exists only during the runtime of the program.

Can process multiple records of data at a time. Used to enhance the performance by processing large volumes of data. Used to extract, process, update data from the DB table as every SAP application interacts with DB table. Without ITAB every DB table operation will interact with DB to increase complexity. It extracts data once and can do lots of operations on it and updates it in a single step. It comes with dynamic memory management. If we have * + in front of ITAB then it is a BODY else HEADER LINE. Use move-corresponding emp to emp1 if the records are not identical. Types of ITABs: 1. Standard table - searches based on index of the row. 2. Sorted table searches based on key. 3. Hashed table if the requirement is just to access the data not data processing. Data Processing in Internal Table: Append to copy data to the body of ITAB from Header Line. Append itab to jtab. (To copy HL of ITAB to body of JTAB). Append lines of itab to jtab. (To copy ITAB body data to body of JTAB). Insert to insert data at your desired location in the ITAB. (Insert itab into jtab index 3). Modify To change records of a single ITAB. Itab-a = 200. Modify itab index 3. Without changing other value Modify itab index 3 TRANSPORTING A. Read : To read table entries. read table itab with key B = 80 A = 12. (displays the value B=80 where A = 12). Read table itab index 2. Clear to clear the HL of the ITAB. Refresh Deallocates the data but the memory remains intact. ( to delete the whole data). Free - Deallocates the complete the complete memory of the ITAB so we lose the data. Collect to sum values of duplicate columns. At least one non-numeric column is required for collect. If no duplicate columns then collect works as append. Editor-call It will work if all the columns are non- numeric. Describe To know how many data rows in the ITAB.

Joins : Inner join access data from 2 table using SQL using alias names. Select k~kunnr k~name1 V~vbeln v~ erdat into table ITAB from kna1 as k Inner join vbak as V on k~kunnr = v~kunnr. Left outer join- all the values from the 1st table is displayed with common values of 2nd table. Right outer join- all the values of 2nd table is displayed with common values of 1st table.

Debugging Techniques

Debugging Techniques Introduction

Debugging is a process to understand program behavior in runtime. SAP has a inbuilt debugger which is part of the ABAP workbench. Debugging steps There are two possible strategies for starting the Debugger in the ABAP Workbench: By running the program in debugging mode. By setting breakpoints then running the program Running a Program in Debugging Mode

Two types of debuggers: a. Classic Abap Debugger.(old) b. New Abap Debugger.(New)

Break-points (Static & Dynamic)


At particular LINE of SOURCE CODE the system will STOP there. F5: To go next line

F6: To execute a subroutine/ Functional Module in one step (If you dont want to debugg the code inside the subroutine). F7: If you want to come out from a subroutine or functional module. F8: End the debugging.

Static BreakPoint: Static breakpoints are not normally user-specific. However, you can make them user-specific. Dynamic BreakPoints: Dynamic breakpoints are displayed as stop signs in the Debugger and ABAP Editor. Unlike
static breakpoints, they are user-specific, and are deleted when you log off from the R/3 System.

Note :
Breakpoint at statement: The Debugger stops the program directly before the specified statement is executed. You set this special kind of dynamic breakpoint in the Debugger. Breakpoint at event: The Debugger stops the program directly before an event, subroutine, or module pool is called. You set this special kind of dynamic breakpoint in the Debugger. Breakpoints at System Exceptions: The Debugger stops the program directly after a system exception, that is, after a runtime error has been intercepted by a CATCH statement.

Watch points :

Watchpoints allow you the option of monitoring the content of individual variables.The Debugger stops as soon as the value of the monitored variable changes.You can use max of 5 watchpoints.
Call Stack (a technique) in ABAP Debugger displays an active event chain and the call sequence up to the recent break point. The stack displays all the events that are part of the ABAP program and gives the programmer the flexibility to navigate to any particular event in the ABAP editor

call stack

Options to step through the program in Debugging Editor


Debugging steps ---> 1. Execute the report using F8. 2. type /h in tcode input field. 3. Execute again with F8. this will start ABAP debugger you can see the values of any field or tables using the controls in debugger. 4. F5 will execute report line by line 5. F6 will execute any block of report like PERFORM or any Function Module 6. F7 will get the debugger to line at which break-point has been given

SAP ABAP Modularization Techniques

Modularization Techniques Introduction: Dividing the code into smaller modules for better performance and improvements on demand.
Macros Macro: Local to the program, always call macro below the definition and it is cannot be

debugged. DEFINE -------END OF DEFINITION.

Includes : Global, cannot be executed directly , type of an abap program. Include zincl. Subroutines : local components to the program. Subroutines and main program can exchange/ pass parameters. Parameters are passed by value and reference. Subroutines and main program share the same component of the memory. PERFORM SUB1----------FORM SUB1---ENDFORM. Subroutines should be always places at the end of the main program. No code below ENDFORM, else it will not be executed. Main Prog -> Subroutine -> Subroutine Definition -> Main Program. Passing Parameters to Subroutines
If a subroutine has a parameter interface, you must supply values to all of the formal parameters in its interface when you call it. You list the actual parameters after the USING or CHANGING additions in the PERFORMstatement.

When you pass the values, the sequence of the actual parameters in the PERFORMstatement is crucial. The value of the first actual parameter in the list is passed to the first formal parameter, the second to the second, and so on. The additions USING and CHANGING have exactly the same meaning. You only need to use one or the other. However, for documentary reasons, it is a good idea to divide the parameters in the same way in which they occur in the interface definition.

Function Groups & Function Modules


Function Group: Function groups are containers for function modules. You cannot execute a function group. When you call an function module, the system loads the whole of its function group into the internal session of the calling program (if it has not already been loaded). For further information, refer to Organization of External Procedure Calls. Function Module:

FM is global procedures which can be used and accessed across SAP System. Each FM is defined in a function group. Function Group is a logical collection of FMs. Tabs in FM are import, export, changing, tables, Exceptions and Source Code. If you call any FM, then the whole FG is loaded into the memory. Tabs are import,export,changing,tables,exceptions and source code.

SAP ABAP Reports


1. 1. 2. 3.

Reports Introduction Classical Reports Interactive Reports Techniques Used For Interactive Reports Hotspot Hide Get Cursor

ALV Reports Interactive ALV Reports Saving Report Output to PDF OOPs ALV SAP Query Dialog / Module Pool Programming/ Transactions

MPP Introduction Relationship between Screen, Flow Logic and Program Screen Painter Menu Painter

Creating Transaction Codes Flow Logic Events Process Before Output (PBO) Process After Input (PAI) Process On Value Request (POV) Process On Help Request (POH) Include Programs in MPP Dynamic Screens Leave Screen Leave to Screen Call Screen Set Screen Processing of List from Transaction and Vice Versa Elements in Screen Layout Table Controls Tabstrip Controls Subscreens Object Oriented ABAP Overview Defining a Class Implementing a Class Encapsulation and Implementation Hiding Object Initialization and Cleanup Inheritance Polymorphism Dynamic Method Call Binding Interfaces Interface Inheritance Vs Implementation Inheritance Inheritance Vs Composition BDC Introduction Recording BDC Methods Call Transaction Method Session Method Handling Table Controls in BDC Different Methods

SAP ABAP OOPS Concept Training

SAP ABAP Batch Data Communication

Legacy System Migration Workbench (LSMW)

Flat file creation Uploading data File Handling Application Server Presentation Server SAP Scripts Introduction Components of SAP Scripts Layout Set Standard Text Out Put Program Modifying Standard SAP Script Layouts Including Logos SAP Script Utilities Upload / Download Smart Forms Introduction Graphics Management Style Maintenance Paragraph Formats Character Formats Writing print program and designing layouts

SAP ABAP Scripts

Smart Forms

Runtime Analysis & SQL Tracing Cross Applications


Introduction to Distributed Environment Introduction to Cross Applications Introduction to RFC Creating RFC Destination between 2 Systems Creating Remote Enabled Function Modules Creating program using Remote Enabled Function Modules ALE Basics Overview of Outbound & Inbound Process Configuration Steps Define logical systems Assign client to logical system RFC destination Customer distribution model

RFC

ALE

Creating Ports What is an Idoc? Types of Idocs Basic Idocs Extension Idocs Creating Idocs Message Types Assigning Idoc type to Message type EDI Basics Difference between ALE & EDI Overview of Outbound & Inbound Process Configuration Steps Port Creation Partner Profile Creation BAPI Overview Creation of BAPI Finding Standard BAPIs Enhancing Standard BAPIs User Exits Overview Finding and Implementing User Exits Customer Exits Overview Finding and implementing Customer Exits Types of Customer Exits Field Exit Screen Exit Function Exit Menu Exit BADIs Overview Defining a BADI Implementing a BADI Enhancement Points Explicit and Implicit Enhancements

IDocs

EDI

SAP ABAP BAPIs

SAP ABAP User Exits

SAP ABAP BADIs

SAP ABAP Miscellaneous Topics

Correction & Transport request (CTS) Transport Organizer Work Bench Request Task Creation Release Objects SAP Memory & ABAP Memory Logical Database

S-ar putea să vă placă și