Posts

OOP

Image
OOP Understand the details of object-oriented syntax elements in ABAP Objects and use these effectively Create object-oriented models of business applications Use the tools in the ADT 2.70 to develop object-oriented applications what problems we were having in Procedural programming. Long code due to variable declaration Extensive processing after SQL statement Multiple Commands to perform simple operations Code reusability and Maintenance SAP’s solution In-line declaration SQL Expressions ABAP Expressions OOP Advantages of OOP over Procedural programming Improved software structure and consistency in the development process Reduced maintenance efforts and less susceptibility to errors Better integration of the customer/user into the analysis, design, and maintenance process Easier and safer possibilities for extending the software OOP in ABAP Essentially the same as those of other modern object-oriented languages like C++ or Java Some elements present in ABAP objects are not offered i...

BASIC ALV

Image
BASIC ALV •Define and describe ALV •Discuss and use the standard function module ‘REUSE_ALV_GRID_DISPLAY’ in ABAP program •ALV Navigation Define and Describe ALV The ALV (ABAP List Viewer) is a flexible tool for displaying lists in SAP. The tool provides common list operations as generic functions and can be enhanced by user-defined options. This allows you to use the ALV grid control in a wide range of application programs. For this module, the simplest way to use ALV will be discussed. Advanced topics in ALV may be discussed in the later part of the Training. Sample ALV Output Sample ALV output The ALV Field Catalog The field catalog is an internal table which contains information about the fields to be displayed on the ALV. The type is SLIS_T_FIELDCAT_ALV. We must first build the field catalog before displaying any output in the ALV. There are many fields in the field catalog but for a simple output, the only necessary fields are FIELDNAME and SELTEXT_L. Using the FM ‘REUSE_ALV_GRID...

FUNCTION MODULES

Image
FUNCTION MODULES Module Objectives Define Function Modules Define Function Groups Describe Function module Parameters Explain Exception Processing Define global data / local memory Use Remote Function Call (RFC) Search the Function Library Introduction to Function Modules •Function modules are procedures that are defined in special ABAP programs, so-called function groups, that can be called by all ABAP programs. •Function groups act as containers for function modules that logically belong together. •Function modules also play an important role during updating and in the interaction between different SAP systems, or between SAP systems and remote systems through remote communications. function module Navigating to Function Modules (SE37) Navigating to function Modules Navigating to Function Modules (ADT) Navigation to function Modules Function Groups Function Groups function groups Calling a Function Module Calling a function module Parameters Parameters Exception Processing Exceptions...

ABAP TRANSACTION CODE AND EVENTS

Image
Module Objectives •Create transaction codes to load custom programs •Utilize ABAP Events to manage program processing Creating a Custom Transaction Code Creating a Custom Transaction Code we will click on ABAP Repository object and search for Transaction and write the object name. Creating A transaction Code  we will enter the transaction code and select the Start object type and enter the transection text and program name ABAP Events Events are declared through the event keyword Events are triggered when the program encounters a particular scenario (i.e. program is loaded, execution after selection screen, etc.) Events are terminated when any of these scenarios are met           -Declaration of another event           -Declaration of a subroutine or local method           -End of source code ABAP Event Keywords ABAP Events ABAP Events LOAD-OF-PROGRAM •Occurs prior to the loading of the selection screen •Inf...

SAP ERP ABAP DEBUGGING

Image
Module Objectives •Define debugging •Describe branching to debugging mode •Define key debugging concepts and functions •Explain the debugging mode •Describe examining/changing variables •Debugging in ADT •Identify breakpoints and watchpoints •Debug internal tables What is Debugging? •Tool used to identify and eliminate errors in ABAP programs •Allows the verification of program logic in a step-by-step manner by examining the results of individual statements Branching to Debugging Mode ABAP Debugging Key Debugging Concepts •Debugger modes •Examining the value of variables •Changing the value of variables •Setting breakpoints •Setting watchpoints •Viewing contents of internal tables Classic Debugging Display Below is the screen shot of how the debugger looks like. Classic Debugging Display Important Debugging Functions Single Step   -Processes the next program line Execute        -Allows the change of data contents during debugging Continue      -Pr...

SAP ABAP SELECT STATEMENT

Image
Module Objectives •Explain database Tables / data browser •Use the SELECT statement and the WHERE clause •Describe the SELECT SINGLE statement •Explain the ORDER BY addition •Describe retrieving individual columns •Exclude duplicate records during selection •Describe the SELECT statement syntax •Define aggregate expressions •Familiarization with ABAP 7.40 select statement new features •Discuss performance and best practices •SQL Console SELECT Statement - Basic Form the select statement is very simple in ABAP, we just use Keyword SELECT the we specified all columns of the table which we want to get we use * to show all columns with FROM keyword we specified the table. then we use a variable which will hold the result of the table and, in the end, we use ENDSELECT  to end the select query. Select Query Selecting specific fields from database table Selecting specific fields from database table Inline Declaration after INTO for ABAP 7.40 instead of defining all the fields in ABAP 7....

Online Classes of SAP ABAP INTERNAL TABLES

Image
INTERNAL TABLES •Review on Structures •Describe Internal Tables •Define Internal Table Types •Declaring an Internal Table •Manually Filling an Internal Table •Use Standard Table Operations Review on Structures To declare a table internal table first, we need to define the structure and we can define the type as you can see in the example below, then we declare a variable for an internal table to hold the values. Internal Table Structure Data Types in ABAP The internal table is the subtype of Structured (Multi-column) data type. Data types in ABAP Internal Table Types and Keys in Internal tables, we have 3 types  Standard  Sorted  Hashed please view the example below to have proper idea Internal Table types and Keys Declaring an Internal Table Standard Table: in order to define a standard table we need to follow following steps, 1- create a type structure with all the fields you want table to hold 2- declare the table name, table type and row structure. Standard table Sort...