VINAYAKA SAP: - (System Applications and Products in data Processing). ABAP: - (Advance Business Application Programming) Programming Languages: - C, C++, Java, .Net…………. Packages: - Word, Excel, Tally, Focus, Wings…………… Operating System: - Dos, Windows, Unix, Linux……….. Database: - Oracle, Sql Server, Mysql……………………. ERP Products: - SAP, Oracle Application‟s, Siebel, CRM……….. Package: - Package is a set of rebuild instructions. Readymade built in functions. Database: - Database is stored the data permanently. Enterprise: - Organization or Company. Resource: - Money Man power Material Machinery Marketing  Finance,  HR, Material Management, Production, Sales.

Planning: - How to utilizing the resources in a efficient way. To integrate the department Every Company to prepare the department SS 1) Front end department 2) Back end department 1) Front end department: - Market, Sales……. Customer directly interacting. 2) Back end department: - Hr, Finance, Production, Purchase, Inventory.


Santosh P









Types of consultant in sap project: 1) 2) 3) 4) Function consultant Technical consultant Techno functional consultant Basis consultant



1) 2) 3) 4) 5) 6)


1) ABAP 2) HR ABAP 3) WEB DYNPRO 4) CRM TECHNICAL 5) WORK FLOW 6) BI/BW 7) TF 8) EP (Enterprise portal)


Santosh P

Transport management.Obligatory is the keyword used as part of parameters statement to make a selection screen field as mandatory. Preparing UTP (Unit Test Plan).Constants is a keyword used for declaring constant variables.parameters [:] <variable> <type/like> <data type> [default <default value>] [Lower case] [Obligatory] .data [:] <variable> <type/like> <data type> [value <initial value>].Role of ABAP Consultant in SAP Project.Radio buttons is keyword. and integration testing. „ „  Not Selected. Build (Development). CHECKBOX: . DATA: . PARAMETERS: . CONSTANTS: .  By default the parameter variables are displayed as labels on selection screen  To provide Meaningful description we need to generate text element. OBLIGATORY: . „X‟  Selected. 3|Page Santosh P . WRITE: . Code review. Syntax: . VALUE: .parameters <checkbox name> as checkbox [default „X‟].Checkbox is a keyword to select the checkbox‟s.parameter is a keyword it generates a selection screen for reading the user input.Write statement is a keyword used for display the Output „LPS‟ (List Processing Screen) .  Constant variable must be initializing at the time of declaration.  The value for constant variable it‟s fixed throughout the program.parameters <radio button name> radio button group <group name> [default „X‟].  Radio button can have either of the following values. Syntax: . Syntax: .Data is a keyword used for declaring a variable in an ABAP. unit testing.Value is a keyword used as part of data statement to initialize the variables. Preparing technical specs. RADIO BUTTONS: . Supporting production issue. Syntax: . 1) 2) 3) 4) 5) 6) 7) Analysis understanding of functional specs.  A group of radio buttons only one radio button can be selected.

It skips the remaining statements of the loop and the control jumps to iteration.A field-symbol is a data structure which can store any kind of data type. the changes made to the field-symbols will automatically reflect the reference variable and vice versa.  Field-symbols variable is always enclosed in angular brackets. 4|Page Santosh P .Edit mask is used as part of write statement to convert the data and time format to the user defined format. EXPORT & IMPORT:  Export statement is used for exporting a variable value to the ABAP memory with in a memory id. EDITMASK: . CHECK STATEMENT: . Syntax: .  If it is executed outside the loop the control comes out of the program.e.  Import statement is used for importing a variable value from ABAP memory which is stored in a memory id.It is keyword used for assigning a value to the field symbols.Check is similar to IF. When the check statement condition is failed the remaining statements of the program will not be executed where as incase of IF statement. NOTE: . Otherwise the program will be execute indefinite. Load the program not found.  The variables stored in the field-symbols is called referenced variable. ASSIGN: . EXIT: .DEFAULT: . FIELD-SYMBOLS: .  Field-symbols are declared by using the keyword field-symbols.e.Whenever exit statement will executed inside a loop.Whenever a continue statement is executed inside a loop.Default is a keyword to provide the default values.Submit keyword is used for calling a report from another report.  Before execute the continue statement we need to increment or decrement the iteration variable accordingly. SUBMIT: . The if statement condition is failed only the if block is ignored i.  Field-symbols will act‟s like a pointer i. The control comes out of the looping statement. CONTINUE: .  If a non existing program is called by using submit keyword its result is runtime error.field-symbols <variable>. remaining statements of the program will be executed.By default whenever a program is called using submit keyword the control jump to called program and control will not returned to calling program.

5) CLEAR: .Clear is used for clearing the contents of a variable. 7) REPLACE: . MOVE: . parameters statement is Field 4.It returns the length of the string.Existing structure can be a local structure or it can be a dictionary structure created in the database. End of <Structure name>. NOTE: . 9) CONDENSE: . 2) CONCATENATE: . At any point of time the structure can store only single record.It is a user defined data type which is a collection of different types of fields.It is used for extracting a position of a string.It converts a given string into a lower case or upper case translate string to lower case. Syntax2: Data: <Structure> like <existing structure>. 5|Page Santosh P . not allowed inside statement. 8) TRANSFER: . Field 3. Field 2. STRUCTURES: . Field 1.By default replace function replaces first occurrence of a pattern with the target pattern.It fills the blank spaces of a given string with the appropriate positioned character of the source string. Only checks for the corresponding fields for data types between two structures. Syntax1: Data: begin of <Structure name>.Statement is used for copying the data between two similar structures. By default replace function is case sensitive.It splits a given string into a multiple substrings based on a d-limiter.  Structure is used for storing record kind of information. 6) OVERLAY: . It does not check for no of fields and field‟s name.It is used for writing the content of the variable to the application server path. 3) SPLIT: . 4) TRANSLATE: . The above syntax only copies the fields from one structure to another structure. 10) OFFSET LOGIC: .STRING FUNCTIONS: 1) STRLEN: .It combines multiple strings into single string based on a d-limiter/separator. ……… Field n.Condense statement suppress the blank space in a given string.

Because each field of the source structure is compared with all the fields of the target structure which is a time consuming process.Move-corresponding is used between two dissimilar structures to copy the values from one structure to another structure. end of <structure 2>. end of <structure 1>. NESTED STRUCTURE: .include structure <structure name>.  It may lead to runtime error because while copying it only checks for fields name but not for data type. ………. When the data type mismatches it leads to runtime error.Declaring a structure inside another structure. ……… begin of <structure 2>. Syntax: . field 2. TRANSPORT ORGANIZER: . VERSION MANAGEMENT: .  The included structure can be local or dictionary structure. It is recommended not to use corresponding because of the following reasons.. Syntax: .. field 1.begin of <structure 1>.  It decreases the performance of the application.MOVE-CORRESPONDING: . field 1. 6|Page Santosh P .Transport organizer is a tool used for managing the transports in the development environment. ……. INCLUDING STRUCTURE: Including all the fields of an existing structure into another structure by using include keyword.It is the process of comparing two versions in the same system are across a system and identifying the differences and retrieving the appropriate version. field 2.

iv. We always create transparent table only. ii. iii.  Cluster tables can be used to store control data. They can also be used to store temporary data or texts. ii. Transparent Pooled Cluster Transparent:  It is used to store application data such as master data transactional data. 2) Views: It is a data dictionary object.Database tables are three types.  This is many-to-one relationship. i. Pooled:  It is used for exclusively for storing internal control information. i. iii. for the table DDIC another table with the same structure and the same name and the same fields will be created in the original data base. A view never occupy any physical space in the database server. It is considered as a pseudo table. Database View Projection View Maintenance View Help View 7|Page Santosh P .DICTIONARY OBJECTS: 1) 2) 3) 4) 5) 6) 7) Database Tables Views Data Type Type Group Domain Search Help Lock Object 1) Database Tables: . such as documentation.  There is one-to-one relationship i.  The data from several different pooled tables can be stored together in a table pool. Cluster:  Cluster tables are logical tables that must be assigned to a table cluster when they are defined.e.

 A projection view contains exactly one table.  Data element can be created either by referring a direct data type or by referring to a domain. Help View:  Help views can be used as selection method in search helps.  A table type is a global internal existing at the database level. Table Type:  Table type is an internal table create at a data base level it can be associated with a line type.  Structure is used for storing record kind of information. i. A line type can be a data element or a structure. This can minimize interface. A database view is automatically created in the underlying database when it is activated. Internal tables can be divided into three types. You cannot define selection conditions for projection views. ii. Sorted Table iii.  A data element created at once can be used across many places. 3) Data Type: i. Data Element Structure Table Type Data Element:  A data element is a reusable dictionary object. iii.It is a user defined data type which is a collection of different types of fields.  The table type determines how ABAP will access individual table entries. Standard Table ii. Projection View:  Projection views are used to hide fields of a table. Which provides the short description for the field? This description appears automatically on the transaction. Hashed Table 8|Page Santosh P . Structure: .Database View:  Database views are implemented with an equivalent view on the database. At any point of time the structure can store only single record. Maintenance View:  Permit you to maintain the data distributed on several tables for one application object at one time.  Database views are defined in the ABAP dictionary.

You can only access a hashed table using its key.Standard Table: . how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help). since the system does not have to check whether there are already existing entries. The elementary search help must define where the data of the hit list should be read from (selection method). Standard tables and sorted tables are known generically as index tables.Search help are two Types. This means that standard tables can always be filled very quickly. Syntax: . When you define the table. The technical properties include data type. Sorted Table: . Collective Search Help Elementary Search Help: . Hashed Table: . 5) Domain:  A domain is a reusable dictionary object which stores technical properties of the field. The response time for key access is logarithmically proportional to the number of table entries. Elementary Search Help ii. The key of a sorted table can be either unique or nonunique. The key of a hashed table must be unique. In this case. the index administration overhead increases in logarithmic and not linear relation to the number of lines. The response time for key access is proportional to the number of entries in the table. 9|Page Santosh P .types-pools <type poolname>/<type groupname>. size. you must specify the key as UNIQUE. The key of a standard table is always non-unique. i. The system can access records either by using the table index or the key. the indexes of internal tables are administered as trees. Type names within type group <typepool> must begin with <typepool> followed by an underscore. since the system accesses the table entries using a hash algorithm. You cannot specify a unique key.Sorted tables are always saved sorted by the key.  The types in a type group must be declared in ABAP/4 programs with the TYPEPOOLS command.Standard tables have an internal linear index. The response time is independent of the number of table entries. From a particular size upwards. They also have an internal index. since the system uses a binary search.Hashed tables have no linear index. and is constant. When you define the table. The system can access records either by using the table index or the key. 4) Type Group: -They define data types in a type group in the ABAP/4 Dictionary instead of defining them within an ABAP/4 program. 6) Search Help: .  The type group name in the ABAP/4 Dictionary has a maximum of 5 characters. value table.describe a search path. you must specify whether the key is to be unique or not. value range.

Corresponding Fields: As part of select query when the no of fields or sequence of fields retrieved from database table is not matching with the target internal table or structure then we need to use corresponding field‟s statements in the select query. When interactive transaction is programmed. Select-Options: .Possible values are <. >=.I (inclusive.combine several elementary search helps. default) SIGN: . 1) LOW 2) HIGH 3) OPTION 4) SIGN LOW: . OPTION: . 7) Lock Object:  The R/3 system synchronizes access of several users to the same data records with a lock mechanism. >.  Selection-options are used for reading the range of values.It will stores lower limit. It is used for initializing the selection screen fields. bt (between. It is triggered only once in the life time of a selection screen. Describe: .It is the event triggered by sap before displaying the selection screen.Collective Search Help: . HIGH: .Describe table statement counts the no of records in the internal table and stores the count value in the system field „SY-TFILL‟. <=.Include is a keyword used at the field level to include a dictionary structure in another dictionary structure.It stores upper limit.Include: .It is the internal table provided by sap which is associated with 4 fiedls. locks are set and released by calling modules. These function modules are automatically generated from the definition of lock object in the ABAP dictionary. . 10 | P a g e Santosh P . default) or E (exclusive). A collective search help thus can offer several alternative search paths. INITIALIZATION: .

 It there are more no of select queries it increases the network traffic there by decreases the performance. Read always reads the single record even if there are multiple records satisfying the conditions.  To transport only specific fields use transporting keyword as part of read statement.Select end select is considered as database loop and it retrieves single record per request. Because incase of insert if the duplicate record is found it results in runtime error. But this is not recommended.Insert: .Insert statement always inserts a new record and ignores records if it already exists. This is the reason it is recommended not to use select endselect. This improves the performance.  By default read follows linear search first to last.  To avoid the runtime errors use accepting duplicate keys. Modify: .  The no of select queries depends upon the no of records satisfying the criteria. Without accepting duplicate key we have a runtime error.  Read statement can be used either based on an index or based on a condition.  Select-endselect it always retrieves single record per request.modify statement it insets a new record or update the existing records. Transporting: . It clears the local structure clearing from work area.  It is always recommended to use the read statement to sort the internal table before using binary search. SELECT ENDSELECT: . Syntax for inserting data into database table from an internal table: Inset/modify <dbtable> from table <internal dbtable> Read Statement: .By default read statement transports all the fields between body to work area. Clear: . It only checks for primary key field values. 11 | P a g e Santosh P .It is used for reading a specific record from the internal table. Syntax for inserting data into database table from an structure: Insert/modify <dbtable> from table <workarea>.Each & every time we will write clear statement.  While inserting the data into database table from an internal table it is always recommended to use modify statement instead of insert statement.  The index of the internal table starts form 1.

Declare the cursor.Every database vendor provides a set of SQL statements to interact with their own database systems. Step1: . Open SQL 2. Note:  Native SQL statements always embedded between execute SQL and end execute.  Whenever a cursor is opened a select statement associated with the cursor will be processed and the output of the select query is called as active set.) to select query. Note:  Only select statement can be associated with cursors.Read the cursor contents. Syntax: . 12 | P a g e Santosh P .  It should not end the statement with (.Fetch next <cursor name> into <target bind variables>. Note:  For native SQL the variables are preferred (:) bind variables. Step2: .It is a set of SQL statement to interact with database systems from the front end applications like Java.  From ABAP we can use two type of SQL statement. Step4: . Syntax: .Open <cursor name> for <select query>.Standard SQL: ..Read the cursor contents. Native SQL Open SQL: Native SQL: . 1.A cursor is a special data structure it can be use for storing multiple records by using cursors we can avoid the usage of internal tables. Step2: . Step3: .data : <cursor name> type cursor.Open the cursor.Close cursor <cursor name>.Open cursor <cursor name> for <select query>.Open the cursor. Syntax: . Cursors in native SQL: Step1: .net etc…. . Cursors in open SQL: .) period & separate the variable by comma (. Syntax: . Syntax: . This statements are specific to database.Fetch next cursor <cursor name> into <target variable>.

If the field is replaced in several tables we need to identify that field along with table name. Types of message: I (information) W (warning) S (status) E (error) A (abort)  Once we create message class we will use it anywhere of those classes.Step3: .This type of join will retrieve the data from multiple tables if the data is found commonly in all the tables. 1) Inner join 2) Outer join 1) Inner join: .A message class is a collection of messages. Syntax: .Depending upon the sicbret of the message we can use the appropriate message type. 13 | P a g e Santosh P . if any one of the table doesn‟t contain for the given condition no data is extracted from any of a table.Close the cursor. hence „~‟ (tilt symbol) is used along with the table „allies‟ name in order to uniquely identify a field from specified table. Syntax: .Join‟s is used to extract the data from several tables by joining them together with s a common field. Joins are two types. Message classes: .  Se91 is a T-CODE used for creating and managing message classes.message <message type> <message id> <<message class>>. only transparent tables can be used within the joins. The message internal value ranges from 000 to 999.close <cursor name>. In a single message class we can store up to 1000 messages. MESSAGE 000 001 002 003 004 005 006 007 MESSAGE SHORT TEXT RECORD INSERTED RECORD NOT INSERTED RECORD MODIFIED RECORD NOT MODIFIED RECORD DELETED RECORD NOT DELETED RECORD FOUND RECORD NOT FOUND Join ‟ . Note: .

the record does not exist in right side table. It for the specified field. TABLE A TABLE B A a1 a2 a3 a4 a5 B b1 b2 b3 b4 b5 C c1 c2 c3 c4 c5 D d1 d2 d1 d4 d5 D d1 d2 d3 d2 d5 E e1 e2 e3 e4 e5 F f1 f2 f3 f4 f5 G g1 g2 g3 g4 g5 H h1 h2 h3 h4 h5 14 | P a g e Santosh P . if the common record found in both table then the system will extract the data from both tables.Whenever you used the right side table record with left side table.TABLE A TABLE B A a1 a2 a3 a4 a5 B b1 b2 b3 b4 b5 C c1 c2 c3 c4 c5 D d1 d2 d1 d4 d5 D d1 d2 d3 d2 d5 E e1 e2 e3 e4 e5 F f1 f2 f3 f4 f5 G g1 g2 g3 g4 g5 H h1 h2 h3 h4 h5 Table A Inner join Table B A a1 a2 a2 a3 a5 B b1 b2 b2 b3 b5 C c1 c2 c2 c3 c5 D d1 d2 d2 d1 d5 D d1 d2 d2 d1 d5 E e1 e2 e4 e1 e5 F f1 f2 f4 f1 f5 G g1 g2 g4 g1 g5 H h1 h2 h4 h1 h5 2) Outer join: . then system will extract left side record into consideration.

Pass by reference: . 1) 2) 3) 4) 5) Increases reusability Better maintenance Performance improvement Readability Controlling the flow of the program Internal Subroutines: Syntax: .Table A Left Outer Join Table B A a1 a2 a2 a3 a4 a5 B b1 b2 b2 b3 b4 b5 C c1 c2 c2 c3 c4 c5 D d1 d2 d2 d1 d4 d5 D d1 d2 d2 d1 0 d5 E e1 e2 e4 e1 0 e5 F f1 f2 f4 f1 null f5 G g1 g2 g4 g1 0 g5 H h1 h2 h4 h1 null h5 Modularization Techniques: .Syntax for calling internal subroutine performs. 4) F8 (RUN): .In pass by reference the address of actual parameters are passed as parameters to formal parameters. The time of calling the entire statements of the block will be executed as a single step. function module). 3) F7 (RETURN): .It executes single step at a time. Syntax: .Modularization is a process of breaking the program into individual modules.When F7 is pressed inside a block the entire remaining statements of the block will be executed as a single step and the control comes out of the block and cursor is placed in the next statement after the block called.Syntax for defining internal subroutine form. By modularizing the following are the advantages. so any changes made to formal parameters will automatically reflect the actual parameters. method. <subroutine> [parameter list].It is similar to F5 but when F6 is pressed at the time of calling a block. Navigations in break points: 1) F5 (SINGLE STEP): . 15 | P a g e Santosh P .When F8 is pressed the control jumps to next available break point if not available the entire program will be executed as a single step. <subroutine> [parameter list]. (Subroutine. 2) F6 (EXECUTE): .

1) In clu d e en d in g wit h „ TOP‟ : .  In this sub include will be generated. Sections in function builder tool: 1) 2) 3) 4) Importing: . 5) Exception: . Changing: .In pass by value the values of actual parameters are copied to formal parameters. Function module is stored inside function group. 6) Source code: .  Function group can be created by using SE80/SE37.By default the function module type is normal & it is client independent object i. Statements.  Each sub include is reference to a function. 2) In clu d e en d in g wit h „ UXX‟ : . Syntax for calling normal function: Call function <function name> [parameter list] . 16 | P a g e Santosh P . Tables: .These are used for interacting with internal table as parameters. Classes. subroutine definitions and module definitions. It is developed by using function builder tool.these are the parameters returned by function modules.These are used for interaction with user defined exceptions.A function group is a repository object with can contain different type of repository object like function modules. Syntax for defining normal function: Function < function name > . End function. Note: .It is called as top include file and it can contain global declarations. Any changes made to formal parameters will not reflect actual parameters value is a keyword used to pass the parameters by value.It is include generated for sap purpose. Function group: . Exporting: . This can be use both as import & export.e. Whenever a new function module is created. a function module created at one type can be accessed from other client for the same server. etc….these are the parameters received by function module.Function module is a set of statements it is defined only once and it can be called any no of times.In this the function module is implemented.This will act as both importing & exporting.Pass by value: . subroutines. Whenever a function group is created two include programs will be created. Function Module: .

If no exception is raised SY_SUBRC set to “ZERO”. Step3: . Macro: .66/0  It is runtime error  exception occurs.If you want to reuse the same set of statements more than once in a program.  Inside the try block we need to keep these statements where the possible error might occur.  In function modules we can handle the standard exception by using “try & catch”.Handle the exception I the calling program by checking the SY-SUBRC status.  We can handle the standard exceptions by using try & catch blocks. User defined exception in function modules:  In case of system defied exceptions the standard exception is declared & raised by Sap itself & it is handled by the developer. you can include them in a macro.  Exception handling is a process of handling the runtime errors and continues the program execution without termination.Raise the exception in the source code at the appropriate place by using raise statement. It is used in HR-ABAP Macro is a „predefined constant‟ which can hold 9 different placeholders. End-of-definition.O/P: .  Inside the catch block we need to handle the exception. Statements with place holders. Note: . Step2: .  Whenever an exception is raised in the try block SAP creates the appropriate exception class objects and the control is transferred to catch block.Exceptions in function modules:  An exception is a runtime error which is raised during the execution of a program.  Catch CX_ROOT is parent class of catch we can‟t sure able to the choose class we can use CX_ROOT. Syntax for defining macro: Define <macro name>.  In case of user defined exceptions it is declared raised and handled by the developers. Step 1: . 17 | P a g e Santosh P . Example: . (parameters).Declare the user defined exceptions in the exception tab of the function module. The catch block is placed immediately after the try block.

e. which are triggered at different places. 3) RADIO BUTTONS. it is triggered at least once before displaying the selection screen. 7) TAB BUTTONS. 6) TABBED BLOCKS. As part of ABAP they are many events provided by SAP.All the standard macros which are part of HR functional modules It‟s stored in the table “TRMAC”.  This event is triggered after initialization event as well as after at selection screen event. Syntax for designing labels: Selection-screen comment <position> (<width>) <label variable>. i.  As part of selection-screen they are different events triggered. I. Note: . 4) PUSH BUTTONS. 2) CHECK BOXES. Selection-screen begin of block b2 with frame title pqr.This event is used for controlling the screen display in ht runtime. It is used for initializing the selection screen. Selection screen programming: . Syntax for designing blocks: Selection-screen begin of block <block name> with frame [title <title variable>].Syntax for calling macro: <macro name> value1 value2………………value9. 1) I/O FIELDS. Event handling:  Events only write at the last.It is used for generating a selection screen which can contain different types of component. A selection screen can contain following component. It is triggered only one time of life time in the selection screen. Syntax for designing push buttons: Selection-screen push button <position> (<width>) <button name> user-command <function code>. 5) BLOCKS.This event is triggered before displaying the selection-screen. 8) LABELS. 2) At selection-screen output: .e. it is used for refreshing the elements of the screen in the runtime. 18 | P a g e Santosh P . 1) Initialization: .

Syntax for declaring tab buttons: Selection-screen tab (<width>) <name> user-command <function code>. Selection-screen tabbed blocks:  A tabbed block is a collection of tabbed button. Note: .If a data element is associated with a search help then by default f4 help available provided for the field whenever it is used on selection screen or dialogue screen. Selection-screen end of line. Syntax: slection-screen begin of tabbed block <tab.„F4IF_INT_TABLE_VALUE_REQUEST‟ Is a function module used for displaying the internal table contents as a list of values.Note: . 4) At selection-screen on value-request: This event is triggered when the user presses f4 key on a selection-screen I/O field. Selection-screen begin of screen 100 as subscreen.M:.  It the search help is not attached with the data element level then manually we need to attach f4 help.  In this case the function code of the push button is captured in the system field “  SY-UCOMM”. F.blockname>.blockname> for <n> lines. Whenever k4 key is pressed on a field. 3) At selection-screen: . 19 | P a g e Santosh P .If the tabbed block does not have any tab buttons then it results to runtime error. Declaration of tab buttons. Selection-screen end of block <tab. Selection-screen begin of lines.  When the user presses “enter” key in the I/O field.This event is triggered in the following cases. Dynpro does not exist. For a selection screen field or a dialogue screen field.  Each tab button is associated with a sub screen a sub screen is a part of a screen.  When the user clicks on selection-screen push buttons.Screen is a structure provided by SAP this structure will act as internal table in the run time. This structure holds the information of the screen-elements. Note: .

It must be associated with a T-code.It holds the sub screen no. Where <n> can be 1.3. Properties of tabbed block: 1) Active tab: .Syntax for sub screens: Selection-screen begin of screen <screen no> as subscreen. Adding push buttons on selection-screen application toolbar: Syntax: Selection-screen function key <n>. Then both the buttons as well as the functionality will be enabled.2. A transaction cannot executed of its own. By handling the event at user command. which needs to be associated with the active tab. Then standard function code for the standard tool bar buttons. Menu painter (se41): It is used for defining the custom GUI status for a dialogue screen (Or) for a LPS (list processing screen) as part of this new GUI status we can add additional menus. When for the custom GUI status SAP loses the standard GUI status. Set pf-status „<GUI STATUS>‟. 3) Dynnr: .4.It holds the function code of the tab button which needs to be activated.5…. As part of the custom GUI status on LPS if we associate the standard function code for the standard tool bar buttons.It holds the name of the program where the sub screen is existing. 2) Program: .  We can enable the menu painter by using the statement set pf-status „<GUI STATUS>‟ Syntax: . Dialog programming (module pool programming): It is used for developing user defined transaction. As part of this they are 4 events associate. Enable or disable the standard tool bar push buttons and we can add 35 push buttons o n the LPS application tool bar.The GUI status must always be in upper case.. 1) PBO (process before output) 2) PAI (process after input) 3) POV (process on value-request) 4) POH (process on help-request) 20 | P a g e Santosh P . It we associate the user defined function codes then only then buttons are enabled without the functionality in this case we need to enable the functionality.

 When the user selects or deselects a check box or a radio button. By using the keyword controls.It is similar to at selection-screen on help request. With any no of sunscreens If a screen contains tab strip control it must be declared explicitly.This event is similar to at selection-screen event.  A sub screen cannot sit directly on normal screen. It is triggered when the user presses „f1‟ key on a transaction field. It is used for associating custom f1 help for a transaction field.  A single sub screen area can be associated. It is triggered when the user presses „f4‟ key in the I/O field. These variables can be used across the screens in the module pool programs. POV: .It is a component in module pool which is a collection of tab buttons.This event is similar to at selection-screen on value request. Syntax for calling subscreens: Call sub screen <sub screen area> including <program name> <sub screen no>.PBO: .  A tab button is associated with a sub screen.As part of module pool program a top include file can be created which can be used for declaring “global variables”.  When the user clicks a push button.It is similar to at-selection-screen output event.  Sub screen area is a container of sub screens. It is executed before the transactions are displayed as well as after PAI event. It is triggered in the following cases. Note: . Sections in screen painter tool: 21 | P a g e Santosh P .  When the user presses enter key in the I/O field. Syntax for declaring tab strip control Controls <tab strip name> type tab strip. It must be placed on top of screen areas. PAI: . Tab strip control: . It is used for associating custom f4 help for a transaction I/O field. POH: . Syntax for calling normal screen: Call screen <screen no>.  When the user selects a value from the dropdown list box.

Procedure for creating module pool programs: Procedure1: Step1: .In this its specifies the type of screens. 4) Flow Logic: . design the screen (Layout) and the corresponding events (Flow Logic) for the corresponding module pool program.The events are implemented in the form of module definitions. Step3: .Create an empty program of type „module pool‟ (se38). model dialog box. Note: .In this we declare & implement the events along with the corresponding modules. Step2: In screen painter tool (SE51).It contains the information of the elements along wit h the coordinates based on the screen.Declare and implement the events and the corresponding modules (Flow Logic). 3) Layout: .1) Attributes: . Step4: . Step2: . 2) Flow logic validations. normal screens. 2) Element list: .Create a module pool program in SE80 (with/without top include file). sub screen.Associate the T-code (Se93) with the starting screen. 1) Automatic field validations.Design the screen (Layout). 3) Module pool validations. Step3: .Activate all the related objects. Field validation in module pool transaction: We can validate a module pool transaction by using 3 different types of validataion. The error messages are provide by SAP itself. 22 | P a g e Santosh P .In this we design the screen.  As part of this validations. 1) Automatic field validations:  These validations are triggered by SAP itself based on the properties maintained for the field at the dictionary level or at the screen-level. Step5: . Procedure2: Step1: .Associate the T-code with the starting screen.

Whenever the validations are failed on a transaction. (in the form of rows & columns). Appending  for appending contents to end of file. I. But if the transaction fails at least one validation. Perform the operation [Read/Write]. 2) Flow logic validations: . 3) Module pool validations: .input  for reading.In automatic field validation and flow logic validation.  By default table control supports only horizontal scrolling properties. So in these cases explicitly we need to create a button which acts as a cancel button. 23 | P a g e Santosh P . Table control: . File handling on application server: Opening the file: Syntax: Open dataset <path> for <file opening mode> in <text mode/binary mode> [encoding default] [message <string>].  As part of module pool validations we need to declare the module in flow logic and implement in the module pool program.e. SAP doesn‟t allow performing any action by default. On a transaction if any field is failing the flow logic or module pool validation the other fields on the transaction are disabled not allowing the user to input the values. Whenever a field fails a validation. Syntax for declaring table control: Controls <table control name> type table view using screen <screen no>. In most of the times the user wants to exit the screen without submitting the field‟s values of the transaction. This can be avoided by using chain end chain.  Vertical scrolling properties should be enabling explicitly by using settings „lines‟ properties of the table control. The error messages are provide by SAP.These validations are designed by developer in the flow logic. This can be achieved to the cancel button. File opening mode: .Table control is a component in module pool transaction used for representing a data in table or format.Note: .  Chain-endchain is used for grouping the logically related fields. Whenever a functions contains table control component it must be declared explicitly by using controls keyword.  As part of this implementation the developer can provide the user defined the message. it does not support vertical scrolling. Output for writing. The user cannot exit the button. Update  for reading/ writing.

2) For writing: Syntax: . BDC (Batch Data Communication): . BDC Techniques: 1) Direct input method.BDC techniques are used for transferring the data from legacy system to sap. 3) Session. Note: . SAP opens the file.Close dataset <path>. The legacy system can be any text file or excel sheet.1) For Reading: Read dataset <path> into <target variable>. deletes the existing contents and places the file pointer at the beginning of the file for writing new contents.  Whenever an existing file is opened in output mode. 2) Call transaction. SAP creates the file and the file pointer will be at the beginning of the file for writing the new contents. Call transaction & session methods are called as Batch Input Methods.Whenever a file is opened in text mode read data-set statement reads the content from the file line by line in case of binary mode it reads byte by byre. Note:  It a non existing file is open in output mode. If the read is successful sy-subrc is set to „0‟ otherwise „4‟.transfer <variable> to <path> 3) Close the file: Syntax: . Data migration using call transaction method: Data Transaction: - Legacy System Internal Table BDC data Transaction Internal Table (Screen) Call Transaction Method R/3 24 | P a g e Santosh P .

The sequence and data type of fields. For data migration using BDC migration using BDC techniques the ABAP consultants needs to understand the format of the legacy system. [update <update mode>].As part of call transaction and session method we need to map the legacy system data on to a transaction for this we need to use the structure BDC data provided by SAP.It holds the module pool screen no. 1) 2) 3) 4) 5) Type of file (. PROGRAM: . This includes the information like.It holds the module pool screen field name. Syntax for call transaction: Call transaction <tcode> [using <bdc data internal table>]. FVAL: . Data migration using session methods: Legacy system internal table BDC session transaction R/3.It is a flag indicator for the occurrence of a new record.It holds the field value retrieve name from the legacy system and which needs to mapped to the transaction fields. [<messages into <bdc message call internal table>]. whether the file is available on presentation server or application server.TXT file or excel sheet) The type of data is stored in the file The corresponding tables & fields in SAP. DYNPRO: .It holds the name of the module pool program. FNAM: .e. Legacy System Internal Table 25 | P a g e BDC data Internal Table Session Object Transaction (Screen) R/3 Santosh P . Existence of the file i. DYNBEGIN: . It contains following fields. [mode <processing mode>].

Step3: .e. when enter the call transaction is executed the records are processed one after the other.Call transaction Technique is online. It contains following parameters. Session technique is offline processing.SM35 Is the T-code used for processing the session object.Create the session object by using the function module BDC_OPEN_GROUP. a) T-code: .It holds the BDC data internal table. call transaction is immediate processing. a) Client: . Note: . Session object is client dependent. b) DYNPRO TAB: . c) Hold date: . b) Group: . Whenever the network traffic to the application server is lss.It holds the client no in which the session object has to be created.e. In general the session object is processing during non business hours.SM35 Is T-code used for processing the session object.It holds the user name where is authorized to process the session object. Note: . 26 | P a g e Santosh P . e) User: . once the BDC data internal table is mapped to the session object the session object can be processed at later point of time. Procedure to interact with session object: Step1: .It holds the session object name.It holds the T-code of the transaction to which the session object data is mapped.It is an indicator to keep the session output even data processing the session object.e.Close the session object by calling the function module „BDC_CLOSE_GROUP‟.It holds the data in which the session object is blocked. I.In call transaction the errors needs to be handler explicitly in case of session the log is generated automatically by SAP itself which can be analyzed at data later point of time. I. d) Keep: .Map the internal table (type BDC data) data to the session object by calling the function module “BDC_INSERT”. Note: . It contains following parameters. Step2: . I.

Types of update modes: 1) „S‟ (Default) (Synchronous): In this for every record sy-subrc status is returned.  Based upon this recording SAP itself generates a source code. only after receiving the sy-subrc status the next record is processed.Recording Method:  In recording technique we need to record a transaction with same input values. 3) „L‟ (Local Update): It uses the memory of the local system to process the record.Z147/SHDB is the T-code for Recording.  This source code needs to be edited manual to map it to the legacy system for data migration. Syntax: Call transaction <tcode> using <bdcdata> Mode <processing mode> Update<update mode> Message into <bdcmsgcoll> Types of processing mode: 1) „A‟ (Default): It displays all screen one after the other in this mode the error records is validate. 3) „N‟ (No display): It indicates background processing. Direct input method: - Legacy System Internal Table R/3 Database 27 | P a g e Santosh P . 2) „A‟ (Asynchronous): In this no status is returned after processing the record.BDCMSGCOLL is a structure used for collections the messages which are captured during data migration using call transaction.e. Error Handling in call transaction: Note: . 2) „E‟ (Error): Display error screens in this mode the error record is validated as an when it is encountered (as soon as it is displayed on the transaction) ( i. Transaction: . if does not required any user interaction).

 A driver program is an executable program as part of the driver program. Procedure for designing sap script form: 1) Design the form using form painter tool (SE71).  A driver program is an executable program as part of the driver program which is also called as a print program/executable program. And window is used for displaying the data.  A main window can fit to single page it can extend to multiple pages depending on the data.Limitations of direct input method: No error log is generated so we can‟t understand how many records and which records are processed or not processed. 2) Write_Form. Purchase order document. With appropriate windows. SAP Scripts: . sales order document invoice etc.  Once these documents are designed they can send to a printer.  Sap script form is a collection of windows.  SAP script templates are designed by use form-painter tool (SE71)  A script cannot be executed directly. mail server etc. SAP has provided by SAP are available in the table „TNAPR‟.  Every form should contain minimum one window. 2) Create a drier program to execute the form. we use the following function modules. 1) Open _Form. 1) 28 | P a g e Santosh P .It is the word processing tool. 2) There is a possibility of migrating the during migration the records are not passed to a transaction so no validations are performed on the migrated data. It requires a driver program which is also called as a print program.  As part of ABAP. 3) Close_Form. Used for designing the business documents such as quotation document enquiry document. This window is called as main window.

It is an object which holds the common information which needs to be appearing in all the business documents standard text is created on using the T-code (SO10).These symbols are exists in the form of control commands.These symbols and their values are provided by SAP and the exists as the part of the „TABLE-TTXSY‟. It needs o be attached to a change request manually by executing the program „RSTXTRAN‟. 4) Text Symbols: .For modifying the standard text dynamically based on a condition we need to read the existing standard text by using the function module READ_TEXT. 3) Program Symbols: .These symbols and their values are provided by developer.  We can include the standard text in any no of forms by using the control command includes. Each paragraph format is associated with different form and style settings. Transporting standard text: .The data in the window can contain different paragraph format. Standard Texts: . SAP script form is client dependent and language dependent. These symbols are declared in form level and the values are supplied from driver program.Whenever a form is displayed by using START_FORM we must end the form by using END_FORM before opening the next form otherwise it results is ABORT ERROR. Modifying Standard text dynamically: Note: .  Standard text does not generate any change request it needs to be assign to a request manually. Note: . 1) 2) 3) 4) System symbols Standard symbols Program symbols Text symbols 1) System Symbols: .Symbols are used for representing a value in sap scripts there are 4 types of symbols.By default standard text does not generate any change request.Note: . Once the text is read we can modifying the text accordingly and update the changes to standard text by using the function module SAVE_TEXT. 29 | P a g e Santosh P .These symbols and their values are provided by SAP. 2) Standard Symbols: . Types of symbols in SAP scripts: . And there are stored in the „TABLE-TTDTG‟.

To pass the data to smart forms from a driver program we need to use the parameter sections of the smart form function module.  So to avoid this we need to follow the below procedure.Text module is a set of statements which is defined once and which can be included in any no of smart forms.  The reasons for this are when the smart form is transported to production client. And when activated it generates a new function module when naming conventions specific to the production client.Smart forms: .  Even though a smart form can be executed directly we need to create a driver program for calling the smart form function module because in the production system the across to smart form T-code may be decide. But this procedure is not recommended. A smart form does not require any driver programs it can be executed directly. As part of the driver program call the function module „SSF_FUNCTION_MODULE_NAME‟ Function modules take the smart forms name is input and returns the associated function module name which is received in a appropriate variable type. Smart Styles: . Pass data to smart forms: . „TFDIR‟ is a table which stores the smart forms. 30 | P a g e Santosh P . Text Modules: .A smart form is also a word processing tool where the development & maintenance cost is minimum smart form is „client-independent‟ because smart form is a function module generated dynamically whenever a smart form is activated.It is used for designing user defined style format which can be included in any no of smart forms.  As part of the driver program we need to call the smart form related function module.

since indexes have to be updated each time the database table is changed. Syntax: AT NEW <FIELD NAME> STATEMENTS. 3) AT END OF: . 1) 2) 3) 4) AT FIRST AT NEW AT END OF AT LAST 1) AT FIRST: .This event is trigger whenever the first record of the internal table is read. Syntax: AT LAST. Secondary Index: You should only create secondary indexes. 2) AT NEW: .This event is triggered at end of the last row the internal table. Secondary indexes should contain columns that you use frequently in a selection. Syntax: AT END OF <FIELD NAME> STATEMENTS.This event is triggered at end of the last row for specified last field.Control Break Events in Smart forms: . ENDAT. ENDAT.These events must be used only between loop and endloop. STATEMENTS. Syntax: AT FIRST. ENDAT. ENDAT. this event is triggered only once.At new event is triggered whenever a new value is encountered the specified field. STATEMENTS. for database tables from which you mainly read. 4) AT LAST: . and that are as highly selective as possible to improve performance. 31 | P a g e Santosh P .

Subroutines are not executable programs They cannot be independently tested. group. Subroutines cannot return the values. Function modules can return the value. Only a few can handle. that is. Function module are executable programs The can be independently tested. If you want a function to be reusable throughout the system. Difference between select option and ranges: - SELECT-OPTIONS Select-options generate the selection screen. for option and sign fields. they contain sections of code or algorithms that are used frequently locally. They cannot. 32 | P a g e Santosh P . RANGES Ranges do not generate the selection screen. Difference between subroutine and function module: - FUNCTION MODULE SUBROUTINES They can be tested itself. Subroutines are normally called internally. They cannot. use a function module. The table specified as part of select option must be declared explicitly by using table keyword. They have to be maintained in a function It is not necessary.Subroutine: Subroutines are procedures that you can define in any ABAP program and also call from any program. They can handled exceptions. They can be remote enabled. By default it contains default values for option Ranges explicitly we need to assign the values and sign. In case of ranges no need of explicit declarations.

case. It can accept up to 9 place holders (Inputs). Main window can have several ones. Subroutines are used in ABAP (conversion programs). Conditions like if.. only works with printers New barcode technology: SAP converts that are able to generate barcodes by barcode data into an image.. so they can't contain dynamic long texts. Several page formats are possible. It is possible to create smart forms without a main window. Macros are used in HR-ABAP. device types which are able to print graphics few printers supported by SAP 33 | P a g e Santosh P .endif. Smart forms generate XML output which can be viewed through the web. Calling should be the first and definition should be the next. SMART FORMS True tables. with borders. It can accept any no of place holders.Difference between macro‟ s and subroutines : - MACRO The definition of the macro as well as calling of the macro in the same program. no borders. It is client dependent. SUBROUTINE The definition of the subroutine as well as the calling of the subroutine may or may not in the same program. useful for printing several identical labels per page.endcase inside a Exists as conditions on windows window Printer-dependent. It is client Independent. so it works for all themselves (natively or addition of SIMM). We cannot place any executable statement after the definition of the subroutine. Definition should be the first and calling should be the next. Difference between SAP Scripts and Smart Forms: - SAP SCRIPTS Simulated by the use of tabulations. Main window can have only once. There is no XML & HTML Pages format are only once. We can place any executable statements after the definition of the macro.

method the data will be up to in the database. In the variable window text element is optional. Based on the window size data is printed. Call transaction is faster than session method. (00 to 99 times) In the main window text element is compulsory.Difference between main window and variable window in sap-script: - MAIN WINDOW We can split the main window into smaller windows. data in the flat file. We can‟t schedule the call transaction in back We can schedule the session method in back ground. VARIABLE WINDOW We cannot split the variable window. We can manually handle the errors in the call The session method generates an error log that transaction. We can place the same main window up to 99 times per page. Data is displayed continuously. Without a main window we cannot design SAP-SCRIPT. We can place the variable window only once in a page. Session method is little bit slower than call transaction. 34 | P a g e Santosh P . It returns sy-subrc. Difference between call transaction and session method: - CALL TRANSCATION We can process only one transaction at a time. These commands are not work in variable window. will handle the errors. It never returns sy-subrc. SESSION METHOD We can process „N‟ no of transactions at a time. ground. Call transaction is the immediate database After processing the session by using session updating. Top Endtop Bottom Endbottom works with in the main window only. Without a variable window we can design SAP-SCRIPT. Call transaction is suitable for less amount of Session method is suitable for large amount of data in the flat file.

It supports blocked ALV‟S and hierarchical ALV.Difference between call by value and call by reference: - Call By Value Call By Reference It creates a new memory location for use within the subroutine. Logo is possible in grid display. It does not support blocked & hierarchical ALV‟s. Changes made to the variable within the subroutine affects the variable outside The subroutine. But in call by reference method. In the output „I‟ icon indicates no of records are In the output „I‟ icon indicates f1 help. It is slower than list display. Whereas if they are called by reference both will be created at the same location. Santosh P Whenever we are working with row color then it displays the color for non-key fields. It is faster than grid display. Grid display It displays the output in a grid format. Passes a pointer to the memory location. The memory is freed once it leaves the subroutine. In call by value method. „EDIT‟ option is not possible „EDIT‟ option is possible. Whenever we are working with row color then it displays the color for all fields. 35 | P a g e . It supports OOPS ALV. but actually it works on the original copy and thus changes will be reflected back. Differences between grid display & list display: - List display It displays the output in a list format. It does not support OOPS ALV. Changes made to the variable are not affected outside the subroutine. We must use „REUES_ALV_COMMENTRY_WRITE‟ function module to display the header and footer information. a compiler get a copy of the variable and thus changes made in the value in function will not reflected back to the called function. both the actual and formal parameters Will be created in different memory locations. In call by value. the compiler didn't get any copy . Write statement is enough to display the header and footer information. Logo is not possible in list display. displayed.

xls. whenever an error occurred it simply return that error through return parameter. LSMW offers 4 methods 1) Direct method 2) Batch input recording 3) BAPI 4) IDOC We can develop the LSMW only for the stand and transaction codes. BDC_GROUP BDC_INSERT BDC_CLOSE_GROUP function modules fails. Whenever the version is changed we no need to change the existing code of the BAPI that is taking care of BOR. mapping is done by SAP. The flat file data is varying.e. BDC is slower than BAPI Some times BDC cause to terminate the program i. BDC It is updating the data to the database is always through screens. The input for the BDC is any file . DIFFERENCES BETWEEN LSMW AND BDC: - LSMW It is purely designed for functional people who do not do much coding. The input for the LSMW is always text file. 36 | P a g e Santosh P . It performs its own authorization checks. BAPI is faster than BDC BAPI never cause to terminate the program.txt or .DIFFERENCES BETWEEN BAPI AND BDC: - BAPI It is directly updating data to the database. We implement the authorization object in the BDC program. In the BDC mapping is done by ABAPER. BDC BDC is designed for technical people who know much coding. In the LSMW. Whenever the version is changed sometimes we need to change the BDC code. BDC offers 2 techniques 1) Call transaction 2) Session method We can develop the BDC program for any transaction code. The flat file is constant.

BADI is OOABAP (approach) so it is easy implement the logic. BADI We can implement the BADI in any no of times.DIFFERENCE BETWEEN ENHANCEMENT AND BADI:ENHANCEMENT We can implement enhancement only once. BADI is always implemented through BADI implementation (SE19 T-code).FI. That means it needs Some extra time to implement the logic. Screen Exit. It Is Very Easy To Manipulate Erroneously Global Data And Lead The Standard Program To A Dump Or Even To Make Database Inconsistent User-Exit Doesn‟t Have Any Classification Customer-Exit W e H a v e Function-Module Exit. Parameters Customer Exits Are More Restrictive But You Are Sure Any Change You Can Make To Any Parameters Will Never Lead To Inconsistency User Exits Are More Flexible Because You Have More Information To Use In Your Code But On The Other Hand . Enhancement is always implemented through project (CMOD T-code). DIFFERENCE BETWEEN CUSTOMER-EXIT AND USER-EXIT:CUSTOMER-EXIT Customer Exits Are Functions So They Are Called Using Call Function (Or More Exactly Call Customer Function) USER-EXIT User Exits Are Forms And Are Called By Sap Standard Programs Using Perform Inside The Form (User Exit) You Can Read And Inside A Function (Customer Exit) You Can Only Access Your Import/Export/Changing/Tables Change Almost Any G l o b a l Data From Host Program. Basically Designed For All Modules Whereas in Customer-Exit No Access Key Is Needed Needed 37 | P a g e User Exits Are Basically Designed For SD Module While Changing Is Required User-Exit.HR.SD. It is the procedural approach. Customer Exits Are Available For MM. Access Key Santosh P . Menu Exit.

level infrastructure (SAP and customer solutions) Badi‟s allow for a multi-level system landscape (SAP. and the like). 38 | P a g e Santosh P . industry solutions.DIFFERENCE BETWEEN BAPI AND RFC:- BAPI RFC BAPI can't handle exceptions . partner. and customer solutions. as well as country versions. the calling program has to handle it RFC function module can handle it BAPI is registered in the BOR(Business Object Repository) RFC is not registered in the BOR(Business Object Repository) every BAPI is a RFC BAPI are for non sap systems like I want to access data via java or vb every RFC is not a BAPI RFC enabled are basically for sap systems DIFFERENCE BETWEEN BADI AND CUSTOMER-EXIT:BADI CUSTOMER-EXIT Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. Business Add-Ins can be created at each level Some BADI can have multiple independent implementations. which is much better for software deployment as several developers can implement the same BADI independently. Customer-exit implemented in one project cannot be implemented in other. CUSTOMER EXITS (enhancements) are FUNCTIONS so they are called using CALL FUNCTION (or more exactly CALL CUSTOMER FUNCTION Customer exits assumes a two.


 Whenever we instance a class memory will be allocated. Syntax for creating local classes: 1) Definition of class  Declaration of components.An instance of a class is called as an object.  A class only provides a template it‟s doesn‟t allocate a memory.A class is a user defined data type which is the collection of different type of components. Access Specifies (Visibility Section): Types Of Class: 1) Local Class  Local class to program (SE38-ABAP Editor).VINAYAKA Features Of OOPS: 1) Encapsulation 2) Data Abstraction 3) Inheritance 4) Polymorphism Application Of OOPS: 1) BAPI‟S 2) BADI‟S 3) Enhancement Frame Work 4) Webdynpro 5) HR-ABAP 6) CRM-Technical 7) SRM 8) EP 9) BSP…………… Class: . Object: . 1|Pa g e Santosh P . 2) Implementation of class  Implementation of method. 2) Global Class  Class Builder Tool (SE24).

Implementation of methods.Definition of class Class <class name> definition. Access specifiers in ABAP: 1) Public Section 2) Protected Section 3) Private Section Components of ABAP classes: Attributes Methods Events Interface aliases Types Constants Data Special Instance Constructor Normal Instance Instance Static Instance Static Static Constructor Static 2|Pa g e Santosh P . Declaration of components. Endclass.Whenever an Object is created memory will be allocated for the attributes of the class and attribute gets initialized to default values. Endclass. Object Creation: 1) Create reference for the class Syntax: Data <> type ref to <class name> Note: . Implementation class Class <class name> implementation.

Syntax: Method/Class-Method <method name> [parameters].1) OOPS Concepts 2) ALV Reporting Using Class 3) ALV Reporting Using Function Modules Procedure for creating global classes: 1) Define and implement the class in class builder tool (SE24). 3|Pa g e Santosh P . Note: . Endmethod. Statements. 3) Call the method. Syntax: Method <method name>. 2) Implement the method in the class implementation. Y(20) type c. At any point of time they object store one set of values. Interacting with methods in local classes: 1) Declare the method prototype in the class definition. Method with parameters: Methods: m1 importing X type i.Whenever a report program contains class implementation and explicitly we need handle the event start-of-selection to indicate the starting point of program. Syntax: Call method <method name> [parameters] Instance method  methods Static method  class-methods It is recommend to use in the SAP attributes/data members/Instance variables  protected/private. Include Program. and Subroutine Pool). Method‟s/member function  public. By instantiating the class.Only public component can be accessed outside of the class. Note: . 2) Access the components of the global class in the repository objects (Executable Programs.

. Exception handling in methods:  An exception is runtime error which is raised during the program execution if the exception is not handling the program will be terminated..  A method can contains only one returning parameter..  CX_ROOT is a super class for all the exception classes and it can handle any kind of exception.  All the exception classes provided by SAP start with the naming standard „CX_SY_.  In case of ABAP a method can return any number of values by declaring those many numbers of exporting (or) importing (or) changing parameters..  The exceptions are provided by SAP as part of standard exceptions class these exceptions are triggered by SAP itself as a developer we need to handle these exceptions by using try and catch block.  If the method contains returning parameters it cannot contains exporting (or) changing parameters..... 4|Pa g e Santosh P .  To receive the method and return exactly one value we use returning parameters..  Inside try block we need to declare this statement where the possible exception occurs.  Exception handling is process of handling in runtime error and containing program execution.Methods returning values: Returning Keyword:  In case of other object oriented language a method can return exactly one value which done by using return keyword.  Returning parameter is always passed by value..As part of catch block declaration we need to specify the exception class which is reasonable for rising exception if the developer is not sure of the exception class we can use the exception class „CX_ROOT‟.  It the exception is raised in try blocked SAP creates the appropriate exception class object and the control is transfer to catch block.  Inside the catch block we need to handle the exception by writing the appropriate exception handling statements.‟ Note: .

Syntax: Exception <exception name> 2) Raise the exception at appropriate place in the method implementation Raise <exception name> 3) Handle the exception while calling the method by checking sy-subrc status. Instance methods: In local classes they are declared by using the keyword METHODS they can be accessed only by using the object. Instance attribute:  These attribute are specific to an object and they are declared by using the keyword „DATA‟ in local classes.  For each instance attribute separate memory will be allocated they can be an accessed only by using the object of the class.Capturing system defined exception message: Procedure for handling standing exception: These exception are declared and raised SAP as a developer we need to handle try and catch. They can access only static attributes. They can access both instance and static attributes. Procedure for handling user-define exception in local classes: 1) Declare the user define exception as part of method declaration.  They can be accessed either by using the object are by using the class name.  For the static attribute memory will be allocated only when the first object is created the remaining objects points to be the same memory location they are also called as class variables. Static methods: In local class they are declaring the keyword „CLASS-METHODS‟ and they can be accessed either by using object are by using class name. 5|Pa g e Santosh P . Static attribute:  They are not specific to any object and they are declared by using the keyword „CLASS-DATA‟ in local classes. User defines exception: These exceptions are declaring and handle are raised developers itself.

 It can contain only importing parameters and exceptions.Constructors: A constructor is a special method used for initialized for attributes of class it special because it cannot be called explicitly it will be called implicitly. 1) When we accesses the static components of the class using the class name before creating any objects. 6|Pa g e Santosh P . 2) When we create the first object of the class. A method can have any types of parameters. Note: . Note:  Instance constructor is executed only once in the life time of object. in the lifetime of every object where as static constructor will be called only once in the lifetime of class. 1) Instance 2) Static Instance Constructors: .It is declared by using keyword „CONSTRUCTORS‟ it is executed automatically whenever we create new instance of a class. SPECIAL METHOD CONSTRUCTOR Only in public section.If a class contains both instance and static constructor and when we create the first object.  Static constructor is executed only once in a life time of class. NORMAL METHOD It can be declared in any of the sections. It has to be called explicitly. Static Constructors: . It can be called any know of times in the Instance constructor will be called only once lifetime of an object.  It is always declare in public section. Instance constructor can have importing parameters and static constructor cannot have any parameters. It cannot return values. Methods can return values.It is declared by using the keyword „CLASS_CONSTRUCTORS‟ it is executed automatically whenever a class is loaded a class will be loaded in cases. 3) It is not specific to any object it cannot contains any parameters and exception. It called implicitly. 1st the static constructor is executed and next instance constructor for rest of the objects only instance constructor get executed. It is specific to object.  It never returns any values.

 Consider two independent classes A and B.By default outside the class of an object can access only public components of the class directly.User defined exception: Rising: .  In the above case the class B should be forward declared by using the keyword „DEFERRED‟.  Deferred keyword indicates to SAP that the class definition has been delayed and it has been declared same where else in the program.If a method is a capable of raising the exception that enable to handle the exception then we need to use the keyword „RAISING‟ as part of method declaration in this case the caller of the method as to take the responsibility of handling the exception.  By using friend classes to enable the object to access any components of the class directly irresponsibility of the visibility for this consider the following session. Friend classes: .  If class A considers class B as friend by inside class B methods we can instantiate class A and use the instance we can access all the component of class A directly irrespective of the visibility. 7|Pa g e Santosh P .

and the base class which takes the properties is called as subclass (or) derived class. CLASS A CLASS A CLASS A CLASS B CLASS B CLASS B CLASS C CLASS C Single inheritance Multilevel inheritance Multiple inheritance 8|Pa g e Santosh P . 3) Multilevel inheritance: A class derived from another derived class. The advantage of inheritance is reusability. Note: . They are three types of inheritance. 1) Single inheritance: A class derived from single super class. 2) Multiple inheritance: A class derived from more than one super class.Inheritance: It is the process of acquiring the properties of other entity (class).  Only public and protected components can be inherited.In ABAP we cannot implement multiple inheritances directly we can implement indirectly through the concept of INTERFACE. 1) Single 2) Multiple 3) Multilevel  The class which gives the properties is called as super class.  In local classes we need to use the keyword „INHERITING FROM‟ for achieving inheritance.

 Whenever a sub class wants to override the super class method a sub class wants to declare the super class method in the subclass by using REDEFINITION keyword. 1) Class level 2) Method level  The class created as final cannot be inherited.Method overloading Method overriding Method overloading: If a class contains two methods with the same name but different signature it is called as method overloading.Polymorphism: Poly  Many Morph  Forms Ism  behavior Examples: .  ABAP doesn‟t support method overloading.  Whenever a subclass overrides the super class method it is always recommended to call the super class method version in the subclass by using keyword. „SUPER‟. 9|Pa g e Santosh P .  Super keyword is used for referring to super class components from the sub class. Method overriding: If a sub class overwrites a super class method is called as method overriding.  A method created as final can be inherited but cannot redefine. Hierarchy of constructor execution: When a super class contains static and instance constructor and if sub class contains only the static constructor in this case if we instantiate the sub class then the static constructor are executed from super class to sub class and then the instantiate constructor of the super class will be executed.  While redefined the methods we cannot change the visibility of the method.  To redefine a global method put cursor on the method click on redefine. Final keyword: Final keyword can be used at two levels.

If the super class and sub class contains respective static and instance constructor and if instantiate the sub class first the static constructor are executed to super class to subclass and when the instantiate constructor will executed subclass to super class. Private classes:     Private classes cannot be instantiated. The sub class inherited the private class is also created as private class by default.  Public classes can be instantiated.Protected classes can be inherited but cannot be instantiated outside the class but it can be instantiated within the sub class method.Me keyword refer to current object execution it is used to differentiate both attribute and method parameters whenever attribute and parameter names are same. Note: . 10 | P a g e Santosh P . Protected classes: . Private classes can be inherited.The default visibility of a class is public.  The sub class inheriting the protected class is also created as protected by default to create the sub class as explicit public class we need to use extension create public as part of sub class definition. This is the only place where the constructor can be are must be called explicitly.  The sub classes inherited the public class is also created as public by default.  Public classes can be inherited.Note: . Me keyword: . This sub class cannot be created as explicitly public class this can be mode possible if the super class considers the subclass as friend.If the super class and sub class contains respective instance constructor it must for subclass instance constructor to call the super class instance constructor this is done by using „SUPER‟ keyword. Visibility of component level: 1) Public section 2) Protected section 3) Private section Visibility of class level: 1) 2) 3) 4) Public Protected Private Abstract Public: .

whenever the interface components is referred outside the interface declaration it must be prefixed with the name of interface we can avoid the lengthy naming standard by declaring the aliases by the interface components these aliases must be declared in the definition of a class whichever the implementing the interface.e.  We cannot instantiate the abstract classes because they are not fully implemented. Declaration of components End interface.It is pure abstract class i. Aliases: . Abstract method is a method which is just declared but not implemented in local class they are declared by using the keyword abstract. The class whichever implements the interface is called as implementation class and this class should implement all the methods of the interface otherwise this class should be declaration as abstract.  By default the visibility of the interface components are public.interface <interface name>.  Abstract methods are always declared in public (or) protected section.e.  We declared method as abstract when we are not sure about the implementation but we are sure that the other classes as to use the same methods.  Interface methods contain only declaration but not implementation the implementation must be provided in the corresponding class.  The class which ever inheritance the abstract class can implement the abstract method of the abstract class otherwise the subclass will declared as abstract. Syntax: .  Interface is always implemented in public section. 11 | P a g e Santosh P . Interfaces: .  We cannot the instantiate the interfaces because it is not implemented.  Abstract methods are also called as non-concerted methods. Syntax for local interfaces: Interface <interface name>.  If a class contains at least one abstract method then the entity class should be declared as abstract.Abstract class:  It is a class which contains at least one abstract method. By using aliases we can also change the visibility of the interface components. by default all methods of interface are abstract.  A local class whichever wants to implement the interface must declared the interface in the class definition by using interface keyword. A class can implement any number of interfaces which is nothing but multiple inheritances whenever the interface component is referred the outside of the interface they must be prefixed with the name of the interface.aliases are the alternative names provided to the interface components i. By using interfaces we can implement multiple inheritances.

 Actor class is always created as private class and it is a sub class of base agent class.ABSTRACT CLASSES INTERFACES Can contain both abstract and non-abstract Can contain only abstract methods. Explicitly we need to use abstract Persistence service: . 1) By using business key identity.  Persistence class is always global and the naming standard is „ZCL_ (or) YCL‟. This service is implemented in two ways.  Persistence class is always created as protected class.  In this case when the persistence class is mapped with the database tables SAP adds the fields of the database as the attributes of the persistence class.  Whenever a persistence class is created SAP automatically create to class. public. Abstract class components are directly referred Interface components must be prefixed with the in subclass.  Once the persistence class is created it needs to mapped with the corresponding database table. Persistence class using business key identity:  In this we consider the primary key fields of the database table as business key identity which is used for identity the object uniquely.  Base agent class is always created as abstract the class and it is the friend of persistence class. methods. This service is implemented by using persistence classes. A class can implement any know of interfaces. A class can inherit only one abstract class. 2) Agent class or actor class „ZCA_ (or) YCA_‟.  Also it creates the following methods as part of the base agent class. 12 | P a g e Santosh P . Abstract methods can be declared in public or All components of interface by default are protected section. name of the interface.It is used for storing the state of an object formality it is similarly to serialization java and . By default all methods are abstract. 2) By using GUID (global unique identifier)  Storing the state of object permanently in the database is called as persistence. 1) Base agent class naming standard is „ZCB_ (or) YCB_‟.  By default the lifetime of the scope of an object is within the program where it is created.

But the base agent class is always created as abstract class and therefore cannot be instated.  The above three method are public instance methods which gets inherited to actor class.when a persistence class is mapped with the database table containing GUID also the field expects the GUID are added as attribute of class and also getter and setter method are generated for the entire field except GUID. But actor class is created as private class and therefore cannot be instated.  To access the above three methods we require the object of base agent class. Note: .  We need to access this public static attribute agent using the actor class name. The data element of this field can be GUID/OS-GUID.  This field is used for unique identification of the object.In this we need to consider database table which contains GUID as the first field. The data type of this field raw data type. 3) Get_persistence. We need to use the above methods to interact with the persistence service. Transact 13 | P a g e Santosh P . Persistence service using GUID: .  As part of the actor class SAP as provided a public static attribute agent.  Since the above three method are inherited to actor class we need to instantiate the actor class and access these methods.1) Create_persistence.  The value for this field is generated dynamically by SAP. Singleton class: Creating a class in such way so that we can create exactly one object is called as singleton. This object is return back using which we access the above three methods. 2) Delete_persistence. When accessed internal it execute the static constructor of actor class it is reasonable for creating the object.  We use the following mechanize to access these methods.  Actor class is created as singleton class.  A part from this SAP also generates getter and setter methods as part of persistence class.  Getter method is generated for all the fields of the database and setter methods are generated for non-primary key fields of the table.

To get these object of transaction manger interface. Casting: .It is a process of converting an object from a more details view to be less detailed view. Since transaction service is implemented in global classes we need to attach a T-code for a transaction class method so that everything will be executed as single process.  If the transaction fails SAP raise the exception as part of this exception handling we need to cancel the transaction by calling the undo method of the interface IF_OS_TRANSCATION. 1) Wide casting 2) Narrow casting Wide casting: . 1) CL_OS_SYSTEM  CLASS 2) IF_OS_TRANSCATION_MANGAER  INTERFACE 3) IT_OS_TRANSACTION  INTERFACE Procedure for interacting with transaction service: 1) Start the object oriented transaction by calling the start method of the interface.It is the process of converting a variable from one data type to another data types they are two types. As part of this we need to use the following class and interfaces. 2) Perform the required operation:  End the transaction by calling the end method of the interface IF_OS_TRASACTION.ion service: . Narrow casting: . To get this object we need to access the static method GET_TRANSCATION_MANAGER of the class CL_OS_SYSTEM. 14 | P a g e Santosh P .  When the transaction is successfully completed SAP issues commit work statement internally for saving the transaction permanently. IT_OS_TRANSACTION Start method is an instance method of interface IT_OS_TRANSACTION so we need to instantiate.It is use for managing the object oriented transaction involving database operations. The interface IF_OS_TRANSACTION which cannot be done directly.It is the process of converting an object from a less detailed view to more detailed view. So we need to access the instance method Create_Transaction of the interface IF_OS_TRANSACTION_MANAGER to access this method we required the object of transaction manger interface. Implementing persistence service using transaction service: Note: Transaction service is always implemented globally. If we access the transaction class method form local program it executed the different process which are assuming as two different translations.

As part of custom classes we can declare user defined events. These events are used in ALV reporting work flow customization CRM technical DSP and webdynpro programming.  These event handler methods are executed automatically whenever the event is raised are triggered. „DELETE_PERSISTENT. These events are declared are raised and handle by the developer itself. Declare the event handler method in the definition of the class. Register the handlers. Step2 Syntax: Methods/class-methods <method name> for event <event name> of <class name> [importing parameter list]. For every event there can be one are more event handler methods within the class are across the classes. Raise the event in one of method implementation. If the persistent object is available it returns the object of object class which needs to be type casted to the corresponding persistent class object. Santosh P 15 | P a g e .As part of ABAP objects SAP as provided many events as part of standard classes. They are static event is not specific to an object. Instance event is specific to an object. Procedure for interactive with user defined events in local class:      Declare the event in the definition of the class. Pass the persistent class object as an input to the method. Implemented the event handler method in the class implementation. Static events are declared by using keyword „class-events‟. They are two types of events 1) Instant 2) Static      Instance events are declared by using keyword „events‟.‟ Event handling in object oriented: .Procedure for deleting the persistent object using GUID: Check the existent persistent object using the method gets persistent OID. Step4 Syntax: Set handler <handler> [for <instances>]. Step1 Syntax: Events/class-events <event name> [exporting parameters list]. Step3 Syntax: Raise event <event name> [exporting parameter list].

 For executing the event handler methods we need to register the handlers. For all instance: . 16 | P a g e Santosh P .  As part of handler such that the event handler method will executed irrespective of object used for raising the event. Note: .  Static event can be raised either in instance are static method.while register the handler for register events as part of set handler statement we need to specify the object name after for keyword.e. This is reasonable for raising the event. Static event handler method:  Instance event can be raised only in instance methods. for keyword is not allowed for the static event part of set handler this similarly for all instances in case of instance event. The parameter name in the event as well as in event handler method must be same.if the handler is not register events can be triggered but no actions can be performed because the event handler methods will not be executed. By using this register handlers SAP will execute all the event handler methods. Static event: . Accordingly to sequence of register.  Events can contains only exporting parameters which are imported by event handler method these parameters are always passed by values. Because static event is not specific to on object i.While registering the handlers for static even we should not specify the object which is reasonable raising the static event. One after the other. This as to be done for every object separately which is raising the event instead of this we can use „FOR ALL INSTANCE‟ keyword.


VINAYAKA ALV (Advanced List Viewer / ABAP List Viewer): 1) Using classes 2) Using function module ALV Reporting using classes: ALV reports are used for displaying data in the form of the table as part of the we use the following classes. 1) 2) 3) 4) 5) 6) 7) 8) CL_GUI_ALV_GRID CL_GUI_CUSTOM_CONTAINER CL_GUI_CONTAINER CL_GUI_SIMPLE_TREE CL_GUI_PICTURE CL_GUI_DOCKING_CONTAINER CL_DD_DOCUMENT CL_GUI_SPLITTER_CONTAINER

As part of the ALV reporting we need to develop the ALV grid which is display on top of a custom control. A custom control is a physical control which is available as part of dialog screen. ALV grid cannot recognize custom control on its own it required an interface. These interfaces are provided in the form of a standard class. This class can be either. 1) CL_GUI_CUSTOM_CONTAINER 2) CL_GUI_CONTAINER CL_GUI_CUSTOM_CONTAINER / CL_GUI_CONTAINER


1|Pa g e Santosh P







Example1: Sale Document Header Data VBELN ERDAT 4970 4971 4972 ERZET ERNAM Sale Document Item Data VBELN POSNR 4972 4972 4972 10 20 30 MATNR M1 M2 M3 NETWR

Material Data

MM02 Transaction(Change Material)

Material Number


To display an internal table data in the grid we need to use the instance method 'SET_TABLE_FOR_FIRST_DISPLAY‟ of the class „CL_GUI_ALV_GRID‟. This method contains only one mandatory parameter „IT_OUTTAB‟ which expects internal table of output.

2|Pa g e

Santosh P

While displaying the internal table data in the ALV grid we need to generate the field catalog for the field, if the field catalog is not specified if result in ABORT error field catalog is not found. A field catalog can generate in two waves by using. 1) Function modules 2) Manually Field catalog is an object which stores the information of the fields like field name, field position, field label, etc. once the field catalog is generated we need to pass the field catalog object as on input to the parameter IT_FIELDCATALOG of the method „SET_TABLE_FOR_TABLE_DISPLAY„. LVC_T_FCAT is a table type used for generating the field catalog this table type is associated with the structure LVC_S_FCAT. Note: - To display an ALV column and hotspot we need to set the field hotspot as part of field catalog generation. HOTSPOT_CLICK: It is the event of the class „CL_GUI_ALV_GRID‟ which triggered by SAP, whenever a hotspot column is clicked. REFRESH_TABLE_DISPLAY: Is an instance method of the class CL_GUI_ALV_GRID used for refresh the ALV grid with the latest internal table data. DOUDLE_CLICK: It is the instance event of the class CL_GUI_ALV_GRID which is triggered whenever an ALV column cell value is double click. CL_GUI_SPLITTER_CONTAINER: CUSTOM CONTAINER SPLITTER CONTAINE CONTAINER1 CONTAINER2 CONTAINER3 PHYSICAL CONTROL CL_GUI_CUSTOM_ CONTAINER CL_GUI_SPLITTER_ CONTAINER CONTAINER4 CL_GUI_CONTAINER


3|Pa g e

Santosh P

This event can be used for generating the heading for an ALV GRID.Example 2: TOP OF PAGE HEADING VBELN 4970 4971 4972 VBELN 4972 4972 POSNR 10 20 MATNR M1 M2 ERDAT ERZET ERNAM NETWR After splitting the container into different of panes each pane should be assigned with height and column width for setting the row height we need to use the instance method SET_ROW_HEIGHT and column width SET_COLUMN_WIDTH of the class CL_GUI_SPLITTER_CONTAINER after this we need to associated each pane of a container with container object. TOP-OF-PAGE event is not triggered by default it must be register explicitly by calling the instance method LIST_PROCESSING_EVENT. 4|Pa g e Santosh P . By using the method GET_METHOD of the class CL_GUI_SPLITTER_CONTAINER this method takes the row and column as input and return the container object of type CL_GUI_CONTAINER. BUTTON_CLICK: BUTTON_CLICK is the instance of event of the class CL_GUI_ALV_GRID which is triggered whenever the user click on the ALV cell value display on top of a button. To display an ALV column as a button we need to set the field STYLE as part of field catalog generation. TOP-OF-PAGE: TOP-OF-PAGE is the instance of event of the class CL_GUI_ALV_GRID which is triggered whenever an ALV grid is displayed. The value of these type fields are represented by the constant attribute of class CL_GUI_ALV_GRID these constant attribute can we access by using the class name and the starts with the naming conversion MC_STYLE.

TREE AND PICTURE CONTROLS:  Transaction  Sales Order o Create Sales Order o Change Sales Order COMPANY LOGO  Purchase Order o Create Purchase Order o Change Purchase Order ALV GRID (FIELD CATALOG WITH FUNCTION MODULE) UPLOADING PICTURE TO DISPLAY IN DIALOG SCREENS: SMWO is the T-code for uploading the pictures.  Icon is a type group it is provided by sap itself.  CNTL is a type group it is provided by SAP itself. TABLE_STRUCTURE_NAME 1) It holds the structure name representing the node structure of a simple tree this structure is ABDEMONODE.  Every node in a tree is associated with a node key it used for indentifying the node which selected on a tree. 2) NODE_TABLE it holds the internal table representing the ABDEMONODESTRUCTURE. 2) Call the instance method LOAD_PICTURE for URL of the class CL_GUI_PICTURE of this method takes the URL as input and displays the picture in the container. PROCEDURE FOR DISPLAYING IMAGES IN DIALOG SCREENS: 1) Call the function module „DP_PUBLISH_WWW_URL‟. 5|Pa g e Santosh P . PROCEDURE FOR DESIGNING TREE STRUCTURE: 1) To add the nodes to a tree structure it use the instance method ADD_NODES of the class CL_GUI_SIMPLE_TREE this method takes the following parameters. This function module take object ID and return URL of the picture this URL is of type CNDP_URL which is type declaration declared in the type group CNDP.

EXCLUDING ALV TOOLBAR BUTTONS: To exclude the standard ALV toolbar buttons we need set the parameter IT_TOOLBAR_EXCLUDING as part of method call SET_TABLE_FOR_FIRST_DISPLAY this parameter of an internal table of type UI_FUNCTION this internal will hold the function code of the puss button that needs to be excluded. It is table type associated with the structure LVC_S_MODI. MODIFYING ALV CELL VALUES IN RUN-TIME: To make the ALV column as editable in runtime we need to set the field EDIT as part of field catalog generation. 1) EVENT_ID AND 2) APPL_EVENT LVC_FIELDCATALOG_MERGE is a function module it generate the field catalog on the structure as input generates the field catalog this function module take the dictionary structure fields and return the field catalog which the type LVC_T_FCAT. NODE_DOUBLE_CLICK is the instance event of a class CL_GUI_SIMPLE_TREE it is triggered whenever a node item is double click. 6|Pa g e Santosh P .  By default DATA_CHANGED is not triggered it must be registered explicitly by calling the method REGISTER_EDIT_EVENT of a class CL_GUI_ALV_GRID.  The event NODE_DOUBLE_CLICK is not triggered by default if must be registered explicitly by using the method SET_REGISTERED_EVENT. and value.  These attributes contains a information related to be modified cell the information include row id.  This method contains of parameter event of type CNTL_SIMPLE_EVENT it is an internal declared in the type group CNTL this internal table contains two fields.  As part of the above class we need to use instance attribute MT_MOD_CELLS (OR) MT_GOODS_CELLS which are of type LVC_T_MODI.  Whenever the user modifies ALV cell values in runtime and to reflect to change in data base table we need to handle the event HANDLE_DATA_CHANGED of the class CL_GUI_ALU_GRID this event is triggered enter key in the modified cell.  As part of event DATA_CHANGED we need to import the parameters ER_DATA_CHANGED it is a parameter which is the object of the class CL_GUI_CHANGE_DATA_PROTOCOL. field name.

ADDING CUSTOM PUSH BUTTONS ON ALV TOOLBAR: MENU_BUTTON: MENU_BUTTON is the instance events of the class CL_GUI_ALV_GRID which is triggered whenever a menu button in the ALV toolbar is clicked we can handle the event is associates with the list of menu items of the menu buttons.Whenever we click on menu items of menu button normal push buttons (or) ALV toolbar SAP triggers the following event one after the other. Note: .  We need to loop this internal table to enabled are disabled buttons. variant name) Define start condition (immediate specific period) Save the job (release the job) Check the job overview (SM37) 7|Pa g e Santosh P .  As part of the event toolbar we need to import the parameter E_OBJECT. this method return the indexes of the selected rows on the grid. BACKGROUND SCHEDULING OF ALV GRID: Steps 1) 2) 3) 4) 5) Define background job (SM36) Define step (program name. BEFORE_USER_COMMAND USER_COMMAND AFTER_USER_COMMAND IDENTIFYING SELECTED ROWS: To identifying the selected rows in the ALV grid we need to use the instance method GET_SELECTED_ROWS of the class CL_GUI_ALV_GRID.ENABLING / DISABLING STANDARD ALV TOOLBAR B UTTONS:  For this we need to HANDLE_TOOLBAR event of the class CL_GUI_ALV_GRID this event is triggered whenever an ALV GRID is displayed. Which is the object of a class CL_GUI_EVENT_TOOLBAR_SET this class contains an instance attribute MT_TOOLBAR these attribute of an internal table of type TTB_BUTTON it is associated with the structure STB_BUTTON this attribute internal table holds the information of the ALV toolbar buttons.

DIPLAYING TRAFFIC LIGHTS IN ALV GRID:  Traffic light in the ALV grid represents the significant of the row this column is always assed in first column in ALV grid.  Declare an additional column of type character in the finial internal table. Docking container cannot recognize custom control docking container is represented by the class CL_GUI_CONTAINER. To recognize whether the ALV report is in background error in foreground executed we need to use the static method offline of the CL_GUI_ALV_GRID.  We need not explicitly generate the field catalog for the traffic light column. 8|Pa g e Santosh P .  Before displaying the ALV grid loop final internal table and the value of traffic light column based on a condition.SM36-> JOBNAME (ANY NAME) JOBCLASS A | CLICK ON STEP (F6) | Z915AM_ALV4 | VAR1 | SAVE | BACK | START CONDITON | IMMEDIATE | SAVE | BACK-> SAVE SM37-> Z915AM_ALV4 | EXECUTE Whenever an ALV reports uses custom control in the screen the reports cannot scheduled in the background process because the background processor cannot recognized custom control. this method returns ZERO if it is foreground execution otherwise NON-ZERO value if it background execution. so if the custom control is not used we cannot use custom container in this case we need to use docking container.

DISPLAYING ALV CELLS AS DROP DOWN:  Taken an additional column which is supposed to display as dropdown. As part of layout generation we need to the field EXCP_FNAME.  To prepare and associate the list of value to the drop down column calls the instance method SET_DROP_DOWN_TABLE of the class CL_GUI_ALV_GRID.  Before displaying the ALV grid to the final internal table and the appropriate column coding form the additional column.  By handling on „F1‟ event of the class CL_GUI_ALV_GRID.  By attaching the custom help to the field at the data element level. F1 HELP:  To provide custom „F1‟ help for an ALV column we can specify into two waves. By default „ONF4‟ event is not triggered it must be register explicitly by calling the instance method „REGISTER_F4_FOR_FIELDS‟ of the class CL_GUI_ALV_GRID. the value of this field should be the name of the additional column.  As part of layout generation the set the field INFO_FNAME the value of this field should be the name of the additional column. COLORING ALV ROWS: PROCEDURE:  Taken additional column in the final internal table it should be a char size „4‟. 9|Pa g e Santosh P . ONF4 EVENT: We can associate the standard „F4‟ help for an ALV column for setting the fields „REF_FIELD‟ „REF_TABLE‟ as part of field catalog generation. to associate the custom „F4‟ help we need to handle the event „ONF4‟ of the class CL_GUI_ALV_GRID.  To attach standard „F1‟ help for an ALV column we need to set the fields „REF_TABLE‟ „REF_FIELD‟ as part of field catalog generation.  Generate the field catalog for the additional column ad part of field catalog generation assign a numeric value to the field DRDN_HNDL.

In ALV using function module we can generate the field catalog in two waves. PROCEDURE FOR DISPLAYING IMAGES IN ALV GRID DEVELOPED USING F M‟ S:1) Upload the picture using „OAER‟ with object id. 1) Name 2) Form Name will hold the name of event and form will hold the subroutines. To display the information and picture in the TOP-OF-PAGE event we need to use the function module REUSE_ALV_COMMENTARY_WRITE.ALV USING FUNCTION MOUDLES: As part of this we use the following function module to display the ALV grid. iv. 1) By using the function module REUSE_ALV_FIELDCATALOG_MERGE this function module takes dictionary structure as input and return the field catalog of type SLIS_I_FIELDCAT_ALV. ii. 2) Pass the object ID in the function module call REUSE_ALV_COMMENTARY_WRITE 10 | P a g e Santosh P . iii. SIMPLE ALV INTERACTIVE ALV BLOCKED ALV HIERARCHICAL ALV While calling the function module REUSE_ALV_GRID_DISPLAY we need to call field catalog otherwise it need to abort error. As part of ALV using function module to handle the events we need to use the parameter IT_EVENTS as part of the function call REUSE_ALV_GRID_DISPLAY this parameter is a internal table of type SLIS_T_EVENT this event is of SLIS_ALV_EVENTS and this type contains two fields. 2) Manually by using the internal table SLIS_T_FIELDCAT_ALV. 1) REUSE_ALV_GRID_DISPLAY 2) REUSE_ALV_LIST_DISPLAY i. Instead of passing the field catalog we can pass the dictionary structure as input if the format of dictionary structure does not match with format of internal table it need to runtime error.

11 | P a g e Santosh P .OAER | NAME-> PICTURES TYPE-> OT KEY-> Z915FMALV (ANY NAME) | EXCUTE | EXPAND THE STANDARD DOCUMENT | DOUBLE CLICK ON SCREEN | GET PATH AND CONTINUE ALV BLOCKED LIST: It is used for display the data in the form of blocks as part of this we use the following function module. 3) Display the function module using function module RESUE_ALV_BLOCK_LIST_DISPLAY. 1) REUSE_ALV_BLOCK_LIST_INIT 2) REUSE_ALV_BLOCK_LIST_APPEND 3) REUSE_ALV_BLOCK_LIST_DISPALY 1) Initialize the ALV block by using the function module REUSE_ALV_BLOCK_LIST_INTI 2) Append the internal table data to the ALV block using the function module REUSE_ALV_BLOCK_LIST_APPEND. Repeat the second step to each internal table. HIERARCHICAL ALV: It is used for displaying the data in the form of parent and child nodes as part of this we use the following module REUSE_ALV_HIERSEQ_LIST_DISPLAY. INTERACTIVE ALV: USER COMMAND: .Is user triggered whenever the user double click on ALV cell value developed using function module.