Escolar Documentos
Profissional Documentos
Cultura Documentos
e System (example SAP) SAP Divisions or functionality: o Functional o ABAPer o BASIS ABAP/4:
Classified under 4th generation language because DSN (Datasource Name or database connection) is not needed to be setup
SAP R/3: SAP Realtime Three-Tier Architecture (need to confirm, not in Notes) Mysap.com overview and Internet Technologies o SAP R/3 Enterprise Provides a wide array of core business applications (such sa Financial Accounting, Human Resources Management) Complements all SAP solutions and can be used as an ERP Backend o mySAP CRM o
Allows access to SAP components from the Internet: Via SAP ITS
automatic conversion of SAP screens into HTML format Use of SAP GUI for HTML Use of screen-based IACs (internet application components) From the slide: needs Web server to communicate to the internet
Via SAP Web AS Introduces ICM (Internet Communication Manager) o Allows direct communication to the internet o Uses BSPs html pages with Abap coding (like JSP, ASP)
o SAP Gui for HTML cannot be used in SAP Web AS. SAP Netweaver Stack of components Process Integration o Integration with other systems
People Integration o Enterprise Portal Master Data Management o Like BW BI o Business Intelligence Uses ABAP and Java
Three Types of GUI: o SAP Gui for Windows o SAP Gui for Java o SAP Gui for HTML Interface Technologies used in SAP Systems o SAP is an open system because it supports a wide variety of network communication protocol to communicate with other systems (rows in black)
Other Communication Interfaces on RFC, CPI-C and OLE: BAPI Business Application Programming Interface EDI Electronic Data Interchange ALE Application Link Enabling Uses BAPI interfaces and Idoc data containers Can be synchronous and asynchronous Uses Consistent data R/3 Application Programming support the following communication interfaces: OLE: Object Linking and Embedding RFC: Remote Function Call Based on CPI C Is the protocol for calling special subroutines over the networks Has a defined interface CPI-C: Common Programming Interface Communication TCP/IP Transmission control Protocol Used by SAP to communicate to component Systems and other systems SNA LU 6.2 System Network Architecture; Logical Unit 6.2 Used to communicate to Mainframe R/2 Systems Developed by IBM
Remote Function Calls: Almost the same as local function calls except that an additional parameter, Destination, is specified. This parameter defines the target logical system to call the function module Types of RFC Calls: Synchronous: ABAP program waits for the reply from the RFC before the next statement is processed Asynchronous: ABAP program does not wait for the reply from the RFC call. Transactional:
Several RFCs are grouped into one transaction (one SAP LUW) In the destination system, they are called in sequence. Use SM58 to check if errors happened during RFC call. The SAP service marketplace
Website for customers and partners to provide information on all SAP productsd Service.sap.com
SAP Logon Use SAP GUI logon program to connect to an SAP System Config file: saplogon.ini
SAP systems are client systems. Each client has their own set of data and customization in the SAP system.
Sessions 9 Internal Sessions 6 External Sessions SAP EASY ACCESS the main screen of the SAP system. Screen elements:
Command Field type tcodes to access system Menu Bar shows available menu options Standard Toolbar list of standard functions available in every screen. Specific buttons are disabled if they are not application. Application Toolbar specific buttons relevant to the current application Title Bar: application name CheckBoxes Radio Buttons Tab Status Bar- displays warning and errors
Favorite List and User Menu Roles: Lists the possible activies that a user can do depending on the role assigned to the user Favorites user-specified shortcut to frequently used functions.
System and Help Menus: System Menu: o Create / End Sessions creates and end sessions o User Profile: user specific settings o List important list functions o Status displays the most important user and system data o Logoff log off from R/3 System Help Menu o Context-sensitive help o SAP Library Call o Glossary
The SAP R/3 Repository is client-independent. It contains: o Abap dictionary objects o Abap programs o Menus
o Screens Repository Objects developed in one client are the same in all other clients Since the repository is cross-client, it is not possible use a development system as a production system
ASAP ROADMAP Business Blueprint o Gap Analysis o Asis o To Be Realization Testing Go-Live Changes to repository Objects: All customer developments take place in the customer namespace. Customer NameSpace: Y or Z Processing User Requests: USER via SAP GUI: o Inputs data where SAP GUI send the request to the application server o Receives the reply from the application server Application Server: o The dispatcher is the central process of the application server o The dispatcher manages the resources for all the applications written in ABAP. o Its main task is to distribute the transaction load to the work processors, connect to the presentation level and organize communicate. o Dispatcher receives the request from the user and saves it in a request queue (FIFO) o The dispatcher distributes the requests to the available work processes. o Upon initialization: Dispatcher reads system file parameters, starts work processes and logs on to the message server. SAP GUI Types (4-9):
SAP GUI for Windows: CLASSIC SAP GUI for Java SAP GUI for HTML plain old internet browser
Presentation Layer (4-10): The Client program (SAP GUI for Windows and Java) uses the DIAG Protocol. SAP Database Basis Layer (4-11): SAP uses a RDBMS to store and manage data. In Abap, we use OPEN SQL to take advantage of DB portability and Buffers used by the Database Interfac
The Operating System views the SAP system as a group of parallel, cooperating processes. These processes are: o Dispatcher o Work Processors Work Processors o D - Dialog o V - Update
o o o
Restrictions on the number of work processes: o Message Server (MS or M) communicates between distributed dispatchers running on parallel processing application servers o Gateway Server (GW or G): ONE gateway process is required for every dispatcher Allows communication between mySAP components such as R/3 and R/2. Dialog WP At least TWO are required for each dispatcher Spool WP: At least ONE for each SAP System Update WP: At least ONE for each SAP System Background WP: At least TWO for each SAP System Enqueue WP: Only ONE WP is needed for each SAP System
o o o o o
An Instance an administration Unit made up of different components that provide one or more services. Each instance has its own SAP buffer Example: A background server instance executes background processes while a Spool Server instance handles printing and a central instance provides the basic services plus the comnunication with each instance.
Dialog Work Processes: The following components are used when processing a dialog request o Dispatcher o Work Process Queue o Dialog Work Processor o Buffer or shared memory A Work Process is made up of: o Abap Processor o Screen processor o Database Interface o Task Handler o Internal Memory
Long Running ABAP programs: Long running dialog work processors are terminated after the set maximum execution time Parameter: Rdisp/max_wpruntime (default 300 secs)
Background Work process: The Background work processes is used to execute a schedule job in the background at a given date and time.
The Work processor processes dialog-free jobs. Job Priorities: A to C. The SAPEVT ABAP program regularly looks at the schedule table for jobs that are to be executed Rdisp/btctime -> the parameter that specifies the regular interval to call the abap program
Printing in SAP:
Spooling refers to the buffered transfer of data to output devices. A spool request is generated in dialog mode or in a background processs. This spool request is placed inside a spool database. The spool database is processed by the Spool WP and sends the request to the operating system pool system. The data itself is stored in a TEMporary Sequential or TemSe object. The operating system triggers the output device for printing.
Work Process Multiplexing and SAP Transactions (4-20) A dialog step is made up of a PAI then a PBO.
An SAP transaction is composed of multiple screens. A screen can be processed by a different Dialog Work Processor (called Work Process Multiplexing)
SAP is mapped to the organizational Structure of an enterprise The client is the superior element of all organizational units Master Data are data records that remain in the DB for a long period of time. o Maps to the organization structure of the enterprise
The SAP R/3 system is a modular software architecture that follows the software-oriented client/server architecture The R/3 System is composed of three systems (each running on a different computer) o Presentation Contains user interface E.g login o Application Where abap programs are processed Brain of sap Database Stores application data, abap dictionary and programs response The technical distribution of software is independent of its physical location on the hardware. o
SAP programs when activated o Both compiled and interpreted Data Objects o variables at runtime Cross-client o Available to all cients Client-specific o Customizing tables o Application tables Development class o Now called packages Object Navigator o SE82 or SE80
SE81 SAP application components SE82 DEVELOPMENT TOOLS SE51 SCREEN PAINTER SE41 - Menu painter SE38 ABAP EDITOR SE37 Function Module Editor SE24 - Class Builder ST05 Performance Trace Local Object -> not transportable Se01 Transport Organizer STMS Bulk Transaction
EVENTS: o Program Controlled INITIALIZATION or LOAD-OF-PROGRAM TOP-OF-PAGE a. Triggered or displayed with the first write TOP-OF-PAGE DURING LINE SELECTION. a. Triggered to display detail list header b. Triggered when the first write statement is called in the details list AT SELECTION-SCREEN-OUTPUT before the screen is displayed AT SELECTION-SCREEN used to validate selection screen data a. AT SELECTION-SCREEN ON <field> b. AT SELECTION-SCREEN ON BLOCK <block> START-OF-SELECTION GET GET-LATE END-OF-SELECTION END-OF-PAGE AT SELECTION-SCREEN-HELP-REQUEST a. Program own F1 help AT SELECTION-SCREEN-VALUE-REQUEST a. Program own F4 help AT LINE-SELECTION-DURING-LINE-SELECTION a. Headers for detailed lists o User Controlled AT PF AT LINE-SELECTION a. Event when user is at detailed list b. Triggered by F2 or pick button AT USER-COMMAND a. Used to evaluate function codes at PAI (same as screen programming)
Ctrl-F2 Checking Breakpoints -> 30 max Breakpoint Types: o Dynamic o Static Watchpoints : 10 System Fields: Sy-subrc => status code Sy-dbcnt => db count Sy-index - loop
Sy-tabix -> last array index of internal table Sy-dynnr -> current Sy-cprog current program Sy-loop1 Sy-pfkey: current gui staus Sy-title Sy-tfill - > total number of lines in internal table. s-tlengh sy-ucomm -> function code captured at PAI sy-lsind -> current detail list number sy-lilli -> current line number in the screen (number of new line characters) sy-lisel -> the image of the selected line is saved here. (selected line for interactive report) sy-datum -> app date
Parameter vs Data: o Parameter and Data are the same except: Parameter: we get data from the screen Data: is a data object in the abap program TOP include: o All declarations o Advantages: program is distributed and modular Activation concept: A runtime object is generated in the repository Three types of database: o Transparent Physical Table Physical table 1:1 Relationship Cluster Relationship: 1:N Less definitions Pool Table Relationship: 1:N More definition Structure Types: Global Local
DATA ELEMENT: o Provides F1 documentation and Field Label DOMAIN: o Semantic attributes o Field length, data type and decimal places STRUCTURE: o Definition is available in dictionary but not created in the database o Types: Global available in abap dictionary Local declared in program
Program dependent
Data Object: variable available at runtime Data Object Types: o Modifiable Data, Parameter, structure, internal table o Non-Modifiable Literals, Constants MOVE copy the contents of objects CLEAR resets the value of the data object Loop statements: o Do / Enddo Loop at a given number of times o While / Endwhile Requires logical expression o Loopat / endloop Used for internal table
Internal Table Types: o Index Sorted - access mostly by keys Hashed access by keys
Internal Table Operations: o Append Append data in header line Append at the last o Insert Insert record to the body of the internal table o Read Read single value o Delete Delete a row from internal table o Collect o Clear Clears the header o Refresh Reset the header and the body Allot memory for future use o Free
o Modify SAP:
Db independent
Text elements: Used for language independence Activation Concept: Save Check Errors Activate List Buffer: Temporary storage until uline, skip and write in encountered. Database Interface Advantages: Convert to Native SQL Uses Application Server Buffer Automatic client handling SELECT SINGLE:
Advantages of CORRESPONDING FIELDS: Fills only the components that have identical names Type Types of Index: Primary
Automatically created by SAP because of key field Secondary Created by the customer
Authority Check: Checks where the user has the authorization to the specific table or field. From table ACTVT Authorization objects simply define the combination of fields that need to be addressed simultaneously and serve as templates for both authorizations and authorization checks Returns Codes 0 user has authorization 4 user does not have authorization 8 - check was not successful because not all fields were specified Types of Link Conditions: Static Link View in the abap dictionary Dynamic Link Or an Abap join using abap statements Types of Views: Maintenance Views Allows maintenance of database table Database Views Inner Join Help View Uses outer join
Types of Joins: Inner Join Join two tables based on matching column values Outer Join Left Outer Join o All fields in the left table are matched to the right table. o Unmatched fields in the right table will still be displayed Right Outer Join o All fields in the right table are matched to the left table. o Unmatched fields in the left table will still be displayed Function Module A special type of subroutine Types: Normal
RFC enabled can be called remotely Update Module Update Fm used for bundling DB changes can be executed directly independent of program while subroutine is dependent of program
Advantages: o
Parameters: IMPORT o Data passed to function module EXPORT o Values returned by FM CHANGING o Passed to the function module that can be changeds TABLES o Internal tables EXCEPTIONS o Error o
Function Group Main program for Function Module Components of a function group: Data Objects Subroutines Screens 4 Techniques for Reusing Data Retrieval: Calling Methods of global lasses Calling methods of business objects Calling function modules Including Logical Database What is modularization Separation of reusable program blocks into one separate module. Increases readability and maintainability Modularization units:
Subroutines Is an internal module within a program Structure of a Subroutine: Form Endform. Types of parameters:
Formal Actual
Types of parameter passing: Call By Reference o The address of the parameter is passed to the subroutine. o Modification of the formal parameter modified the formal parameter Call by Value o A local copy of the actual parameter is passed to the subroutine. o Changing the parameter does not have an effect on the actual parameter Call by Value and Result o A local copy of the actual parameter is passed to the subroutine and a value is passed back to the main program.
RFCs
Bridge to other Systems Uses CPIC and TCP/IP Types: Synchronous o Waits for reply Asynchronous o Does not wait for reply
DB Components: DBMS Data Types of Data: Master Data Organizational Data Transactional Data System Data Components of Application Server: Dispatcher Work Process Local Buffer Shared Memory
Attributes of internal table: Line Type Key Definition Data Access Type a. b. c. d. e. f. Dialog Message Categories: A Termination i. Program is terminated and transaction is restarted X Exit i. Same as Termination but displays a short dump: message_type_x. E Error i. Program is interrupted and user must correct the entry W Warning i. Program is interrupted, user can correct the entries or the user can confirm the entries. I - Information i. Information Processing is interrupted and continued once user confirmed the message (enter key) S Success i. Information is displayed on the next screen.
o
o
Types of processing blocks: o Events o Subroutines o interfaces Command that will take you to the output: o Write o Uline o Skip Detailed Lists -> 20 levels limit List Header: o o New Header will appear in the list Program Title
Use of Variants o Predefine Values o Hide Values o Used for background processing Types of reports o Classical event driven o Interactive Report o ALV Abap List View Less Coding Use FM Components of Screen Program: o Screen o Attributes
o o o
Screen Programs
Defined by Module Pool At least one tcode User decides the screen number
TRANSACTION CODES: Spro Sm58 trfc Sm59 creation of logical systems Sm12 - > maintance of lock tables Sm13 -> maintenance of db updates. Se11 -> abap dictionary Sm12 -> lock management Se14 > database utility Se80 -> object explorere Se38 Se37 SHD0 -> transaction variants SE95 (modification brower) SCU3 Table History $tab refresh buffer Se91 create message class SPDD -> SPAU Sicf to create web services tables: tpara - parameters tvrv variables t001 message classes t000 client lists :