abap for sd consultatnt
TRANSCRIPT
-
7/28/2019 ABAP for SD Consultatnt
1/66
India SAP CoE, Slide 1
SD2012: ABAP for SD Consultants
V 1.0
-
7/28/2019 ABAP for SD Consultatnt
2/66
India SAP CoE, Slide 2
ABAP ?
ABAP used to be an abbreviation ofAllgemeinerBerichts Aufbereitungs Prozessor,the German meaning of "generic report preparation processor", but was later
renamed to Advanced Business Application Programming
It is one of the many the application-specific fourth-generation languages
It was originally used by SAP developers to develop the SAP R/3 platform. It isalso used by SAP customers to enhance SAP applications add custom reports
and interfaces, and enhance user experience.
It is a structured language like C.
Its syntax is somewhat similar to COBOL
The actual processing logic of an application program is written in ABAP. The
ABAP processor executes the processing logic of the application program, and
communicates with the database
-
7/28/2019 ABAP for SD Consultatnt
3/66
India SAP CoE, Slide 3
1 PrepareMe
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
ABAP for SD Consultants
-
7/28/2019 ABAP for SD Consultatnt
4/66
India SAP CoE, Slide 4
1 PrepareMe
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
ABAP for SD Consultants
-
7/28/2019 ABAP for SD Consultatnt
5/66
India SAP CoE, Slide 5
Purpose1. Comprehensive: ERP software supports an organizations all the
business transactions and links them together using real-timeintegration.
2. Integration: Real-time integration means that each change or updatein one application causes the automatic change or update of the datain the other applications involved.
3. Scalability: ERP software caters to the needs of small businesshouse with say less than 10 users to multi billion dollar companies.
4. Interfaces (EDI-ALE-IDOC): Directly Sending & receiving informationfrom other systems helps in efficient functioning of businessprocesses without the need for multiple data entry.
5. Adaptability: Last but not the least, the softwares should becustomizable to meet the specific needs of an organization that arenot available as standard functionalities.
Adaptability is the key
-
7/28/2019 ABAP for SD Consultatnt
6/66
India SAP CoE, Slide 6
Use
ABAP provides the framework & processing logic
Processing
Logic
Interfaces
Utilities
Data Storage& Retrieval
Adaptability
Tables &structures
Programs,
Includes
Debug, Tracer,
Notes, Patches
Reports,
Interfaces,
Conversions,Enhancements
and Forms
EDI, ALE, Idoc
Routines, Methods
-
7/28/2019 ABAP for SD Consultatnt
7/66
India SAP CoE, Slide 7
Challenges
ABAP shall enable to meet the frequent changes in business requirementsby,
- enhancing the existing programs
- adding customer functionality to existing Transactions without modifying it.
- Program testing and debugging
- Data conversion with the combination of other techniques
-
7/28/2019 ABAP for SD Consultatnt
8/66India SAP CoE, Slide 8
1 PrepareMe
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
ABAP for SD Consultants
-
7/28/2019 ABAP for SD Consultatnt
9/66India SAP CoE, Slide 9
R/3 Architecture
-
7/28/2019 ABAP for SD Consultatnt
10/66India SAP CoE, Slide 10
R/3 Architecture
Presentation Layer
The presentation layer contains the software components that make up the
SAPgui (graphical user interface). This layer is the interface between the R/3
System and its users. The R/3 System uses the SAPgui to provide an intuitive
graphical user interface for entering and displaying data.
Application Layer
The application layer consists of one or more application servers and a message
server. Each application server contains a set of services used to run the R/3
System
Database Layer
The database layer consists of a central database system containing all of the
data in the R/3 System. The database system has two components - the
database management system (DBMS), and the database itself.
-
7/28/2019 ABAP for SD Consultatnt
11/66India SAP CoE, Slide 11
ABAP Program code
A computer program (often simply called a program) is an example of computer
software that prescribes the actions ("computations") that are to be carried out by
a computer.
All ABAP programs are modular in structure and made up of processing blocks.
There are two kinds of processing blocks, those that are called from outside a
program by the ABAP runtime system, and those that can be called by ABAPstatements in ABAP programs
-
7/28/2019 ABAP for SD Consultatnt
12/66India SAP CoE, Slide 12
Reports
Reports are Executable Programs that read data from the database,
processes the data and display the data to the required format.
Mostly a report does not make any changes to the database
You can either display the output of a report on the screen, print it
or send it to a file. You can also save it, so that it can be displayed
as often as you like. It is important to be able to do this, because
reading large volumes of original data can impair systemperformance.
Examples of reports are Classical ABAP reports, queries, and
drilldown interactive reports.
-
7/28/2019 ABAP for SD Consultatnt
13/66India SAP CoE, Slide 13
Interfaces
Interface refers to the data transfer between two independent systems.
ALE is used for SAP to SAP communication and EDI is mostly used for any two
system communication.
Benefits of EDI-ALE:
Reduced Data Entry Errors
Reduced Processing Cycle time
Availability of Data in electronic form
Reduced Paperwork
Reduced Cost
Standard means of communication
Sender System Receiving SystemData Container - IDOC
Purchase
Order
Sales
Order
-
7/28/2019 ABAP for SD Consultatnt
14/66India SAP CoE, Slide 14
Conversion
Conversion programs helps in data transfer from an external system into the SAP R/3System. In other words, this type of transfer refers to a one-time transfer from alegacy system to the SAP system. Legacy system is the old system that is beingreplaced by the SAP system.
Application
data
Application
data
GUI_UPLOAD
Batch Input
Direct Input
OPEN DATA SET
READ DATASET
CLOSE DATASET
Application
server file
AL11
Legacy SAP
-
7/28/2019 ABAP for SD Consultatnt
15/66India SAP CoE, Slide 15
Enhancement
Enhancements are plug points provided by SAP to add customerfunctionality to existing SAP Transactions without modifying it.
Transaction Code : CMOD, SMOD,SE18, SE19.
Enhancements act as hooks.
You can hang your own add-on functionality
onto these hooks.
Advantages.
They do not affect standard
SAP Code.
They do not affect software
updates
Techniques for Enhancements
Customer Exits
User Exits
Business Add-Ins.
-
7/28/2019 ABAP for SD Consultatnt
16/66India SAP CoE, Slide 16
Forms
Forms are used for creating and maintaining the output for printing in SAPsystem. As output medium it also supports a printer, fax, e-mail or the
internet (by using the generated XML output).
Transaction Code : SE71, SMARTFORMS
FORMApplicationProgram
Printer
FAX
Web Browser
-
7/28/2019 ABAP for SD Consultatnt
17/66India SAP CoE, Slide 17
1 PrepareMe
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
ABAP for SD Consultants
-
7/28/2019 ABAP for SD Consultatnt
18/66India SAP CoE, Slide 18
ProgramsProgram Structure
ABAP programs are responsible for data processing within the individual dialog
steps of an application program. This means that the program cannot be
constructed as a single sequential unit but must be divided into sections that
can be assigned to the individual dialog steps.
To meet this requirement, ABAP programs have a modular structure. Each
module is called a processing block. A processing block consists of a set of
ABAP statements. When you run a program, you effectively call a series of
processing blocks. They cannot be nested.
The following diagram shows the structure of an ABAP program:
Data Declaration Dialog Modules Event Blocks Subroutines
-
7/28/2019 ABAP for SD Consultatnt
19/66India SAP CoE, Slide 19
Modularization
Procedures:Procedures contain a set of statements, and are called from other ABAPprograms. ABAP contains the following kinds of procedures,
Subroutines Subroutines are procedures that you can define in any ABAP
program and also call from any program.
Function modules Function modules are procedures that are defined in function
groups and can be called from any ABAP program.
Include If you want to use the same sequence of statements in severalprograms, you can code them once in an include program.
-
7/28/2019 ABAP for SD Consultatnt
20/66India SAP CoE, Slide 20
ABAP Program code
Subroutines :Subroutines are principally for local modularization, that is, they are generally
called from the program in which they are defined. You can use subroutines to
write functions that are used repeatedly within a program. You can define
subroutines in any ABAP program.
-
7/28/2019 ABAP for SD Consultatnt
21/66India SAP CoE, Slide 21
ABAP Program codeFunction Modules :
Function modules are for global modularization, that is, they are always calledfrom a different program. Function modules contain functions that are used inthe same form by many different programs. They are important in the R/3System for encapsulating processing logic and making it reusable. Functionmodules must be defined in a function group, and can be called from anyprogram
T Code - SE37
-
7/28/2019 ABAP for SD Consultatnt
22/66India SAP CoE, Slide 22
ABAP Program codeInclude Programs
Include programs are global R/3 Repository objects. They are solely for
modularizing source code, and have no parameter interface
Creating Include.
Use Transaction SE38 to create a include program.
Using Include
Include
This inserts the source code into the ABAP/4 program during the
syntax check and during generation. The INCLUDE statement performs
the same function as if you were to copy the source code of to
the position of the statement in the calling program.
-
7/28/2019 ABAP for SD Consultatnt
23/66India SAP CoE, Slide 23
SAP Database The SAP database contains literally thousands of tables that store
information. Some products like ECC and R/3 have more than 30,000 tables
in fact, whereas other products like CRM might have fewer than 10,000.
These tables are tied to each other through established relationships. This
connection of multiple tables through relationships creates what is known
as a Relational Database Management System (RDBMS).
Primary Key - Database tables in an RDBMS are required to contain a unique
field that individually distinguishes one particular record from all others in
the database. Eg: VBELN is primary key in VBAK.
Foreign Key - You use the primary key field in one table to link it to another.
The common link field in the other table is usually not the primary key in the
other table: It is called a foreign key. MATNR is primary key in MARA table
and foreign key in VBAP.
-
7/28/2019 ABAP for SD Consultatnt
24/66India SAP CoE, Slide 24
Data Dictionary A data dictionary is a central source of information for application data.
Data Dictionary is Accessed Via Transaction Code SE11,SE16,SE16N
-
7/28/2019 ABAP for SD Consultatnt
25/66India SAP CoE, Slide 25
Transaction Code : SE11 Define/Manage components of Data Dictionary. Transaction Code : SE16 Define/Manage Table Only.
Structure of Data Dictionary
DOMAIN
VIEW 2
DATA ELEMENT 1
TABLE 1 TABLE 2 TABLE 3
VIEW 1
DATA ELEMENT 2
Structure 1
Search Help 2
Search Help 1
-
7/28/2019 ABAP for SD Consultatnt
26/66India SAP CoE, Slide 26
SE11, SE16, SE16NSE11 SE16 SE16N
This transaction is a
generic transaction for
data dictionary where you
can maintain all data
dictionary objects .
This transaction is used
to see the contents of the
table. Table maintenance
is not possible here .
This transaction is an
SAP Enjoy transaction
with a much more user
friendly appearance; it
supports custom controls
in the form of ALVcontrols.
-
7/28/2019 ABAP for SD Consultatnt
27/66
India SAP CoE, Slide 27
Sales Document table VBAK Sales Document: Header Data
VBAP Sales Document: Item Data
VBFA Sales document: Document flow
VBPA Sales document: Partner profile
VBEP Sales document: schedule line data
VBEH Sales document: schedule line history
Delivery Document table
LIKP Delivery: Header Data
LIPS Delivery: Item data
VBUK Sales document: Header status
VBUP Sales document: Item status
Billing Document table
VBRK Billing: Header Data
VBRP Billing: Item Data
Important SD Tables
-
7/28/2019 ABAP for SD Consultatnt
28/66
India SAP CoE, Slide 28
Reports
Report is executable code that read data from the database, processes the
data and displays the data to the required format.
Transaction Code : SE38
Reports are classified into Classical reports and ALV.
Sorting in Descending order
Sorting in ascending order
Summation/Total
FilterABC Analysis
Graphical display
-
7/28/2019 ABAP for SD Consultatnt
29/66
India SAP CoE, Slide 29
Process Flow: Classical Report
-
7/28/2019 ABAP for SD Consultatnt
30/66
India SAP CoE, Slide 30
Process Flow: Interactive Report
event keyword
processing block
internal control
event keyword
processing blockinternal control
...
external control
external control
event begin
event end
-
7/28/2019 ABAP for SD Consultatnt
31/66
India SAP CoE, Slide 31
Events
INITIALIZATION
AT SELECTION-SCREEN
START-OF-SELECTION
END-OF-SELECTION
Interactive Events}
TOP-OF-PAGE
END-OF-PAGE
TOP-OF-PAGE DURING
LINE-SELECTIONAT LINE-SELECTION
AT USER-COMMAND
AT PF
-
7/28/2019 ABAP for SD Consultatnt
32/66
India SAP CoE, Slide 32
Events
ABAP/4 report programs are event driven programsThe different events in a report Program are:
Initialization.Initialization of all the values. You can fill your selection screen with
some values at runtime.
At Selection-Screen.Validation & Checks of inputted values happen hereStart-of-Selection.
Here the program starts selecting values from tables.
End-of-selection.After all the data has been selected this event writes the data to the
screen.
Interactive Events.Used for interactive reporting. It is used to create a detailed list from a
basic list.
-
7/28/2019 ABAP for SD Consultatnt
33/66
India SAP CoE, Slide 33
Interfaces
ALE (Application Link Enabling ) is a SAP terminology used mostly for SAPto SAP communication in Distributed servers system.
EDI (Electronic Data Interchange) is a technology in itself with its own set ofstandards and used mostly for communication between any 2 systems ondifferent networks
IDOC (Intermediate Document) is a Data container
Important T-codes like
WE02 To view the IDOC
WE09 To search for an IDOC based on data in the IDOC
WE19 Test tool to create and simulate an IDOC.
Important IDOC Status are (For Inbound IDOC)53 - IDOC successfully posted
51 IDOC Failed
64 - IDOC ready to be transferred to Application
-
7/28/2019 ABAP for SD Consultatnt
34/66
India SAP CoE, Slide 34
Conversions/Data Upload
Data is the single most important asset of a business and data conversion is
therefore a critical success factor in any SAP system implementation.
Data Migration is the migration/conversion/upload of data from source legacy
system to target SAP R/3 system .
Legacy System R/3 System
BATCH INPUT
Data
-
7/28/2019 ABAP for SD Consultatnt
35/66
India SAP CoE, Slide 35
Conversions/Data Upload
The Legacy System Migration Workbench (LSMW)is a toolrecommended by SAP that can be use to transfer data once only orperiodically from legacy systems into an R/3 System. TransactionCode LSMW
BDC (Batch Data Communication)also referred as Batch Input is atechnique for mass input of data where data input into SAP screens
is simulated.
BDC allows to perform database updates in the background using
standard SAP transactions. The resultant entries will be as if theuser had manually entered the data via SAP and no bypassing of
any of the standard SAP consistency checks, authorizations etc.
-
7/28/2019 ABAP for SD Consultatnt
36/66
India SAP CoE, Slide 36
BDC
PROGRAM
External
Data
BATCHINPUT
SESSION
SAPDATABASE
TABLE
The first batch input method is to create a batch
input session. It is the processing of this batch
input session that updates the database, not the
execution of the batch input program.
Overview of Batch Input Session
-
7/28/2019 ABAP for SD Consultatnt
37/66
India SAP CoE, Slide 37
Batch Input Methods
METHOD #1
METHOD #2
METHOD #3
CALL TRANSACTIONData consistency check with the help of screen logic.
BATCH INPUT SESSION
Data consistency check with the help of screen logic.
DIRECT INPUTSAP function modules execute the consistency checks
-
7/28/2019 ABAP for SD Consultatnt
38/66
India SAP CoE, Slide 38
Process flow of Batch Input Session
Opens the Session
Process BDC table for each record
Close the Session
Function Modules
-
7/28/2019 ABAP for SD Consultatnt
39/66
India SAP CoE, Slide 39
When you create a batch input session, it remains in the batch
input queue until it is explicitly started. Session processing can bestarted in two ways:
An on-line user can start the session using the batch input menu
options. (To access the batch input options, choose System Services Batch Input.) Transaction code - SM35
You can submit the background job RSBDCSUB to start a session
in background processing. If several sessions have the samename, RSBDCSUB starts them all.
Processing Batch Input sessions
-
7/28/2019 ABAP for SD Consultatnt
40/66
India SAP CoE, Slide 40
T-Code SHDB is used for recording the transactions as well as creating the
skeleton programs that contain all the necessary code for creating batchinput sessions
Features:
You can use the recording to create
Data transfer programs that use batch input or CALL TRANSACTIONBatch input sessions
Test data
Function modules.
Note: It doesnt record F1, F4 and Scrollbar movements
Transaction Recorder (SHDB)
-
7/28/2019 ABAP for SD Consultatnt
41/66
India SAP CoE, Slide 41
Steps in Transaction RecorderStep 1. T-Code SM35Create new recoding
Step 2. Create a customer
-
7/28/2019 ABAP for SD Consultatnt
42/66
India SAP CoE, Slide 42
Steps in Transaction RecorderStep 3. Recording completed.Save the recording
Step 4. Recording Created and
saved
-
7/28/2019 ABAP for SD Consultatnt
43/66
India SAP CoE, Slide 43
Data upload flow
Research Transaction
Code BDC Program
Process Batch Input Session
Execute BDC Program
Batch Input Session Control
SAP Database Updated
-
7/28/2019 ABAP for SD Consultatnt
44/66
India SAP CoE, Slide 44
Steps of LSMW
Create Project, Sub-Project and Object
Maintain object attribute, Source
Structures, Source Field
Read the data file and Convert data inSAP format
Field mappings and Translations
Specify and assign the data file
Start DI programs and
SAP Database will Update
-
7/28/2019 ABAP for SD Consultatnt
45/66
India SAP CoE, Slide 45
EnhancementSuppose we need some functionality which is not provided in sap what do you do. SAP
has provided you with three options.
1) Customizing Done through SPRO
2) ModificationsBreak the SAP standard code and modify.
3) User Exits To avoid modifications, SAP has provide some exit points to addcustomer's own program .
User exits are routine which SAP allows you to add in additional customized programsprocess without affecting the standard SAP programs.
User exits allow developers to access and modify program components and data
objects in the standard SAP System.
On upgrade, each user exit must be checked to ensure that it conforms to the standard
system.
SAP user exit are usually declare as a form routine :-
form userexit_xxx
........................
endform
-
7/28/2019 ABAP for SD Consultatnt
46/66
India SAP CoE, Slide 46
Enhancement User Exits for SD are found in IMG under
Sales & Distribution System Modifications User Exits Business Add-Ins for SD are found in IMG under
Sales & Distribution System Modifications Business Add-In Function Module exit is implemented as:
CALL CUSTOMER.-FUNCTION
-
7/28/2019 ABAP for SD Consultatnt
47/66
India SAP CoE, Slide 47
User ExitsFew examples of User Exit programs in Sales Order
User exits are in the program MV45AFZZE.g...
USEREXIT_MOVE_FIELD_TO_VBAK - assign values to new fields at sales
document header level.
User exits in the program MV45AFZA
E.g...
USEREXIT_MOVE_FIELD_TO_KOMKD
Include or assign values to additional header fields in the communication
structure KOMKD taken as a basis for the material determination.
User-Exits in program MV45AFZBE.g...
USEREXIT_CHECK_VBAK
This user exit can be used to carry out additional checks (e.g. for completion) inthe document header.
-
7/28/2019 ABAP for SD Consultatnt
48/66
India SAP CoE, Slide 48
User ExitsFew examples of User Exit programs in Invoice
User exits are in the program RV60AFZZ
E.g...
USEREXIT_NUMBER_RANGE -
The internal number range used in the standard system is specified inthe billing type table and can be changed in this user exit.
User exits in the program RV60AFZCE.g...
USEREXIT_FILL_VBRK_VBRP
This user exit is only called when the billing document is created. It isused to provide the header and the item of the new billing documentwith deviating or additional data.
-
7/28/2019 ABAP for SD Consultatnt
49/66
India SAP CoE, Slide 49
Forms
SAPscript and Smartform are the tool that SAP provides forcreating layout sets.
Transaction Code for SAP Script is SE71
Transaction Code for Smartform is SMARTFORMS
SMARTFORMS are client independent while SAP Script are Client
Dependent
The basic configuration required to do for Smartform/SAPscript is
creating output type and attaching the Smartform to the output
type.
NACE is the transaction to set the output type.
In NACE transaction first the application is selected ( e.g.V1 Sales,
V2 Shipping etc). Then output type is selected. Sometimes outputtype is created newly if driver program and Smartform are custom
program and not SAP standard ones
-
7/28/2019 ABAP for SD Consultatnt
50/66
India SAP CoE, Slide 50
FormsWhenever new output type is created , 3 parameters are required. They
are :- Smart form / SAP script Name
- Driver Program Name
- ENTRY routine name.
Form Description Program name SAPscript name Smartform name
Sales order
confirmation
RVADOR01 RVORDER01
Delivery Note RLE_DELNOTE RVDELNOTE LE_SHP_DELNOTE
INVOICE RLB_INVOICE RVINVOICE01 LB_BIL_INVOICE
-
7/28/2019 ABAP for SD Consultatnt
51/66
India SAP CoE, Slide 51
How SAPscript works ?
SAP
Document
SAP
Document
Output
Program
Layout set Form
Output determination configuration
Printer / Font Configuration
Output program: Extracts data from SAP data dictionary
Layout set: Formats the extracted data
Output determination configuration: Configures triggering event, timing/destination
Printer / Font configuration: Configures impact / laser printer, bar code, logo
Sales order, Billing
document etcLayouts of Sales
order, Billing
document etc
Read Data
-
7/28/2019 ABAP for SD Consultatnt
52/66
India SAP CoE, Slide 52
How SMARTFORM works ?Smartform has 3 driving components : Print Program, Layout
Set and Function module.
1. Application Data is
fetched by the Print
Program from the
database depending
upon the selection
screen parameter.
2. Function module of a
Layout Set is called in
a program for
placement of the
data.
3. The output of
application document
is sent to printer or
mail or fax.
-
7/28/2019 ABAP for SD Consultatnt
53/66
India SAP CoE, Slide 53
Scheduling a Background JobT-Code SM36
-
7/28/2019 ABAP for SD Consultatnt
54/66
India SAP CoE, Slide 54
Scheduling a Background JobChose Job Overview to view all existing Job status
-
7/28/2019 ABAP for SD Consultatnt
55/66
India SAP CoE, Slide 55
Utilities
Debugger - It enables observations and validations of code bydisplaying data objects and help in checking the flow logic of code.
SAP Notes provide urgent corrections and solutions for smaller
problems.
Runtime Analysis - It shows how long system takes to process ABAP
code, from single statements to a complete transaction. It also helps to
know the System and the data retrieval time from database. T- Code is
SE30.
SQL Trace - It helps to knowing the tables for data retrieval by
activating the trace by ST05 and then execute the functionality.
-
7/28/2019 ABAP for SD Consultatnt
56/66
India SAP CoE, Slide 56
Debugger
The basic steps in debugging are:
Recognize that a bug exists Isolate the source of the bug
Identify the cause of the bug
Determine a fix for the bug
Apply the fix and test it
It is a tool which enables the programmer to monitor the execution
of a program, stop it, re-start it, run it in slow motion, change valuesin memory and even, in some cases, go back in time.
-
7/28/2019 ABAP for SD Consultatnt
57/66
India SAP CoE, Slide 57
Utilities: Debugger The debugger is a programming tool used to analyze ABAP programs by line
or section.
With this tool we can display data objects and check the flow logic of
programs
Debugger Function Keys (/h)
F5 Execute a single line of code.
F6 Execute block of code
F7 Return
F8 Run to Cursor
Display Modes for Debugger:
Fields : Displays the contents of a variable
in the code.
Table : Displays the contents of an
internal table.Breakpoints : Displays list of Break-points
in the code.
Watchpoints : It is set to interrupt the program
for field value changes.
-
7/28/2019 ABAP for SD Consultatnt
58/66
India SAP CoE, Slide 58
SAP Notes contains instructions to remove errors from SAP System.
Transaction Codes : SNOTE , SPAU ,OSS1 or SAP Market Place
Utilities: SAP Notes/Patch
Major Features
Finding an SAP Note
Loading an SAP Note
Classifying SAP Notes
Implementing CorrectionInstructions
SAP Notes can be searched
Implemented based on Note
Number, Application
Component , Implementation
Status.
-
7/28/2019 ABAP for SD Consultatnt
59/66
India SAP CoE, Slide 59
Utilities: ABAP Runtime Analysis The runtime analysis provides an overview of the duration and performance
of your source code, from individual statements up to completetransactions.
Transaction Code : SE30
Major Functions.
Gives Tips & Tricks for codingSetting the measurement
restrictions
Start the runtime analysis in the
current
session
Start the runtime analysis in a
parallel sessionDisplay and process
performance files
Display database, system and
ABAP execution time
-
7/28/2019 ABAP for SD Consultatnt
60/66
India SAP CoE, Slide 60
Utilities: Trace Trace tool is used to monitor and analyze the performance of the system in
database accesses and remote calls of reports and transactions. Transaction Code : ST05
Major Features
Trace on (starts recording)
Trace off (stops recording)
Trace function selection
SQL Trace, Enqueue Trace.
Display the basic or extended list
Start the Explain SQL to analyze
an SQL statement or trace fileGive details of database usage
-
7/28/2019 ABAP for SD Consultatnt
61/66
India SAP CoE, Slide 61
1 PrepareMe
2 TellMe
3 ShowMe
4 LetMe
5 HelpMe
ABAP for SD Consultants
-
7/28/2019 ABAP for SD Consultatnt
62/66
India SAP CoE, Slide 62
LetMe
In debug mode let the participant(s) find a Z message in a particular Txn
Let the participant(s) find out a table where F1F9 will reach a structureLet the participant(s) find out a User Exit
Let the participant(s) apply a note through Txn
-
7/28/2019 ABAP for SD Consultatnt
63/66
India SAP CoE, Slide 63
1 PrepareMe
2 TellMe
3 ShowMe
4
LetMe
5 HelpMe
ABAP for SD Consultants
-
7/28/2019 ABAP for SD Consultatnt
64/66
India SAP CoE, Slide 64
Tips and Tricks
is a German word for Head. This generally all Header tables have a in their name which distinguishes them from the Position tables with a
in them. for example VBAK/P or VBRK/P
Use table TSTC to find out all Z Programs and Transaction Codes existing in a
system.
By pressing F1 F9 will normally show you the field & table. If you reach thestructure then to find a table check where-used-list..More details?
To find out a User Exit, check in IMG for system modifications. To find
enhancement, go to SMOD and check with the help of application area and
development class
In debug mode you can change the values in a table and test
How to see Spool request, use T-code SP01
-
7/28/2019 ABAP for SD Consultatnt
65/66
India SAP CoE, Slide 65
Additional InfoVariants
Variants are input data which are filled in the selection screen and then
saved so that at runtime the variant can be selected and then the entireselection screen is filled with the desired values
Background Processing
When a program takes a long time to execute then one can execute the
program in background so that a job is set up for that program.
The job can be seen in transaction SM37.
The job log gives the exact start time and the end time for the job
CATCH - Catching Runtime Errors
CATCH SYSTEM-EXCEPTIONS except1 = rc1 ... exceptn = rcn.
ENDCATCH.The CATCHENDCATCH block allows the programmer to catch
ABAP runtime errors and assign these to a SY_SUBRC value
Comments
Commented lines in the program start with asterisk (*)
To comment a part of line use double codes ().
-
7/28/2019 ABAP for SD Consultatnt
66/66
Additional InfoUnlike most IMG configuration, all program except SAP-scripts are
necessarily client independent. Thus a program developed in one clientin a server is also automatically available in all other clients in the same
server.
Print Program is assigned to Output Condition Type. This assignment
needs to be done manually in all the clients.
Table document.