SAP Theory
SAP Theory
Both open & native SQL can be used Only Open SQL Only Open SQL
The Table name, fields name and no Table names and Field names Table names and Field
of fields are similar in DDIC and are different in the database. names are different in the
Database. database.
It is a mirror image of the DB Table. It is linked with another set of It is stored with another set of
tables called table pools in the tables called Table Cluster
DB. Pool.
Open SQL: It is a set of statements which can interact with any kind of database.
Native SQL: It is specific to the particular database & it hits the database directly.
How data is stored in a cluster table?
A cluster table contains data from multiple DDIC tables. It stores data as a name
value pair (varkey, vardata).
Is it possible to create custom transaction code to maintain the
table? If yes, how to create it?
Yes, We can create it by using the custom T-Code using SE93.
What are the differences between Include structure and
Append structure?
It can be inserted at any position It can insert only at end of the table
It is possible with the custom tables It is possible to insert structure for both
Standard & Custom Tables
All the steps of include Structure must be All the steps of the append structure must
saved in either our own package or $TMP be saved in our own package.
The table must be in change mode It can be inserted in display mode also
It is possible to add the additional fields It is not possible to add the additional fields
manually after Include Statement manually after Include Statement
How to identify the standard tables? (Indications)
The tables which don't start with Z or Y.
The tables which can't be seen in the CHANGE mode.
How many types of Indexes are there and explain about them?
Indexes are used to avoid duplicate data while accessing the table. Indexes can
also be used for better performance while extracting the data from the tables. There
are 2 types of Indexes.
Primary index: It is generated by the system using the key field of the tables.
Key fields hold the unique data.
Secondary Index: These are created and maintained by the Technical
Consultants/ABAPer. We can create 9 secondary indexes per table. We can
create the secondary indexes for both custom & standard tables.
What is Where Used List?
It is used to list out all the dependent objects & know the usage of the particular
object.
Can we add/Enhance additional customer specific field values
to standard domains?
Yes, the standard domains can be enhanced to add additional customer-specific
fixed values & intervals using the Menu path: Go to ->Fixed Value Append at
Domain level.
What is a check table?
It is a table which contains all valid entries of a field. Check table is the dependent
table to which the relationship is defined using the foreign keys. The contents of
the check table field are shown in the input help for the referenced field.
For example: - Check the employee master table and employee transaction table.
Whenever an employee transacts you need to check whether the employee
exists. So, for that you can refer to the employee master table. This is nothing but
a Parent child relationship. Here data is maintained at client level. No development
involved. As per DBMS, what we call foreign key table, is called a check table.
What Is a Value Table?
Value table is the table attached to a field at the domain level, Where the entry to
the field can be only from the value table. They are not used in the input help. The
value table is the default check table.
This is maintained at domain level. Whenever you are creating a domain. You can
enter allowed values in the value range. For example, check the domain SHKZG –
Debit/ Credit Indicator. Here Only allowed values are H and S. Whenever you will
be using this domain then the system will force you to enter one of these allowed
values. This can be defined as value table.
Value table is maintained at the Domain level in SAP. During domain creation, the
value range of the domain is defined by specifying a value table.
What are the differences between Check table and Value table?
It can be used to extract the data in the It can’t be used to extract data since it is linked
program. with the domain.
The search help is displayed from the check The search help is displayed on each field which
table on the foreign key field of Foreignkey is linked with the same domain of the Value Table.
table.
It forces the user to select any one of the check It does not force the user since it has an empty
table field entries. value by default.
TABLE STRUCTURE
Table contains the data Structure does not contain the data. It is filled with single
records at runtime.
It must contain at least 1 field as the It does not contain a primary field.
Primary Key.
Database must contain Delivery class It does not contain Delivery class & Technical Settings.
&
Technical Settings.
Tables have primary and secondary Structures do not have primary and secondary indexes.
Indexes
They can be used as reference for Work area’s & Internal They can be used to declare Work area &
tables Internal tables directly.
The ABAP statement TYPES is used to declare Types. The ABAP statement DATA is used to
declare
Field Strings.
It doesn't hold the data since they are not data objects. It holds the data since they are data
variables.
What is Foreign Key?
Foreign key is a concept that is used to define relations between tables in the ABAP
dictionary.
A relationship which can be defined between tables must be explicitly defined at
field level. foreign keys are used to ensure consistency of data.
Data entered should be checked against existing data to ensure that there is no
contradiction. While defining foreign keys, cardinalities have to be specified.
Cardinality mentions how many dependent records or how referenced records are
possible.
What is a Client Dependent & Client Independent table?
The table which has the MANDT field (Client no) is called Client Dependent table.
The table which doesn't have the MANDT field (Client no) is called Client
Independent table.
What are Key fields & Non-key fields?
The key fields don’t allow duplicates. It contains unique data. The key field
checkboxes are checked to make the fields as primary keys.
The non-key fields may/mayn’t allow duplicates. The key field checkboxes are
unchecked.
What is the Initial Value Check box?
The Initial Value Checkbox is checked to take the default field values of the key
fields for the 1 time.
st
Foreign key relationships can be created since it Foreign key relationships are not created.
contains domains.
Field labels (Headings) are displayed while ‘+’ symbols appear while maintaining the table
maintaining the table. instead of field labels.
FUNDAMENTALS
What are the differences between a Work Area and Field
Symbol?
The ABAP Statement is DATA is used to declare The ABAP Statement FIELD-SYMBOL is used
or Define work areas. to declare or Define work areas.
The ABAP statement INTO is used to process The ABAP statement ASSIGNING is used to
record by record through the work area. assign the FIELD-SYMBOL.
The ABAP statement MODIFY must be used to No need to modify it, Since it is Pointer.
modify the internal table.
No need to specify within the Angular Brackets It must be specified within the Angular Brackets
(<>) (<>).
What are internal tables and work areas? Differentiate between
internal table and work area.
Internal tables and work areas are temporary memory locations which are used to
store data of database tables at runtime and in other ways we can call them as
instances of database tables.
Differences between Work area and internal tables?
Temporary memory locations which are Temporary memory locations which are used
used to store single line data of database to store data from the database table at
tables at runtime. runtime.
Record by record is processed through In the case of an internal table with a header
the work area. line, the record by record is processed
through the header line.
What are the different types of internal tables in SAP ABAP?
Differentiate between the internal table’s types in SAP ABAP.
There are three different types of internal tables in SAP ABAP programming which
are given below.
Standard Internal Tables
Sorted Internal Tables
Hashed Internal Tables
These are default internal These are special types of internal These are used with logical
tables. tables, where data is already databases. I.E. with all
(automatically) sorted as you insert the fields and all records.
record
To read a record we use To read a record we use either key or Here the index operation is
either key or index index operation not allowed. We can only
operation use key operation
To search for a record, we To search for a record, we use binary To search for records, we
can use either linear search search as data is already sorted. use a hashed algorithm.
or binary search.
We can use insert or We can only use inserts. Please do not These are mainly used in
append to add records. modify it. ABAP with BI projects.
It is used to define Check boxes, Radio It is used to define Single & Range input Fields
buttons & single I/P fields.
The ABAP statement TYPE/LIKE is used to The ABAP statement FOR is used.
refer to the Data Types.
The Operator ‘EQ’ or ‘=’ is used in the The operator ‘IN’ is used in the WHERE condition.
WHERE condition.
It is used as an input data variable It is a system generated internal table with the
fields SIGN, OPTION, HIGH & LOW.
What are the different types of internal tables and explain about
them?
Internal Tables: -They are the intermediate tables to hold the multiple records at
run time.
There are 3 types of internal tables.
STANDARD Internal tables: -The standard Internal Tables are filled using the
ABAP statement 'APPEND'/’INSERT’. It accepts duplicate records. Searching
for a record is Linear Search. It is the default index table. Standard internal
tables can be sorted explicitly.
Syntax:- DATA:<gt_dbtab> TYPE STANDARD TABLE OF
<typ_dbtab/dbstr.......................... >.
SORTED Internal table: -The ABAP statement 'INSERT/APPEND' is used to
fill the Sorted Internal Table. It does not accept the Duplicate records.
Searching for a record is Binary Search. Sorted internal tables cannot be sorted
explicitly. An additional statement with the UNIQUE/NON-UNIQUE key must
be used to declare Sorted Internal Tables.
Syntax:-DATA: <gt_dbtab> TYPE SORTED TABLE OF
<dbtab/dbstr............... > WITH
UNIQUE/NON-UNIQUE KEY <k-f1><k-f2>.
HASHED Internal tables: - They are Non Index tables. The Hashed Internal
Tables hold a larger amount of data than Standard & Sorted internal tables
since they follow a ‘Hashed Algorithm’. The ABAP statement ‘WITHUNIQUE
KEY' must be used to declare Hashed Internal Tables.
It holds a larger amount of data (2 GB) than standard & sorted internal
tables.
Syntax:-DATA :< gt_dbtab> TYPE HASHED TABLE OF
<dbtab/dbstr............ > WITH
UNIQUE KEY <k-f1><k-f2>.
Can we sort the internal table without using a SORT statement?
Explain?
We can sort the internal table without using a SORT statement by declaring a
sorted internal table. Ex: DATA: IT_MARA TYPE SORTED TABLE OF MARA.
Explain a few of the additions to PARAMETERS and SELECT-
OPTIONS statements.
PARAMETERS
Obligatory: It is the keyword to make the input field as mandatory
Default: It is the keyword to pass the default values to the input fields.
As checkbox: It is the keyword to define the checkboxes in the selection screen
Radio button group: It is the keyword to define the radio buttons in the selection
screen
As list box: It is used to define the dropdown list in the selection screen
MATCHCODE OBJECT: It is used to specify DDIC search help to the input
fields
MODIFIED: It is used to assign all the screen elements to the modification
group to format the Selection fields dynamically
LOWER CASE: It is used to make the input fields as case sensitive to accept
both upper & Lower case letters
Memory ID: It is the keyword to access the field value from one session to
another session
Additions of SELECT-OPTIONS :
NO-EXTENSIONS: This addition is used to hide the multiple selection button
in the Selection screen.
NO-INTERVALS: This addition is used to hide the higher limit of select-options
in the Selection screen.
DEFAULT…TO: This addition is used to pass the default values to lower &
upper limits
Differences between Ranges & SELECT-OPTIONS?
It is used to define range internal tables. It is similar to SELECT-OPTIONS.
SELECT-OPTIONS are displayed in the selection screen whereas Ranges doesn’t
appear in the selection screen
Some Keywords?
Append: It is the keyword used to append record by record from the work area to
the last record of the internal table.
Syntax: APPEND <gs_dbtab> TO <gt_dbtab>.
Insert: This statement is used to insert a new record at any position of an internal
table.
Syntax : INSERT <gs_final> INDEX <n>? SY-TABIX.
Collect: It is also used like an APPEND statement. This statement is used to
compare character/string fields data & summarizes the numeric field data. It is used
to display subtotals.
Syntax :COLLECT <gs_source> INTO <gs_collect>.
Lines: It is the keyword which returns no of records available in the internal table.
Occurs: It is the keyword; it allocates 8KB of memory for the internal table by
default. If the data in the Internal table exceeds 8KB then it will bring one more 8KB
of memory & so on up to 2GB.
Clear: It clears the contents of the work area & internal table with header lineITAB[
]& variables.
Refresh: It clears the contents of the internal table only.
Free: It clears the contents of the internal table along with allocated memory.
Explain some of the useful additions of WRITE statements?
Some of the useful Additions to WRITE statements.
....WRITE: /------ >It is used to display the data in a new line.
....WRITE: /n (m)-------- >Displays 'm' characters from position 'n'.
…UNDER OTHER OBJECT----------- >To display the data under the previous
displayed data.
....COLOR------ >It is used to display the data in different colors. color codes[0
– 7]
…LEFT-JUSTIFIED/CENTERED/RIGHT-JUSTIFIED: These are used to
adjust the data at the left hand side, center & right hand side.
....AS CHECKBOX--------- >Display the checkboxes in the output.
....EDIT MASK------- > It is used to display the mask on confidential data.
…INPUT: It is used to make the output list as editable.
....NO_GAP------ >To remove the gaps in the data.
…CURRENCY: It is used to specify the currency keys for the currency data
variables.
....UNIT----- > It is used to specify the required units while displaying the
quantity data.
…HOTSPOT : It is used to display the hand symbols on the output data when
the cursor is placed.
What is the basic Difference between internal tables and
database tables? How can we differentiate by looking at the
tables? And how Handling of Internal Tables?
The basic Difference is that database tables are Stored in DB Server and the
internal tables are virtual tables that are created at runtime only.
Explain about the System Fields with which you have worked?
Operator
Contains Pattern(CP)
Contains No Pattern(NP)
Contains No String(NS)
CA: This condition becomes true when the source string contains any one of the
characters in the target string.
NA: This condition becomes true if the string comparison operator CA is false.
CO: This condition becomes true, when the source string contains only the similar
string in the target string including case.
CN: This condition becomes true if the string comparison operator CO is false.
CP: This condition becomes true, when the source string contains the specified
pattern in the target string.
NP: This condition becomes true in case of Logical expressions with a string
operator CP is false. (Opposite to CP)
CS:This condition becomes true when the source string contains a similar string in
the target in both Upper & Lower case (not case-sensitive).
NS: This condition becomes true if the string operator CS is false (Opposite to CS).
Mathematical Functions: - The below Mathematical operators can be used on the
numbers.
Operator Statement
Equal to EQ
Not Equal to NE
Less Than LT
Greater Than GT
Operator Description
SELECT SINGLE is used to read the SELECT UP TO 1 ROWS is used to read appropriate
exact record from the database table. records from the database table.
To read an exact record from the We can read appropriate records from the database
database table we need to provide all table; we may not need to provide all key fields.
key fields.
This statement should be used only if This statement should be used only if we have some
all the key fields are available. key fields or no key fields.
It hits the database table for each record since it is It hits the database table once to
a loop statement extract all the required data since it is a
statement.
Sometime It gives you error in runtime while It doesn’t give you any short dump
debugging
Not advisable due to lack of performance & It is advisable since it extracts the data
database load. faster & has good performance.
It is not possible to change the system generated It can be changed since it is in the
program without having the Access key. Custom namespace ( Z or Y )
Modularization Techniques
What are the Modularization techniques which you follow?
They are used to organize the ABAP code in the proper way , make the program
more Understandable and make use of the code re-usable to avoid the duplicate
data.
To divide the business processing logic into reusable blocks of statements.
Following are the different types of Modularization techniques:
INCLUDES: These programs are part of another main/include
programs.Include programs can’t be executed independently whereas the
same include program can be included in any no of executable programs. The
ABAP statement INCLUDE is used to call or define the INCLUDE programs.
Subroutines: These are local modularization techniques. The subroutines can
be debugged at run time. Calling should be 1 & Definition should be next. The
st
These are local. We can access the These are global. We can access the function module
Subroutines within the server only. within the server as well as outside the server.
We can’t execute the subroutine We can execute function modules independently using
independently. T-Code SE37.
Subroutines can’t handle the exceptions. The Function Module can handle the errors through
exceptions.
What are the differences between Macro & subroutine?
MACRO SUBROUTINE
Definition & Calling in the same program. Definition & Calling may / may not be in the same
program.
Definition should be 1st & Calling should be Calling should be 1st & Definition should be next.
next.
Macros can take upto 9 inputs. Subroutines can take any number of inputs.
By It is the default method. The pointer uses the same The Actual parameters
Reference memory allocation for both actual & formal are changed with the
parameters. From Calling to definition & definition formal parameters.
to calling, all parameter values are passing along
with the memory
By Value The system allocates new memory. The allocated The Actual parameters
memory is freedonce the subroutine ends. From are not changed with
calling to definition & definition to calling, the the formal parameters.
parameter values only pass.
By Value It is almost similar to by value but the only The Actual parameters
and Return difference is the formal parameter values are are changed with the
returned to Actual Parameters. formal parameters.
DEBUGGER
Explain about Debugger, Breakpoints and Watchpoints?
Debugger :- This tool is used to check the program line by line & block by block for
finding and rectifying errors or bugs.
Break Points:- These are Statement based. They are used to stop the program in
the debugger tool for checking line by line or block by block.
Breakpoints are of 4 types. We can place up to 30 break points in the program.
Session BreakPoint: An icon set/delete breakpoint icon or click on a
statement line at gray color vertical selection in the source code.
Static BreakPoint: The ABAP statement BREAK-POINT/BREAK
<user_name> is used to set the Static break point. In real time, the ABAP
statement BREAK-POINT should not be used since all the users are
stopped.
Dynamic Breakpoint: They are used to check the program in case of not
being able to find a location. The command /H is used to set dynamic
breakpoints. The program is stopped at the first statement line of the
performed action.
External Breakpoint: They are used to check the cross-application
components such as RFC, BAPI from one system to another. An icon set
or delete external break-points is used to set or delete external breakpoints.
Watch Points: - These are Condition based. They are used to stop the program
once the set condition is reached. The Watch points can be set inside the debugger
tool. We can place up to 9 watch points in the program. We can reduce debugging
time using watchpoints.
Differences between Classical & New debugger?
It has lots of limitations such as different It is a very efficient tool to check lots of actions
desktops are not there, no separate such as different desktops, separate actions for
sections for local, global variables etc. local & global Variables & objects at a time.
Single Step F5: The function key F5 is used to check Line By Line of the program.
Execute F6: The function key F6 is used to check Block By Block of the program.
Return F7: The function key F7 is used to Return from the source code of the
process blocks such as subroutines, function modules, methods etc.
Continue F8: The function key F8 is used to jump from one breakpoint into the next
break point then execute once the last break point is reached & then execute.
How to debug Background Jobs?
The Background jobs can be debugged using the command ‘JDBG’.
Execute the T-code SM37
Check the required background job to be debugged.
Enter JDBG in the Command field & Press Enter
Keep on pressing F7 until the required program is stopped.
Use the Function keys F5/F6/F7 to check the program Line by line/Block by
Block once it is reached.
What are the steps to debug the Pop-up window?
Create a text file with the required statements & save it on Local PC/Desktop.
[FUNCTION]
COMMAND = ‘/H’
Title = ‘Debugger’
Type = ‘System Command’
Minimize the SAP Pop-up window screen to appear in both Text file & Pop-up
window screen.
Drag & drop the saved text file into the Pop-up window screen.
Note: The system gives the success message as Debugging Switched ON.
Perform the required action to stop the corresponding program (Yes button).
What are the types of execution modes?
There are 2 types of executionmode to execute a program or the transaction
codes.
Foreground: It is used to execute the programs or the transaction codes directly by
pressing the execute icon or F8 function key. It requires user interaction.
Background: This execution mode is used to execute the programs or the
transaction codes periodically such as Hourly, Daily, Weekly, Monthly etc in
background. It doesn’t require any user interaction. The variants must be created
before the programs are scheduled in the background.
The T-code SM36 is used to define the background jobs &
The T-code SM37 is used to check the status of the background jobs.
The standard function modules
JOB_OPEN ->To open background job
JOB_SUBMIT ->To submit job in background
JOB_CLOSE ->To close scheduled jobs.
REPORTS EVENTS
What are the Selection-Screen events, explain?
AT SELECTION-SCREEN -> This event is triggered after providing Input to the
selection screen.
AT SELECTION-SCREEN OUTPUT ->This event is triggered while performing any
action in the selection screen. It is used to modify (format) the selection screen.
AT SELECTION-SCREEN ON -> This event is triggered after input values provided
in the selection screen. It is used to validate/check the input data of the selection
screen.
AT SELECTION-SCREEN ON VALUE REQUEST FOR ->This event is triggered
when the user clicks on the F4 button. The standard function module
F4_INT_TABLE_VALUE_REQUEST can be used to display the possible entries
as search help.
The function module DYNP_VALUES _READ is used to capture the selection
field values in the same selection screen for Dynamic search help.
At selection -screen ON HELP-REQUEST FOR ->This event is triggered when the
user clicks on the F1 button .The standard function module
‘HELP_OBJECT_SHOW’ can be used to provide the Help document to the input
variable. The T-code SE61/SO72 is used to maintain the Help documentation as
per the specification.
Explain about the Parallel Cursor Method?
This Method is used for better Performance in case of the nested loops (Loop within
the loop).
Steps to use this Method:-
Read the 2nd internal table (Item table) within the loop of the Base/Main internal
table (gt_header) with the required keys and get the index of the current record.
Set the loop to the 2nd internal table (ITEM internal table) to process the data
from the SET INDEX and use the EXIT statement to come out of this 2nd loop
for the unmatched data.
How many Times the Event INITIALIZATION Triggers while
displaying the list of 20 pages and also TOP-OF-PAGE?
INITIALIZATION Triggers Only One time and TOP-OF-PAGE triggers 20 times.
What is the prerequisite to use “FOR ALL ENTRIES”?
The Base internal table which can be used in the 'FOR ALL ENTRIES' statement
must be checked whether it has data or not.
What are Joins & types of Joins?
Joins are used to fetch the data from more than one table.
Inner join: This statement is used to extract the data from the multiple tables by
joining them. Up to 2 tables can only be joined.
For all entries:This statement is used to extract the data from the database
table based on the entries of the Base internal table.
Explain about Loop termination statements?
The following statements are used to come out of the loops and continue with the
next loop statements.
EXIT: - This statement is used to come out of the loop statement and continue
with the next statement line outside of the loop statements in the program.
STOP: - This statement is used to stop the Loop process along with the next
part of the loop statement.
RETURN: - RETURN is a statement which is used to stop processing of the
current block immediately.
CONTINUE: - This statement is used to stop the current loop process and
continue with the next loop process.
CHECK: - This statement is used to check the specified conditions and
continue with the next loop process.
CHECK = CONDITION + CONTINUE.
Explain about the events associated with Classical Reports?
Following are the EVENTS associated with the Classical Reports .
LOAD-OF-PROGRAM: This event triggers at the time of loading the program
into a memory.
INITIALIZATION: This event is triggered before the selection screen is
displayed. It is used to clear & refresh the data variables and used to pass the
default values to the selection fields.
AT SELECTION-SCREEN: This event is triggered after providing the input in
the selection screen.
START-OF-SELECTION:It is the default event & mandatory to execute any
executable program. It is used to fetch the data from the DB. If no event is used
in the executable program, the entire program will be triggered under Start-Of-
Selection.
END-OF-SELECTION: This event is triggered after the Start-Of-Selection
event is processed. It is used to specify the data process statements.
TOP-OF-PAGE: This event is triggered with the first ULINE/WRITE/SKIP/NEW
PAGE statement in the START_OF-SELECTION event in the program. It is
used to display the column headings.
END-OF-PAGE: This event is triggered at the end of each page. It is used to
display the footer details of a page such as totals etc..The report addition LINE-
COUNT must be specified to trigger this event.
Which is the default event?
The default event is START-OF-SELECTION .If no event is used in the executable
program, the entire program will be triggered by Start-Of-Selection. The main
program begins with this event.
Is it possible to display the previous drill down list from the
current one? Ex: If I suppose I am in the 10th drill down list. Is
it possible to display the 5th drill down list from the current
list?I have 1 basic list and 15 secondary lists in the interactive
report. If I am in the 9th list, how can I come directly to the basic
list?
Yes. By re-setting list index = 5. i.e; SY-LSIND = 5.
System variable SY-LSIND stores the list number, by using this we can go to the
basic list.
In an interactive report if a user 19 times double clicked, again
he wants to see the main screen.How can do this?
If Sy-ucomm ='BACK'.
Leave to screen 0.
Endif.
What are the events associated with Interactive Reports?
Following are the EVENTS associated with the Interactive Reports .
AT LINE-SELECTION: This event is triggered at the time a user clicks on any
record of any list. It is used to provide a detailed list based on the current list.
The system field SY-LSIND holds the Index of the next drill down list.
AT USER-COMMAND: This event is triggered at the time a user clicks on any
menu item. This event is used to provide additional functionality based on the
selected push button.
TOP-OF-PAGE DURING LINE-SELECTION: This event is triggered with the
first WRITE/ULINE/SKIP of the drill down list. It is used to provide the column
headings for the drill-down list.
AT PF: This event is triggered when the function key is pressed. This event is
used to provide additional functionality based on the selected menu item.
SET PF-STATUS: This event is triggered at the time of attaching our own GUI
to the list. It is used to call the menu status.
Up to 35 Push buttons can be created on the Application tool bar.
What are the differences between Classical & Interactive
reports?
Classical reports are used to display the entire information in a single/ basic list.
Interactive Reports are used to display the summarized information in the basic list
& detailed information in the next drill down list. Up to 20 secondary lists are
provided & the total no of lists are 21.
Which techniques were used to identify the record which was
clicked by the user in the previous list?
Ans: HIDE & GET-CURSOR
HIDE: This statement is used to hide the selected field value which can be
passed to the corresponding drill down list to filter the unwanted records. It is
used to capture the selected field values to the next drill-down list. Hide
statement provides Single drill-down list.
GET-CURSOR: This statement is used to capture the selected field values &
field names based on the cursor position. This statement provides multiple
down lists.
What are the System Fields associated with Interactive
Reports?
System fields associated with Interactive reports .
FIELD DESCRIPTION
NAME
LSIND Index of the next drill down - contents of the current list Index no
LILLI Selected list line number – contains the exact line no of the selected
record
AT NEW ON CHANGE OF
They must be used within the loop It can be used within the loop statement outside
statements. of the loop statements also
It can’t be used on more than one field using It can be used on multiple fields using the SET
the SET operator ‘OR’. operator ‘OR’.
The work area is impacted by replacing It doesn’t impact the Work Area.
with Asterisk (*******)marks
It extracts single record from the It extracts all the records into a buffer and moves the first
database table record into an application program
Use this one, in case all key fields Use this one, in case it is not possible to use all the key
can be considered fields
It is slower It is faster
Simple reports using the WRITE statements The system generated Functions start with
within the loops. REUSE* are used to display the data.
Performance is not as good as ALV Reports Performance is good since the data is
since the LOOP statement must be used to displayed using the function modules outside
display the data of the loops.
It is not possible to edit the Fields in the Output. It can be possible to edit the Fields in the
Output.
It is difficult to display the LOGOS in the It is so EASY to display the LOGOS in the
output. output
Tab Index Index no. of the selected record in the final internal table
Step2: Create a selection screen with two or three fields.
Write the below code in the program after the above selection screen
statement.
Write the below code in the program in the Initialization event.
Execute the report and you will see three push buttons on the selection screen
as below.
Now to handle the buttons in the program, first we need to create a custom GUI
status copied from the standard GUI as below
RSSYSTDB& %_00 refer to the standard GUI status.
Now we need to add the function codes for the above three buttons created on
the selection screen.
FC01, FC02 and FC03 refer to the three buttons which we have activated
above.
Here we will add the function codes for the three buttons. These function codes
will be captured in the system variable SY-UCOMM field and this can be used
in the program logic.
Function code ‘DISP’ is used here for the first push button (FC01), similarly
‘CHAN’ and ‘CREA’ for second and third push buttons respectively.
After entering the function codes for all the push buttons activateṣ the pf-status.
Now come back to the program and write the below code in the
AT SELECTION SCREEN OUTPUT event.
Now execute the program and you can find the selection screen below.
Summary: In this way we create buttons along with the icons on the
selection screen.
SAP SCRIPTS
What are the Components of SAP Script (Form Painter/Layout
set)?
SAP Script form contains 2 parts.
Form painter (Layout Set) 2. Print Program
Header: It is used to maintain the Administrative & basic settings data.
Administrative data:
It contains the technical details such as Package name, Changed by,
Created by etc..
Basic data:
It is used to maintain the default settings which can be applied across
the forms.
TheBasic settings are page format, orientation, font size etc.
The first page & the default paragraph names must be specified once
they are created.
Pages:
They are the rectangular format of the documents.
This element is used to maintain the next page, print mode, page counter
mode etc.
Windows:
They are the small components on the pages.
We can place the same window in any number of pages.
The windows are not positioned on the pages unless they are assigned to
the pages.
Page window:
They are used to position the window on the pages.
Different position attributes, Left margin, upper margin, Window width,
Height are maintained. It is used to place the window on the page with
coordinates.
Paragraph format:
They are used to print/format the entire paragraph with a required format &
style.
Standard Attributes: It is used to maintain the standard attributes such as
alignment, line spacing, left margin, right margin etc.
Font Attributes: They are used to maintain the font setting such as font
family, font size, bold, italic etc.
Character format:
They are used to print/format the particular text/string with the required font
& style.
They can also be used to select the Bar codes.
Standard Attributes:It is used to select barcodes, superscript, sub scripts
etc..
Font Attributes:They are used to maintain the font type,font size, bold, italic
etc.
Print Program or Driver Program:
The Driver program is used to extract the data from the database tables or
views, process the extracted data & pass the processed data to the SAP
Script form to display/print on the document.
What are the different types of Windows?
Windows: - They are used to define the different types of windows.
Following are the different types of windows.
Main Window: It is the default widow. It is used to display the continuous text
on the pages. Without the main window we can’t design SAP scripts. The
system generates the pages dynamically for the main window. Up to 99 main
windows can be created in a form. The window type is ‘MAIN’.
Constant Window: This window contains the static content which can be
formatted only once to print/display the same contents on all the pages.
Variable Window: It is used to print the data based on the window size. It can
be formatted for each page to print/display the different contents. Without a
variable window, we can also design the SAP script.
Graphic Window: It is used to print/display the graphics/logos on the page.
Symbol Description
TAG MEANING
= Extended Line
/: Command Line
/* Comment Line
/E Text Element -> Display multiple entries of an internal table Paragraph format
enough space to print the continuous text. If no page has enough space, it simply
breaks the text & printing in different pages.
Syntax: /: PROTECT
/E ELE
/: ENDPROTECT
Define: This command is used to define/declare the symbols in SAP Script.
Syntax: /: Define &GV_SYMBOL&
Box: This command is used to draw the Boxes/Frames on the page windows.
Syntax: /: BOX XPOS <**> cm/mm YPOS <yy> cm/mm
/: WIDTH <ww> cm/mm HEIGHT <yy> cm/mm
/: FRAME <FF> TW INTENSITY <yy> TW
Note: An additional INTENSITY is used to gray out the boxes.
The command position & size can also be used to define the box position &
sizes.
Top…End Top: This command is used to display/print the contents at the Top
portion/Header of the specified window.
Syntax: /: TOP
/* Display/Print at Top of page window.
/: ENDTOP
Bottom…End bottom: This command is used to display/print the contents at the
Bottom/Footer portion of the specified window.
Syntax: /: BOTTOM
/* Display/Print at Bottom of page window.
/: END BOTTOM
New-Page: This command is used to generate the next pages.
Syntax: /: NEW-PAGE.
New-Window: This command is used to generate the new windows.
Syntax: /: NEW-WINDOW.
How to add additional functionality to a script without
modifying the print (driver) program?
The Form Routines (PERFORM.......................... END PERFORM) is used to add
the additional functionality to the SAP Script form without making any changes in
the print program.
What are client dependent objects in abap/sap?
SAP Script layout, text element, and some DDIC objects.
Can we call another Form from the same print program in sap
script?
Yes, we can call other forms in the same print program/driver program.
How to copy the Standard Script and make the changes?
The path SE71--->Utilities---> Copy From Client can be used to make the
necessary changes.
How to convert the language from DE to our required
language?
In SE71, Utilities ->Convert Original Language, Provide the To Language & press
Enter
How to transport text elements in SAP ABAP?
If it is the first time, they will automatically be transported along with the program.
If you change them next time, it will ask for TR.
What are the Standard Texts?
The Standard texts are used to maintain the Long text using the T-Code 'SO10'.
The command INCLUDE….OBJECT is used to insert the standard text on the
page window. Syntax: /: INCLUDE <ZSTP_TEXT_NAME> OBJECT <obj-
name>
ID <id_name> LANGUAGE <EN/..>
The standard function module ‘READ_TEXT’ can also be used in programs to
read standard text & application text.
By Default the System doesn't generate any transport request for standard
texts.
The standard Report 'RSTXTRAN' is used to generate the Transport Request
number for Standard texts.
Tell me about some of the Standard Scripts and Print
programs?
Some of the useful Standard Script Forms and Print programs :-
FIELD DESCRIPTION
T-Code Description
SE63 Translations to translate the text symbols & text elements in different languages
SMARTFORMS
What are the major differences between Scripts and Smart
Forms?
SAP Script SMARTFORMS
The back Ground Images are not possible Background Images are possible
It is not possible to create SAP Script It Can be created without the Main Window also.
without a Main Window.
Multiple page Formats are not possible Multiple page Formats are possible
The data extract logic (ABAP CODE) can't be written The data extract logic (ABAP CODE) can be
written under INITIALIZATION and program lines
node
The Tables & Templates are not possible but the The Tables & Templates can be drawn to display
Command box is used to draw the static or dynamic data
boxes
Not on First Page: The corresponding contents are not to Print/Display on the 1 st
page.
Only after the end of the Main Window: To Print/Display the corresponding
contents after the MAIN window is processed.
Before end of Main Window: To Print/Display the corresponding contents of the
node or text node before theMAIN window is ended.
Only On page: To print/Display the data on the specified page.
What are the differences between Template and Table?
A Table is used to print the multiple entries/dynamic data of an internal table. The
Table node can be used as a template to display a static record by unchecking the
checkbox internal table. Line types can be created under the Table node.
A Template is used to display the static data (single record). This node does not
have the separate header, main area & footer whereas the table node contains the
different sessions such as header, main area & footer. The template node can be
used as a table by defining it under a loop node to display the dynamic data as like
the table node.
How to find the system generated function module?
Execute the T-code ‘SMART FORMS’.
Enter the required smart form & click on the Display button.
Click on the Environment menu item.
Click on the function module name.
The system generated function module name for smart forms could be different
from system to system [R3D -> R3Q -> R3P].
Hence, capture the system generated function module name dynamically
through an Export parameter ‘FM_NAME’ = lv_name to the function module
‘SSF_FUNCTION_MODULE_NAME’.
How to find the system generated function module of the smart
form?
Execute T-code …> SMARTFORMS, Enter the Form name & click on the Display
button
Click on Environment …> Function module name.
Can you move a Smartform from one SAP system to another
without using transports?
Yes, this can be achieved using the Upload/Download feature for Smartforms.
One can download the Smartform from one system and save it as an XML file.
Once that is done, the XML file can be used to upload the Smartform in another
system.
How to upload the smart form?
Execute the T-code SMART FORMS.
Click on the utilities menu item & click on the upload form.
Enter a new form name to be created by uploading the existing downloaded smart
form.
Click on the yes button.
Select the required downloaded smart form file (xml format)
Click on open button
Enter package name & click on save icon.
Create the ‘Transport request’ number by pressing the create request icon.
Click on the yes button & click on the change button.
Make the necessary changes if required.
Click on activate icon 7 click on back icon.
What are the System Fields associated with Smart Forms?
SFSY is the system-provided structure which contains a smart form system field.
Field Description
DATA MIGRATION/CONVERSION
What are the common steps involved in Data Migration/BDC?
Common steps involved in Data Migration:-
Record the Screen Flow of the required functional T-code using the T-Code
‘SHDB’.
Convert the recorded screen Flow into a temporary program..
Upload the Flat file data from the Legacy System (Local PC /Al11) into an
Internal Table.
Convert the uploaded flat file data within the loop of the flat file internal
table(gt_flat_file).
Copy the system generated subroutines which start with BDC_DYNPRO&
BDC-FIELD from the temporary program & paste them within the loop of the
Flat file internal table.
Comment screen default values & pass the flat file data.
Use any one of either session/call transaction to update/migrate the data.
Note: An icon export is used to download the recording onto a local pc.
An icon-read form file is used to generate a program using the given recording
file.
What is LSMW?
Legacy System Migration Workbench .
It is the system-provided tool to migrate or convert the legacy system data.
The T-Code 'LSMW' is used to work with this tool.
An icon export is used to download the recording into a Local PC.
An option read from file is used to generate a program using the given recording
file.\
What are the steps for LSMW?
There are a total of 14 steps in LSMW.
Maintain object attributes
Maintain source structures
Maintain source fields
Maintain structure relations
Maintain field mapping conversion rules
Maintain fixed values, translations & user-defined routines
Specify files
Assign files
Read data
Display read data
Convert data
Display converted data
Create batch input session
Run batch input session
What are the differences between LSMW and BDC?
LSMW BDC
The data can be imported in different import The data is processed or migrated in Batch
methods such as Batch InputRecording, BAPI and IDOC. Input Method only
The Field mapping is done automatically by The Field mapping should be done manually b
the System. passing the Flat data.
The T-Code LSMW is used. The T-Code SM35 is used to develop BDC
program
Mostly used for both Huge & small amount BDC can be used for Small amount of data
(Master) of data. only.
LSMW is possible for custom screens / standards with BDC can be used for custom screens/custom
custom fields of applications. fields of application.
SHDB: It is the T-code used to record the screen flow as the T-codes.
What are the differences between Session Method and Call
Transaction Method?
The standard Function modules The ABAP statement CALL TRANSACTION ….is used.
'BDC_OPEN_GROUP’, 'BDC_INSERT'
and
'BDC_CLOSE_GROUP' is used to work
with the session method.
The data is updated in Synchronously The data is updated in both synchronous and
mode (Record by Record). Asynchronous modes.
An Error LOG File is generated by the The messages/errors are manually handled explicitly using the
system to handle the errors. structure BDCMSGCOLL & the function modules
'FORMAT_MESSAGE’ or
'WRITE_MESSAGE’ or the table T100.
Session method can process any number Call Transaction can process only one transaction at a time.
of transactions at a time.
We can schedule the session method in We can’t schedule the call transaction in
background. background.
Synchronous: In this mode, the data is not continuously updated in case of error
records. Asynchronous: It is used to update the data continuously by skipping the
error records.
Is it possible to write an ABAP code in LSMW?
Yes, by clicking on the change(pencil) icon that appears beside the recording
structure field.
What are the Function Modules associated with the BDC
Session Method?
The System provided Functional Modules are
'BDC_OPEN_GROUP ’: It is used to create the session using the T-code
SM35.
'BDC_INSERT’: It is used to insert the flat file data of the structure ‘BDCDATA’
with transactions into session.
Note: An export parameter “CTUPARMS” is used to handle the screen resolution
in case of table control to process the multiple line items in the session method.
'BDC_CLOSE_GROUP’: It is used to close the opened batch input session.
How to handle messages in Call Transaction Method?
Get the message details such as message type, message number into an internal
table (gt_bdcmsgcoll) of the type BDCMSGCOLL using an addition
“….MESSAGES INTO” with CALL TRANSACTION statement.
Set a loop into an internal table (gt_bdcmsgcoll) of the type “bdcmsgcoll”.
Use any of the function modules “FORAMT_MESSAGE”/”WRITE_MESSAGE” to
get the corresponding message text, since the structure “BDCMSGCOLL” does not
have any message text field.
Display the populated messages with message text either list or ALV.
Note:The standard table ‘T100’ can also be used to populate the message text.
What is the syntax to make use of Call Transaction?
CALL TRANSACTION '<T-CODE>' USING <gt_bdcdata> MODE <A/N/E>
UPDATE<S/A> MODE <A/N/E> UPDATE <S/A> MESSAGES INTO
<GT_BDCMSGCOLL>.
Here <T-CODE> is the required transaction code through which the flat file data
can be migrated.
<gt_bdcdata> is an internal table of type “bdcdata” structure
<A/N/E> are different data process modes
A = All screens, N = No screens, E = Error screens
<S/A> are the different update modes
Which method do you prefer to migrate the data if the method
is not mentioned?
CALL TRANSACTION.
What are the fields in the BDCMSGCOLL structure?
BDCMSGCOLL is one structure in DDIC which contains the below fields
Field Description
MSGID Message ID
Field Description
Record the Screen flow with line items using the T-Code “SHDB”.
Convert the recording into a program using the button program.
Make the changes in the original main program like,
Upload the flat file data which contains both Header & Item data.
Split the uploaded Flat file data into the Header and Item tables, using the
Control Break Statements.
Set a loop to Header internal table then process the Header related data by
copy & paste the system generated header related sub-routines from the
temporary recording program
Set a loop to Item table data to process the multiple line items.
Make the Item number as dynamic by concatenating the screen field name with
the screen number.'
Use the function code “p+” to handle page down in table control.
Use any one of the methods with BDC_INSERT(Session) or CALL
TRANSACTION to migrate the data from internal table GT_BDCDATA.
Note: TheHeader & Item data can be processed separately using the control break
statements without splitting the flat file data.
The control break statements can also be used to process Header & Item data
separately by avoiding nested loops.
What are the problems in processing batch input sessions?
How is the batch input process different from processing
online?
If the user forgets to opt for a keep session then the session will be automatically
removed from the session queue (log remains). However, if a session is processed
we may delete it manually.
If session processing fails, data will not be transferred to the SAP database table.
ENHANCEMENTS
What are Enhancements and what are the different techniques
and explain them?
Enhancements are used to add some additional customer-specific functionality to
the standard applications/programs.
Customer Exits: These are the Function Modules available in most of the functional
areas such as SD, MM, FICO etc.They are used to add the additional functionalities
in the standard applications/programs without using an access key to break them.
The access key is the unique key provided by the BASIS consultant to break the
standard applications. The application will become custom development once it is
broken.
Field Exits: These are used to change the field labels of the standard data
elements.
Function Exits: These are used to add the additional functionality to the
standard programs without breaking them. Each Function Exit contains a
custom include program which starts with Z* to implement the customer-
specific additional business logic. The Function Exit is the 3 digit no which is
called using the ABAP statement CALL CUSTOMER_FUNCTION.
Menu Exits: These are used to add the custom specific menu items &
corresponding additional functionality based on the selected menu item.
Screen Exits: These are used to add the additional screen elements & the
corresponding additional functionality to the standard screens/transaction.
T-Code SMOD: It is used to find the customer exits of the standard package.
T-code CMOD: It is used to assign an enhancement/exit to a project.
User Exits: These are the Subroutines which start with USEREXIT_*& these are
defined in the standard Include programs. They are mostly used in SD functional
areas. The Access key is required to break the standard Include programs of the
User Exits for the first time. The T-code SPRO is used to find the User Exits.
BTE (Business Transaction Events): These are the Source code plug-ins to add
an additional functionality in the standard program.
T-code BERE: It is used to find the BTE’s.
T-code FIBF: It is used to work with BTE’s.
Enhancement Framework: The enhancement framework is advanced to user exits
for adding additional functionality without breaking the standard programs. It is
used to attach/hook the source code plug-ins such as enhancement sections or
enhancement points in the standard programs.
In User-exits we write code only in the form routines(ie., in Form...End Form). When
we go to upgrade the versions, we again need to change the code in the user-exit
which we wrote in previous versions but with Enhancement Framework there is not
much code change required when we go for upgrades.
BADI: These are new enhancement techniques to add the additional customer
specific business logic to the standard programs.
What are the ways to find the Exits?
Using the T-code Package name of the applications
Using the T-code SE84
Find the package name of the required T-code.
Execute the T-code SE84.
Expand Enhancement folder
Double click on enhancements
Enter the required package name/Exit name
Click on execute icon
Using the Find function in standard programs.
Using the standard Tables MODSAP & MODACT.
What are the types of Enhancement Framework?
It is an advanced enhancement concept introduced from the version ECC6.
It is used to attach/hook the source code plug-ins such as enhancements section
or enhancement points in the standard programs.
There are 2 types of enhancement frameworks.
Implicit Enhancement Section/Point: They are provided implicitly at particular
locations by SAP. They are mostly presented at the beginning & end of the sub
routines (FORM-ENDFORM), beginning & end of the function modules, and
beginning & end of the programs.
Explicit Enhancement Section/Point: They are pre coded by SAP & provided at the
specific location in the standard programs. There are 2 types of Explicit
Enhancement.
Enhancement-Section: It is used to copy, change the existing standard source
code & add additional business logic to the standard program. The ABAP
statement ENHANCEMENT-SECTION is used to specify the Enhancement
Sections.
Enhancement-Point: It is used to add additional customer specific business
logic to the standard program.
What are the differences between Customer Exits and User
Exits?
The Customer Exit has different types such as User Exit do not have different types
function exit, menu exit, screen exit & field exit
These are available under most of the These are mostly available in SD functional
functional areas such as SD,MM,FI etc area
Access key is not required to add the Access key is required to break the standard
additional functionality program
The Customer Exits are called using The User Exit starts with
CALLCUSTOMER_Function USEREXITS(subroutines in standard include)
EXITS BADIs
They are procedural ABAP based They are Object Oriented ABAP based
It is not possible to assign an Exit to more The multiple use BADI can be implemented
than one project For multiple times
The Filter values can’t be set to the Exits The Filter values can be set for Filter
Dependent BADI’s
The T-codes SMOD & CMOD are used The T-codes SE18 & SE19 are used
What are the ways to find BADIs?
Most of the Standard BADI’s are classic BADI’s.
They are used to add the additional customer-specific functionality/business logic
to the standard programs/T-codes.
There are 4 ways to find the BADI’s
Using the standard class CL_EXITHANDLER
Execute the T-code: SE24 to maintain the global class.
Enter the standard class name CL_EXITHANDLER
Click on the display button.
Double click on the method GET_INSTANCE
Set a session breakpoint on the method
GET_CLASS_NAME_BY_INTERFACE
Execute the required functional T-code Ex: MM02
Perform the required action Ex: save material
Double click on a passing parameter (EXT_NAME) to list out the
corresponding BADI. Ex: BADI_MATERAIL_CHECK
Using the T-code SE84
Using the T-code ST05 (SQL Tracer)
Using the T-code SPRO
What are the differences between Classic (Old) BADI and
New(Kernel) BADI?
The standard method GET_INSTANCE of the The ABAP statements GET BADI & CALL
standard class CL_EXIT_HANDLER is used to call BADI are used to working with New BADI’s.
An interface of a BADI referred to create the The definition of a BADI is referred to create
Reference object the Reference object
It is not faster as like the Kernel BADI It is faster than the Classic BADI
The Fall back class can’t be defined The Fall back class can be defined
It can be a Filter Dependent BADI It is not possible to maintain the Filter values
What statements are not to be used in Exits and BADIs?
The ABAP statements COMMIT work & ROLLBACK work should not be used in
EXITS. The ABAP statements STOP & EXIT are also not advisable.
What are the Enhancement Spots?
The enhancement spots are used to manage explicit enhancement options that
means you can add your code in standard ABAP code without the need of an
access key,which implies that the standard code is not disturbed.
Enhancement spots specify the places where we can add our code in standard
SAP. Each enhancement spot element definition must be assigned to at least one
enhancement spot.
What are the steps to insert the Enhancement Spot and work?
ImplicitSpots are available in every program on some predefined spots as a begin
of FM, end of FM, begin of some event and so on. It means that you can easily
modify any program, FM, subroutine with some limitations.
If you want to see all implicit spots in a program, go toSE80 -> Edit -> Enhancement
Operations -> Show Implicit Enhancement Options.
RFC BAPI
RFC’s are used to connecting from SAP to BAPI is used to connecting from SAP to SAP
SAP only as well as SAP to NON SAP
The T-code SE37 can be used to find RFC’s The Tcode BAPI & SE37 can be used to find the BAPI
RFC doesn’t generate any methods BAPI generates the unique method in BOR to
use in the external system directly
It doesn’t have standard RFC’s to migrate the The standard BAPI which starts with BAPI can
data be used to migrate the data
What are the steps involved in creating Custom BAPI?
Create the BAPI structure (SE11) starts with ZBAPI*.
Create the BAPI function module (SE37) starts with ZBAPI* which is
Remote Enabled
All parameters are pass by value
Must contain Return parameter
Create a method & object for the BAPI remote enabled function in BOR using the
T-code ‘SW01’.
Generate, implement & release the created BAPI to the outside using the T-code -
‘SQO1’.
What are the ways to find Standard BAPIs?
There are 2 ways to find BAPI.
Using the T-code : BAPI.
Using the T-code : SE37.
BAPI BDC
BAPI’s are used to upload the data from the flat file to the SAP BDC’s are used to upload the data fro
system directly. file to the SAP system via screens
hence it is slower.
BAPI would generally be used for small data uploads. BDCs would be preferred for large
volumes of data upload since a
background processing option is
available.
BAPI never causes the program to terminate. Whenever an error Errors can be processed in SM35 for
occurs in the BAPI, it returns those errors through the Return the session method and in the batch
parameter. This parameter returns exception messages or input program for the Call Transaction
success messages to the calling program. method.
Internal tables can store multiple records. Work areas can store only one record.
Syntax: Syntax:
DATA: <ITAB> TYPE TABLE OF DATA: <WA> TYPE <DBTABLE>.
<DBTABLE>.
Example:
DATA: IT_ITAB TYPE TABLE OF MARA.
Obsolete Syntax: DATA: IT_ITAB TYPE TABLE OF MARA occurs 0 with header line.
2) Internal Table Operations in SAP ABAP?
1. Append: - It is use to add a single record from Work area to Internal table.
The record is always added at bottom.
Example:
DATA: IT_MARA TYPE TABLE OF MARA.
DATA: WA_MARA TYPE MARA.
WA_MARA-MATNR = '00001'.
WA_MARA-MTART = 'FERT'.
WA_MARA-MEINS = 'EA'.
2. INSERT: - It is used to insert or add a record from work area into internal table at
the specified location.
Syntax: INSERT <WA> INTO <ITAB> INDEX <index>.
Example:
DATA: IT_MARA TYPE TABLE OF MARA.
DATA: WA_MARA TYPE MARA.
WA_MARA-MATNR = '00001'.
WA_MARA-MTART = 'FERT'.
WA_MARA-MEINS = 'EA'.
INSERT WA_MARA INTO IT_MARA INDEX 2. "The record will be inserted into
internal table at 2nd position
Example:
READ TABLE IT_MARA INTO WA_MARA WITH KEY MATNR = '0001' BINARY
SEARCH. "Read a record into work area where MATNE is '0001'
6. READ TABLE WITH INDEX: - It is used to read a single record from an internal
table into work area specified by index no.
Syntax: READ TABLE <ITAB> INTO <WA> INDEX <index no>. " Read a record into
work area using index (position)
Example:
READ TABLE IT_MARA INTO WA_MARA INDEX '2'. "Read a record into work area
where index is 2.
7. Loop...End loop: - It is used to read data from an internal table into work
area, this is used to read multiple records serially one after one.
Syntax1: LOOP AT <ITAB> INTO <WA>.
ENDLOOP.
<VALUE>.
ENDLOOP.
<INDEX2>.
ENDLOOP.
8. MODIFY: It is used to modify a single or multiple internal table records based on
condition.
Example:
DATA: IT_MARA TYPE TABLE OF MARA.
DATA: WA_MARA TYPE MARA.
SELECT * FROM MARA INTO TABLE IT_MARA. " GET DATA INTO ITAB
IT_MARA.
SELECT * FROM MARA INTO TABLE IT_MARA. " GET DATA INTO ITAB
IT_MARA.
10. DELETE ADJACENT DUPLICATES: -It is used to delete duplicate records which are
adjacent to each-other.
Pre-requisite for this is the internal table must be sorted in ascending order
Syntax 1: DELETE ADJACENT DUPLICATED FROM <ITAB>. "ADJACENT
DUPLICATED WILL BE DELETED IN INTERNAL TABLE COMPARING ALL
FIELDS.
Example:
1. SORT IT_MARA ASCENDING.
DELETE ADJACENT DUPLICATES FROM IT_MARA. "3rd RECORD WILL BE
DELETED IN IT_MARA.
11. CLEAR: - It is used to delete the data from in a work area or in a variable.
12. REFRESH: - It is used to delete the data from in an internal table.
13. FREE: - It is used to clear (free) memory of an internal table or work area. We
all know whenever we declare an internal table or work area, 8kb memory will be
allocated.
Syntax CLEAR: CLEAR <WA>."CLEAR WORK AREA OR VARIABLE
REFRESH IT_MARA.
FREE IT_MARA.
14. APPEND LINES OF: - It is used to append multiple records to an internal table
from another internal table.
Syntax: APPEND LINES OF <ITAB1> FROM <index no> TO <index no2> TO <ITAB2>.
Example:
DATA: IT_MARA TYPE TABLE OF MARA. "FIRST INTERNAL TABLE
DATA: IT_MARA1 TYPE TABLE OF MARA. "SECOND INTERNAL TABLE
15. INSERT LINES OF: - It is used to INSERT multiple records to an internal table
from another internal table at the specified location.
Syntax: INSERT LINES OF <ITAB1> FROM <index no> TO <index no2> INTO
<ITAB2> INDEX <index no>.
Example:
DATA: IT_MARA TYPE TABLE OF MARA. "FIRST INTERNAL TABLE
DATA: IT_MARA1 TYPE TABLE OF MARA. "SECOND INTERNAL TABLE
16. MOVE: - Move keyword is used to move one internal table data to another.
Syntax: <ITAB1[]> = <ITAB2[]>. "Move ITAB1 to ITAB2
3) System Variables?
System Variables are filled by the ABAP run-time environment and can be used in an
ABAP program to query system statuses in run-time.
ENDSELECT.
EXAMPLES: -
SELECT SINGLE
matnr ersda mtart mbrsh matkl meins
FROM MARA INTO WA_MARA
WHERE matnr in s_matnr. "Read sigle or exact record from MARA table
WRITE: / wa_mara-matnr, wa_mara-ersda,
wa_mara-mtart, wa_mara-mbrsh,
wa_mara-matkl, wa_mara-meins."Print data to screen
ENDSELECT.
SELECT T1~FIELD1
T1~FIELD2
T2~FIELD1
T2~FIELD2
INTOTABLE
FROMT1INNERJOINT2ON(T1~FIELD1=T2~FIELD)
WHERET1~FIELD=.
** Here T1 and T2 are database tables, FIELD1 and FIELD2 are fields in the respective
tables
Example of using SELECT JOINS in SAP ABAP
**DATA DECLERATIONS
TYPES: BEGIN OF T_MARA,
MATNR LIKE MARA-MATNR, “FIELD1 FROM MARA TABLE
MTART TYPE MARA-MTART, “FIELD2 FROM MARA TABLE
MAKTX TYPE MAKT-MAKTX, “FIELD1 FROM MAKT TABLE
SPRAS TYPE MAKT-SPRAS, “FIELD2 FROM MAKT TABLE
END OF T_MARA.
Parent internal table must not be empty (If it is empty, where condition fails and it will
get all records from database).
Remove all duplicate entries in parent internal table.
Here is the example of using SELECT FOR ALL ENTRIES in real-time applications
5. Select distinct.
SELECT DISTINCT is a SQL Select query, which is used to get distinct values of a column
from a database table.
SELECT DISTINCT eliminates duplicates records of a column of a table.
Syntax for SELECT DISTINCT in SAP ABAP
SELECT DISTINCT <COLUMN> FROM <TABLE> INTO TABLE <ITAB> WHERE
<CONDITION>.
Example for SELECT DISTINCT in SAP ABAP
The below example is used to get distinct MTART (Material type) from MARA (Material
Master) table.
TYPES: BEGIN OF ty_mtart,
mtart TYPE mara-mtart,
END OF ty_mtart.
DATA: it_mtart TYPE TABLE OF ty_mtart,
wa_mtart TYPE ty_mtart.
START-OF-SELECTION.
SELECT DISTINCT mtart FROM mara INTO TABLE it_mtart UP TO 5 ROWS.
6. Select Appending.
SELECT APPENDING query is used to append SELECT query result directly to some
other internal table.
START-OF-SELECTION.
SELECT matnr mtart FROM mara INTO TABLE it_mara BYPASSING BUFFER.
5) Selection Screen?
1. Selection- screen Parameters.
PARAMETERS statement is used to create a single input field, check box, radio buttons
on the selection screen.
Syntax:
PARAMETERS <P_NAME> TYPE <TABLE-FIELD>. " General parameter for a
input field
2. Select-options.
Select-Options is statement which is used to define two input fields so that users can enter a
range of values, Select-Options have below additional features.
SIGN: This field contains I or E, where I stands for an inclusive (Include that value)
and E stands for exclusive (Exclude that values), default value is I.
OPTIONS: This field can accept values BT (Between), NB (Not Between), EQ
(Equal), NE (Not equal), GT (Greater than), LT (Less than).
LOW: This field stores a low value of entering the range.
HIGH: This field stores a high value of entering the range.
Select-Options design
TABLES MARA. "SPECIFY TABLE FOR WHICH YOU ARE CREATING SELECT-
OPTIONS
SELECT-OPTIONS S_MATNR FOR MARA-MATNR. "PRINT SELECT-OPTIONS ON
SCREEN
The above statement prints a select-options with intervals and extension.
TABLES MARA. "SPECIFY TABLE FOR WHICH YOU ARE CREATING SELECT-
OPTIONS
SELECT-OPTIONS S_MATNR FOR MARA-MATNR NO INTERVALS. "PRINT
SELECT-OPTIONS ON SCREEN
The above statement prints a select-options with no intervals.
TABLES MARA. "SPECIFY TABLE FOR WHICH YOU ARE CREATING SELECT-
OPTIONS
SELECT-OPTIONS S_MATNR FOR MARA-MATNR NO-EXTENSIONS. "PRINT
SELECT-OPTIONS ON SCREEN
The above statement prints a select-options without extension.
TABLES MARA. "SPECIFY TABLE FOR WHICH YOU ARE CREATING SELECT-
OPTIONS
SELECT-OPTIONS S_MATNR FOR MARA-MATNR NO-EXTENSION NO INTERVALS.
"PRINT SELECT-OPTIONS ON SCREEN
The above statement prints a select-options without intervals and without extensions.
Sometimes we may need to print drop down on selection-screen, and need to catch the
selected value for execution logic, the below example will explain how to use drop-down
in selection-screen in SAP ABAP.
To display drop down list we have to use type-group VRM as type-pools.
REPORT ZSAPN_DROP_DOWN_SS.
*--------------------------------------------------------------*
*At Selection Screen
*--------------------------------------------------------------*
AT SELECTION-SCREEN ON COLORS.
CLEAR: WA_VALUES, IT_VALUES.
REFRESH IT_VALUES.
WA_VALUES-FIELDNAME = 'COLORS'.
APPEND WA_VALUES TO IT_VALUES.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = IT_VALUES.
4. Selection Text
Selection texts are texts which are used to replace technical field names on selection-screen
with custom names.
In real-time business no business user (end user) can understand technical names, they just use
the applications for the business, whenever we print a input field on selection-screen, we get
technical field names by default.
PARAMETERS: P_MTART TYPE MARA-MTART. "material type input
The above code will generate below screen
But we need to replace P_MTART with our custom name, follow the below steps to change
technical name.
REPORT ZSAPN_RADIO_BUTTON.
START-OF-SELECTION.
IF P_RAD1 = 'X'.
WRITE:/ 'Radio Button1 is selected '.
ELSEIF P_RAD2 = 'X'.
WRITE:/ 'Radio Button2 Is selected'.
ENDIF.
6. Check Box.
Check Box: It is a selectable input box. For printing check box in SAP screen, we use below
syntax.
PARAMETERS: <CHK> AS CHECKBOX.
Whenever we select (check) a check box, the value 'X' will be stored in it.
An example program of using check box in SAP
The below is the example of using radio button in SAP, the below code prints a check box on
the selection screen. Select and Execute for testing.
REPORT ZSAPN_CHECK_BOX.
6) Modularization Techniques?
The concept of modularization is dividing the main program into sub-programs for better
readability and re-usability.
Modularization can be implemented in the following ways.
Include Programs.
Function Modules.
Sub-routines.
Classes.
MACRO`s (Use in HR ABAP only).
Include Programs:
Function Modules
These are also sub-programs which contains set of reusable statements for better
readability and re-usability.
Function modules contains parameter interface, that is importing and exporting
parameters.
These Function Modules can be executed independently.
Function modules contains exceptions to catch certain type of errors.
In our next chapters we will learn how to create and use a function module Creating Function
Modules in SAP ABAP.
Sub-routines are also sub-programs in SAP ABAP which contains certain re-usable
statements.
Most of the times we use sub-routines for re-usability inside the program.
We may use sub-routines for external re-usability.
These sub-routines contain importing and exporting parameters.
Syntax:
**DEFINING SUBROUTINE
PERFORM <SUBROUTINE NAME> USING <AV1> <AV2>
CHANGING <CHANGING1> <CHANGING2>
TABLES <TABLE1> <TABLE2>.
**IMPLEMENTING SUBROUTINE
FORM <SUBROUTINE NAME> USING <FV1> <FV2>
CHANGING <CHANGING1> <CHANGING2>
TABLES <TABLE1> <TABLE2>.
ENDFORM.
**IN THE ABOVE SYNTAX <AV1> AND <AV2> ARE ACTUAL PARAMETERS AND
<FV1> <FV2> ARE FORMAL PARAMETERS
We will learn creating and using sub-routines in next chapters Using subroutines in SAP
ABAP.
Analysis: As per business a material type can have 'n' number of materials (we have to use
internal tables), so we need to get materials from MARA for a material type input, we have to
use function module tables.
As per SAP, tables in function modules obsolete, instead using them, we can create a table type
in SE11, use it as exporting parameter.
10) Subroutines?
These are also sub programs, which contains set of re-usable statements for doing some
specific task.
These are mainly used for re-usability within the same program; however, we can re-
use these Subroutines in other programs too.
Subroutines contains importing and exporting parameters.
Function Modules V/S Subroutines
The main difference between Function Modules and Subroutines are sub-routines does not
contain any exceptions and Subroutines are mainly used for local modularization whereas
function modules contains exceptions and used for global modularization.
I. Local Subroutines.
II. External Subroutines.
Local Subroutines
These are Subroutines in which definition (perform) and implementation (from) are
available in the same program.
External Subroutines
Subroutines which contains definition and implementation are available in different
programs are called as external Subroutines. The implemented program must be of type
sub-routine pool.
Passing values with Subroutines
There are three ways to pass the values with Subroutines.
A. Pass by reference.
B. Pass by value.
C. Pass by value and return.
A. Pass by reference
In this type, the actual and formal parameters are referred to the same memory. If the
formal parameter is changed, the actual parameter is also changed.
PERFORM <PERFORM NAME> USING <A>. "A IS ACTUAL PARAMETER
FORM <PERFORM NAME> USING <F>. " F IS FORMAL PARAMETER
B. Pass by Value
In this type, the actual and formal parameters will be referring to separate memory. The
formal parameter is changed, the actual parameter will not be changed.
The key word VALUE () will identify that it is pass by value else it is pass by reference.
12) How to reuse Subroutine in SAP ABAP? Using external subroutines in SAP
ABAP?
Example program 2:
REPORT ZSAPN_SUBROTINE_REUSE2.
E.g. SE38
These breakpoints have different behaviors in different types of coding blocks ex: Function
Modules, Sub-routines etc.
SKIP.
Now go to 'Desktop 3', which is friendly to see run-time variables and data, double click on
any variable to see respected value and data in right pane.
Techniques of debugging
Now, we will learn and understand the real techniques of debugging.
Ex for F6: we have a program, we have some function modules in the program, when we click
F5 in debugging control will go into function module source code, we don`t want to go into
function module, in that case we use F6, it will not go into function module instead it will
execute it in one step.
F8 - When you press F8 in debugging, control will go to next break point if any or completes
the program execution.
4. At Selection-Screen on field
This event is used to validate a single input field on the selection-screen.
7. At Selection-Screen
This event is used to validate multiple input fields
8. Start-of-Selection
This is default event which is used to write actual business logic.
Also indicate the starting point of a program.
9. End-of-Selection
It is used to indicate the start of selection has been ended.
It is mainly used with logical database. (HR-ABAP)
Syntax: END-OF-SELECTION. "Start of selection is ended
10. Top-of-Page
This event prints constant heading for all pages.
11. End-of-Page
This event prints constant footer for all pages.
Before using this event, we need to reserve some lines for displaying footer.
Implementation (code)
(https://www.sapnuts.com/courses/core-abap/classical-reports/selection-screen-event.html)
22) Controlling Keywords: - It is used to control the default flow of a program execution.
Branching: - {IF-ELSE, ELSEIF-ENDIF}; {CASE-WHEN-ENDCASE}
Looping: - Condition{DO-ENDDO}
Un-Condition{ WHILE-ENDWHILE}
28) Form: -- SAP Smart Forms is used to create and maintain forms for mass printing in SAP
Systems. As output medium SAP Smart Forms support a printer, a fax, e-mail, or the
Internet (by using the generated XML output).
(https://www.guru99.com/smart
forms.html#:~:text=SAP%20Smart%20Forms%20is%20used,the%20limitations%20in%
20SAP%20Scripts.)
29) Attributes: -- Attributes are internal data objects of any ABAP data type within a class.
The content of the attributes specifies the state of the object. Reference variables can also
be defined, which can then be used to create and address objects. This allows objects to be
accessed within classes.
Attributes contain data. They define the state of an object (an instance of a class).
(https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-
US/abenclass_attributes.htm#:~:text=Attributes%20are%20internal%20data%20objects,t
o%20be%20accessed%20within%20classes.)
30) Documentation: -- ABAP Keyword Documentation - ABAP Keyword Documentation.
This documentation describes the syntax and meaning of the keywords of
the ABAP language and its object-oriented part ABAP Objects. Alongside this, language
frameworks and the associated system classes are also described.
31) Text element: -- Use this tool to create, maintain, and translate text elements for your
programs. Any text that a program sends to the screen can be stored as a text element in a
text pool. Text elements are: List and column headers that appear in ABAP lists.
(http://www.saptechnical.com/Tutorials/ABAP/Text/SE32.htm)
Kartik Material::
Module Pool
cl_gui_alv_grid, CL_GUI_CUSTOM_CONTAINER,fm se54 for tmg regenrate
- PROCESS ON HELP-REQUEST(POH)
- PROCESS ON VALUE-REQUEST(POV)
- Like field catalog display
- Chain end chain: - group of field validation (we can validate multiple value on screen.)
If any value change at a time that that code will call
- The additions ON CHAIN-INPUT and ON CHAIN-REQUEST work like the additions
ON INPUT and ON REQUEST that you use for individual fields.
- ON CHAIN-INPUT :
- ON CHAIN-REQUEST: PAI for single field validation
- Table control: - show the create manually/ using wizard
- Table control with wizard is the control provided by SAP, in which the users are not
needed to code separately for table control operations. It generates automatically system
generated code for the following table control operations
Smart form
Call FM: - 'SSF_FUNCTION_MODULE_NAME' – driver program
PERFORM %GLOBAL_INIT.
3. Final window. - 1
This is also a special type of secondary window for the details that has to be
processed only at the end of the form processing.
4. Copies window. - 1
This is a special type of secondary window for making pages as copy or original.
1. it will not handle the large amount of data even though it handles it is not advisable to
process large amount of data with LSMW due to performance reason.
Batch Data Communication is technique which we use to create a recording to upload large
amount of data into the SAP System. (Master data and Transactional data we can create.)
T-code for recording method
- SHDB
Three methods: -
1. Call transaction.
2. Session method.
3. Direct input method.
1. BDC_OPENGROUP.
- This Function module is used to create a session with the below parameter.
- Client no, username, group name, keep, hold date.
2. BDC_INSERT.
- This function module is used to transfer data from BDC Data structure into the session.
3. BDC_CLOSEGROUP.
- Once the session is created we need to close the session by BDC_CLOSEGROUP.
Update: -
1. Asynchronous update: - It immediately starts to process the next record without
waiting for the update to be finished.
2. Synchronous update: - Once the update is finished then it continues to process the
next record.
T-Code for display batch input sessions?
- SM35
CALL TRANSACTION METHOD SESSION METHOD
Asynchronous processing, Synchronous processing
No logs will be created Logs will be created
Not suitable for bulk data We can upload the buck data
We need to hander error manually
Fast processing.
Session we cannot run parallel
USING <itab>
MODE <mode>
Update: S , A, L
- It is a structure which holds the information related to each screen i.e. program name,
Dyn pro- screen no, Dyn pro screen begin, field name, field values, information of
that particular screen to be transferred into the SAP
- DATA: BDCDATA TYPE TABLE OF BDCDATA.
-
- DATA: ITAB TYPE TABLE OF BDCMSGCOLL.
-
- DATA: PROGRAM LIKE SY-REPID,
- WA_BDCDATA TYPE BDCDATA.
-
- WA_BDCDATA-PROGRAM = 'SAPMS38M'.
- WA_BDCDATA-DYNPRO = '0100'.
- WA_BDCDATA-DYNBEGIN = 'X'.
- APPEND WA_BDCDATA TO BDCDATA.
- CLEAR WA_BDCDATA.
- WA_BDCDATA-FNAM = 'RS38M-PROGRAMM'.
- WA_BDCDATA-FVAL = PROGRAM.
- APPEND WA_BDCDATA TO BDCDATA.
- ...
- "Here you use BDCDATA
- CALL TRANSACTION 'SE38' USING BDCDATA MODE 'N'
- MESSAGES INTO ITAB.
T code , D name dnumber
BDCMSGCALL: -
BAPI BDC
Bapi is faster compare to BDC BDC is slower compare to Bapi.
Bapi is used for particular transaction like BDC can be used for any transaction which
delivery sales order have screen and fields.
Bapi has directly update the database. BDC run through the screen flow.
If in case add new field in BAPI at a time If in case add new field in BDC at a time
only that field is not update in database. BDC was failed.
exporting
I_QSYSTEMNAME =
tables
E_T_MSG =
UPDATE BAPI: If transection is already available in database and update bapi is called
at a time it will update data and save transection and commit operation is their and if
transection is failed at a time all transection is rollback and delete all the entries in table
which is updated during this bapi.
It can be used for data migration and for communication between sap to sap and sap to non-
sap system.
- Bapi is function Module defined under in BOR (Business object repository).
- T-code for BOR is SWO1.
- Import: - Import data in Fm.
- Export: - To execute all logic in FM and export data in export parameter.
- Changing: - Work like import and export it’s in the form of internal table and work area.
- Returning: - Work like import and export it’s in the form of internal table and work
area.
- Table: - Like internal table
- Exception: - Incase exception is coming.
Steps for creating custom Bapi.
1. Create remote enabled function module with importing and exporting parameter.
2. Create BOR (Business object repository) In SWO1.
3. Insert RFC Function module into business object.
4. Release Business Object.
RFC BAPI
RFC is used to connecting from sap to Non- BAPI is used to connecting from sap to sap and
sap only. (sap to non-sap/IF it radio button as RFC is
marked).
RFC does not generate any method Bapi generate unique method in BOR to use in
the external system directly
It doesn’t have standard RFCS to migrate the The standard bapi is start with bapi can be used
data to migrate the data.
Enhancement
Enhancement:
SAP Enhancements are used to expand the standard functionality within SAP.
Enhancements use function modules and are called from the standard SAP code.
Enhancement T-code:
SMOD: is used to find out suitable Exit
CMOD: is used to implement the Exit
Framework of Enhancement/ Enhancement technique
1 Implicit enhancement: - (SAP is providing a particular space where we have written
code in standard)
- Implicit enhancement points are basically points within ABAP code where
an enhancement point is implied, and in which case can be created.
- Examples of implicit enhancement points are at the beginning and end of FORM's, at
the end of a program, include or function module etc.
Predefine points for Implicit enhancement
- Start and end ma
2. Explicit enhancement: - (Where we have to create enhancement spot & place &
point)
An explicit enhancement option is part of the ABAP program. It is assigned to the package of
the program and not to the package of the enhancement spot to which it belongs.
Types of enhancement: -
1. User exit
2. Customer Exit
1. User Exit: -
- User exit is implemented in form of subroutine.
- Access key is required for User Exit implementation.
- User Exit is used for only SD.
- Read and change all the global data.
2. Customer Exit: -
- Customer exit is implemented in form of function module.
- Access key is not required for customer exit implementation.
- Customer Exit is used for all modules.
Types of customer exit.
1. Menu Exit: -
- Adding items to the pulldown menus in standard R/3 applications.
2. Screen Exit: -
- Add some fields and sub screen in sap standard.
- Adding fields to the screens within R/3 applications. SAP creates screen exits by
placing special sub screen areas within a standard R/3 screen and calling a customer
sub screen from within the standard dynpro's flow logic.
4. Keyword exits –
- Add documentation to the data elements of key words defined in the ABAP/4
Dictionary. The system displays this documentation whenever a user presses F1 to get
online help for a screen field.
- Insert, continue…
What is Enhancement Point?
- In enhancement point call standard and custom code.
What is Enhancement Section?
- Call only Custom code.
- Enhancement Point and section are used during explicit Enhancement.
What is Enhancement Spot?
- Enhancement spot is specifying the places where we can add our code in standard sap.
LIKE:internal table
LIKE LINE OF : work area no refrence aapi ne 2nd work area create kari
sakia.
Type box:
SAP Memory: - It is used to access the data from one session to another session
through
The ABAP statements SET PARAMETER ID and GET PARAMETER ID are used to
work
with the SAP memory.
SET PARAMETER ID: - It is used to pass the field value from an application program
into the
specified SAP Memory ID or Parameter ID.
GET PARAMETER ID: - it is used to get the data from the specified memory ID or
Parameter ID into the field of an application program.
The Parameter IDs are maintained at Data Element level under Further
Characteristics.
ABAP memory: - It is used to access the data across internal sessions. The ABAP
statements
IMPORT & EXPORT are used to work with the ABAP Memory.
The IMPORT statement is used to import the data from the specified memory ID into
a data variable.
The EXPORT statement is used to export the data into the specified memory ID from
the program.
BOPF (Business object processing framework)
BOPF: -
- BOPF is an ABAP Object Oriented -based framework that provides a set of generic
services and functionality.
Framework: -
- It is functionality created for using its methods and feature to create your own custom
application.
Advantages of BOPF.
- FPM (floor plan manager)
- Reusability
- Less implementation
Vandhan Material:
DATA DICTIONARY:-
1). What is foreign key in abap dictionary?
Foreign key is a concept that is used to define relations between tables in ABAP dictionary.
A relationship which can be defined between tables must be explicitly defined at field level. foreign
keys are used to ensure consistency of data.
Data entered should be checked against existing data to ensure that there is no contradiction. While
defining foreign keys cardinalities has to be specified.
Cardinality mentions how many dependent records or how referenced records are possible.
A compound foreign key is a foreign key composed of two or more fields. In other words, A check is
done to compare two fields in the foreign key table against two
fields in the check table. The combination of values must exist in the check table before they can be
inserted into the foreign key table. however only one field
Delivery class defines that what kind of data that are going to be stored in the database. As in
example: - System data, Transaction data, Master data.
<1>. Display/Maintenance Allowed. (User can display and maintain the data.)
<2>. Display/Maintenance allowed with restrictions. (Some of the users can display and
maintain the data.)
It defines the exact physical area at which the data is going to be stored in the database.
It specifies the number of records that can be stored in a database table. Size category will be
incremented dynamically based on increase in records.
The buffering type defines which table records are loaded into the buffer of the application server
when a table record is accessed. There are the following buffering types:
Full buffering: All the records of the table are loaded into the buffer when one record of the table is
accessed.
Generic buffering: When a record of the table is accessed, all the records having this record in the
generic key fields (part of the table key that is left-justified, identified by specifying a number of key
fields) are loaded into the buffer.
Single-record buffering: Only the records of a table that are really accessed are loaded into the
buffer.
Domain in an object that is used to specify the technical information of the field. As in example- data
type, visible length, decimal places, fix values,
Lock object: - Lock object feature is used to synchronize access to the same data by one or more
program. Lock objects are used for avoiding inconsistences when the data is inserted or changed.
Lock Mechanism: - A program can communicate with other programs about data records that is
reading or getting changed. cds
A program can prevent itself from reading data that has been just changed by another program.
Whenever we are creating a new table or adding a field to existing table, we need to specify field
labels, headings and data types for the field.
In SAP ABAP for maintaining this information we are creating data elements and domains.
10). What are the three types of database tables available in SAP, Differentiate between three
tables.
Contain a single table used to They are used to hold a large They are used to hold data
store master data. number of very small tables from a few numbers of large
(stores customizing data or tables (stores system data ).
system data)
It has one to one relationship It has many to one relationship It has many to one relationship
with a table in the database. with a table in the database. with a table in the database.
For each transparent table It is stored with other pooled Many cluster tables are stored
there is one associated table tables in a single table called in a single table in the
in the database. table pool in the database. database called table cluster.
The database table has the The database table has a The database table has
same name, same number of different name, different different name, different
fields and the fields have number of fields and the fields number of fields and fields
same names. have different names. have different names.
There is only a single table. Table pools contains more Table clusters contains less
tables than table clusters. tables than table pool.
Single table can have one or Primary key of each table Primary key of each table
more primary key. does not begin with same field begins with same field or
or fields. fields.
They can be accessed using They can be accessed using They can be accessed using
open and native SQL. open SQL only. open SQL only.
USE: - They are used to hold USE: - They reduce the USE: - They would be used
master data. E.G. Table amount of database resources when the tables in primary key
vendors or table of needed when many small in common and data in these
customers. Example of tables have to be opened at tables are all accesses
transaction data is orders the same time. simultaneously.
placed by customers
The structure is a list of fields that are defined under a name. Which are used to process data at run-
time in SAP ABAP.
Structures are of two types. One is global structure and another is local structure. Local structures can
be created in ABAP programs and global structures can be created in DATA-DICTIONARY and that can
be reusable in different objects.
Table and structures have lots of differences in the sense of behaviour and properties. The below are
the main differences between tables and structures.
Tables Structures
Tables will store data physically and Structures cannot store data physically. Data
permanently. can be hold into structures at run-time only.
Tables have primary keys. Structures does not have primary keys.
Tables have technical settings, (Data class, Structures does not have technical attributes
Delivery class, Size category, Etc.), Maintenance and maintenance attributes.
attributes (Display maintenance restrictions ).
Tables have primary and secondary Indexes. Structures does not have primary and
secondary indexes.
It is a table which contains all valid entries of a field. Check table is the dependent table to which the
relationship is defined using the foreign keys. The contents of the check table field are shown in the
input help for the referenced field.
For example: - Check the employee master table and employee transaction table. Whenever an
employee transacts you need to check whether the employee exists. So, for that you can refer to the
employee master table. This is nothing but Parent child relationship. Here data is maintained at client
level. No development involved. As per DBMS what we call foreign key table, is called as check table.
Value table is the table attached to a field at the domain level, Where the entry to the field can be
only from the value table. They are not used in the input help. The value table is the default check
table.
This is maintained at domain level. Whenever you are creating a domain. You can enter allowed values
in the value range. For example, check the domain SHKZG – Debit/ Credit Indicator. Here Only allowed
values are H and S. Whenever you will be using this domain then the system will force you to enter
one of these allowed values. This can be defined as value table.
Reporting:-
15). What are internal tables and work areas? Differentiate between internal table and work area.
Internal tables and work areas are temporary memory locations which are used to store data of
database tables at runtime and in other way we can call them as instances of database tables.
<2>. E: - Error Message (Depending on the program context, an error dialog appears or the program
terminates.)
<3>. S: - Status Message (The program continues normally after the MESSAGE statement, and the
message is displayed in the status bar of the next screen.)
<4>. W: - Warning Message (Depending on the program context, an error dialog appears or the
program terminates.
<5>. A: - Termination Message (The message appears in a dialog box, and the program terminates.
When the user has confirmed the message, control returns to the next-highest area menu.)
<6>. X: - Exit Message (No message is displayed, and the program terminates with a short dump.
Program terminations with a short dump normally only occur when a runtime error occurs. Message
type X allows you to force a program termination. The short dump contains the message ID.)
17). What are the different types of internal tables in SAP ABAP? Differentiate between the
internal table’s types in SAP ABAP.
There are three different types of internal tables in SAP ABAP programming which are given as
below.
<1>. Standard Internal Tables
(1) These are default internal These are special type of internal These are used with logical
tables. tables, where data is already database. I.E. with all fields
(automatically) sorted as you and all records.
insert the record.
(2) To read a record we use To read a record we use either Here the index operation is
either key or index operation. key or index operation. not allowed. We can only use
key operation.
(3) To search for a record, we To search for a record, we use To search for record, we use
can use either linear search binary search as data is already hashed algorithm.
or binary search. sorted.
(5) We can use insert or append We can only use insert. Not These are mainly used in
to add records. append. ABAP with BI projects.
18). Explain SELECT FOR ALL ENTRIES in SAP ABAP. What are the advantages of select for all entries
in SAP ABAP programming?
SELECT FOR ALL ENTRIES is the best alternative for SELECT WITH JOINS, this statement is very helpful
for reading data from more than two tables. The load on the database will be very less.
Parent Internal table must not be empty. (If parent internal table is empty, where condition
fails and it will get all records from database.)
Remove all duplicate entries in Parent Internal Table.
SELECT WITH JOINS statement is used to read data simultaneously from multiple database tables. As
per performance standards, SELECT with joins from more than 3 tables is not advisable. As It puts a
heavy load on the database.
Syntax: -
SELECT A~MATNR
A~ERNAM
A~PSTAT
B~MATNR
B~SPRAS
ON A~MATNR = B~MATNR
20). SELECT SINGLE and SELECT UPTO 1 ROWS, what is the difference between SELECT SINGLE and
SELECT UPTO 1 ROWS in SAP ABAP?
These statements are part of reading data from database tables. By using SELECT SINGLE and SELECT
UPTO 1 ROWS. We are able to read single record from a database table.
(2) To read an exact record from database We can read appropriate record from
table we need to provide all key fields. database table; we may not need to provide
all key fields.
(3) This statement should be used only if all This statement should be used only if we
the key fields are available. have some key fields or no key fields.
Select into corresponding fields is used to read data from database tables without even specifying the
list of fields.
As per SAP standards SELECT INTO CORRESPONDING is not advisable as it affects the performance of
an application because it has to compare each field with database table’s fields which results in
consuming more time.
SELECT DISTINCT is used to get distinct (unique) values of a particular column in SAP ABAP. SELECT
DISTINCT eliminates duplicate records of a column of a table.
Syntax: - SELECT DISTINCT <COLUMN> FROM <TABLE> INTO TABLE <ITAB> WHERE <CONDITION>.
Whenever we use open SQL statements to get or fetch data in SAP, it will get data from buffer area
(depends on table buffer settings) for better performance, but in real world scenarios some tables
may updated frequently (In milliseconds). We may need to bypass buffer to get real-time data, in that
case we will bypass buffer using ‘BYPASSING BUFFER’ Keyword.
SELECT APPENDING query is used to append select query directly to some internal table. Select for
SELECT APPENDING is given as below. Where condition is optional in select query.
Syntax: - SELECT MATNR MTART FROM MARA APPENDING TABLE IT_MARA UP TO 10 ROWS
In our day to day programming implementations, we may need to use exit, continue, stop and return
statements
<1>. EXIT: - The behaviour of EXIT keyword depends on where you use it.
If you use EXIT inside IF…. ENDIF., It will come out of the program.
If you use EXIT inside LOOP …. ENDLOOP., It will come out of the loop.
If you use EXIT inside FORM …. ENDFORM., It will come out of FORM (Subroutine).
<2>. STOP: - STOP is a statement which is used to stop processing an event block, Example:- If I have
two events START-OF-SELECTION and END-OF-SELECTION in my program, And if I use STOP Keyword
in START-OF-SELECTION, The keyword will exit start of selection and goes to END OF SELECTION.
<3>. CONTINUE: - CONTINUE is a statement which is used to skip the execution of a record inside the
loop… end loop, do…. End do, while... End while etc and executes the next record. This keyword will
only be used in loops.
<4>. RETURN: - RETURN is a statement which is used to stop processing of current block immediately.
Global class: - Global class is an ABAP object which can be accessible via SAP class builder,
T-code for SAP class builder is SE24.
Local Class: - Local classes are classes which are available in ABAP programs, we can access
them via ABAP editor SE38.
26). What is class? A class is a user defined data type with attributes, methods, events, user-defined
types, Interfaces etc for particular entity or business application.
Objects: - Objects are nothing but instances of classes, each object has a unique identity that is
memory and its own attributes.
Events: - Event is a mechanism through which one method of a class can raise method of other class,
without hazard of instantiating that class.
Interface: - Interfaces are similar to classes which contains methods without any implementation.
28). What is constructor method in SAP classes? Explain the use of constructor method in
OOABAP.
Constructor: - This method can have only importing parameters. There will not be any exporting
parameters. The name of constructor method must be Constructor only.
Class Constructor: - It is a type of constructor, this method will be executed automatically whenever
the first call to the class is made, the first call may be through instance or through class. These class
constructors are mainly used to set default values globally I.e. Irrespective of instances, this method
will not have any importing or exporting parameters. These methods will be executed only once.
It is a concept by which the same method names will behave differently in different classes I.E. each
method will have its own implementation in different classes but with the same name.
Interfaces are independent structure which are used in a class to extend functionality of a
class.
Interfaces contains methods without implementation. Whereas a class contains methods with
implementation.
We need to define an interface with the required methods name in SE24 T-code.
The interfaces can be used by no of classes to extend the functionality of a class.
To implement an interface in a class just define interface name under the interfaces tab.
All the interfaces methods will be automatically copied to the classes in a particular class
without effecting to the other class.
The main use of interfaces is re-usability and maintain standard project framework.
Inheritance is the concept of passing the behaviour of one class to another class.
You can use an existing class to derive a new class.
Derived class inherits the data and methods of a super class.
However, they can overwrite the existing methods also add new code.
This means we can add additional features to an existing class without modifying it.
Super is the keyword that is used to represent the super class in oops, you can access the
methods and attributes of the super class using the word super.
Redefinition is the keyword which is used to overwrite the parent class methods with new
definition.
Note: - In object-oriented ABAP we have only single inheritance. There is no multiple inheritance.
Super class is a main class by using this we can derive a new class which will be called
as Child class.
Final class is a class which cannot be used in inheritance. It is a class property
(checkbox under properties of class).
Narrowing Cast: - Assigning/Copying the instance of sub class to super class instance is called
Narrowing Cast.
Widening Cast: - Assigning/Copying the instance of super class to sub class instance is called
as Widening Cast.
Business Application Programming Interface (BAPI):-
32). What is BAPI and business objects in SAP ABAP?
BAPI stands for Business Application programming Interface (B + API). BAPI’s are methods (Function
modules) defined in business object repository (BOR).
Business Object: - Business object is similar to class, which is group of attributes, methods, events,
interfaces, key fields for particular business application scenario.
Business object repository is a repository or container of business objects, T-code for BOR (Business
Object Repository) is SWO1.
BAPI is a remote enabled function module, which is used to communicate between SAP to SAP, SAP
to NON-SAP systems. BAPI RFC function module will be inserted into business objects, it will convert
into BAPI.
Uses of BAPI: -
Generating reports.
For communication between SAP to SAP and SAP to NON-SAP systems.
BAPI’s can be used for data migration.
# BAPI RFC
1 Used for communication between SAP to SAP Used For communication between SAP to
and Sap to NON-SAP. SAP and SAP to NON-SAP.
2 BAPI is a part of business objects. It can RFC is a standalone function module; it
communicate with other BAPIs. cannot communicate with other RFC.
3 BAPI uses object-oriented concepts. RFC uses procedure-oriented concepts.
As we know BAPI is a remote enabled function module but when we are creating BAPI, we need to
follow some rules given as below.
Rules (As per SAP) for creating a BAPI.
Every BAPI must start with BAPI or ZBAPI (Custom BAPI).
All importing and exporting parameters must be of type structures (Not direct type entries).
All importing and exporting parameters must start with BAPI or ZBAPI.
All importing and exporting parameters must pass by value, as pass by reference is not
supported for remote communications.
BAPI must have return parameters (For returning messages like success, error, warning etc.)
of type BAPIRET2 or RETURN.
Web Service Development:-
Steps for creating web service are defined as below.
<1> Create a function module in se37 as per the requirements. Then make It remote enabled by
checking the radio button of it.
When you’re creating a remote enabled function module then pass by reference parameters are not
allowed with that. You need to make parameters pass by value. Then only the function module will be
saved and activated.
After Wizard opens. Define the web service definition name, give it a description, Give it a package
name and TR name.
In Configuration service make profile with ‘Authentication with user and password, No transport
guarantee.
After finishing the process of wizard for creating web service. Go to Transaction SOAMANAGER.
Your selected record will appear there. Double click into it and Choose option Create Service.
Give service name, Service description text and new binding name.
In a request tab select BASIC from the AUTHENTICATION DROPDOWN and give the credentials over
there.
Input the parameter and based on that you will get the output in Response tab.
Enhancement Framework:-
There are two types of source code enhancements are possible.
1. Implicit Enhancement Option.
Implicit enhancements are predefined enhancements that are provided by SAP
developers.
2. Explicit Enhancements Option.
Explicit enhancements can be created by customers or by partners.
Note: - There are two types of explicit enhancements options are available. For this we have now
two new abap statements.
Enhancement section is used to replace the set of code or statements with the customer (customer
code), In this technique the original source code doe not get executed but the customer
implementation (customer code) get executed.
Note: - Explicit enhancements though can be implemented anywhere in source code but note just
anywhere except some areas where SAP would allow. (program allows).
Ans: - SAP Net Weaver gateway provides an easier way for the consumption on business logic and
content for SAP Back-end system on web application. It also reduces the complexity to access SAP
data and provides easy interfaces to decrease development time.
In simple words NetWeaver Gateway is a set of ABAP add-ons to your existing SAP ERP system that
provides easy access to your business information in a simple, People centric manner and lowers the
data consumption barrier to the point that no prior knowledge of an SAP system’s internal working is
required. The gateway provides an API that is designed to function as easy to use, Well defined that
gives access to the rich wealth of your business data and functionality in your SAP system.
REST stands for Representational State Transfer. SOAP can’t use REST because It’s a protocol and
REST can use SOAP Web Service because it is a concept, it is an architecture style and can use any
protocol like HTTP, SOAP.
SOAP
No. SOAP REST
3) SOAP can't use REST because it REST can use SOAP web services
is a protocol. because it is a concept and can use any
protocol like HTTP, SOAP.
5) JAX-WS is the java API for SOAP JAX-RS is the java API for RESTful web
web services. services.
9) SOAP permits XML data format REST permits different data format
only. such as Plain text, HTML, XML, JSON
etc.
10) SOAP is less preferred than REST more preferred than SOAP.
REST.
OData is an Open Data Protocol. It is an Open web Protocol started by Microsoft to expose data using
existing web technologies. This is based on Representational State Transfer (REST) full architecture.
HTTP, Atom Pub (Similar to RSS, but specifically introduced special XML format for ODATA), JSON all are
supported.
This protocol enables the clients to publish and manipulates the resources identified by URIs and
defined in Data model using HTTP messages. Server hosts the data and clients can call this service to
retrieve the resources and manipulate them. Servers exposes one or more endpoints which are services
that refers to the resources. Clients need to know the server-side endpoints to call this service to query
or manipulate the data. The protocol is HTTP based and it designed with RESTful mindset which means
it follows the constraints to be called as RESTful services.
Since the protocol is HTTP based, any programming language with HTTP stack can be used to consume
OData services. Existing client-side libraries can be used to transform the JSON or ATOM Payloads from
the server into objects making programming simple. On the other hand, many libraries exist on the
server side to generate the payloads in ATOM or JSON from the existing data.
It is important to note that both client side and server-side development can be in completely different
programming languages till the time both are able to communicate via HTTP.
Clients consume the services to query and manipulate the data from OData services and are also called
as Consumers of OData services. Similarly, Server expose the OData services via endpoints are known
as procedures of OData Services.
OData is Open Data Protocol. The protocol is a set of rules which every payer has to follow. To Put is
straight OData interface is an Open Standard that can be consumed by any application, program,
software or device of the Non-SAP that can connect SAP using the HTTP(s) Protocol and can manipulate
(Read, Write, Modify, Understand, i.e. parse and construct) an XML document. Since the protocol is
HTTP based. Any programming language can be used for consuming OData services.
ADVANTAGES: -
1. OData is based on the rest architecture. So, we can retrieve data based on an URL.
2. It also supports HTTP. Atom Pub as well as JSON format.
3. It has support for any type of data source. Even you can use a custom class to use a data source.
4. No need to create a proxy service object. So, it is lightweight to use.
5. You can create your own custom methods and expose it.
6. Since it is a lightweight the interaction between server and client is fast. Thus, Performance is
good.
7. It offers full CRUD support by using the different HTTP methods.
GET: - Gets one or many entries.
(“GET is the HTTP method for all external consumer applications which calls
the URI of OData services.”)
POST: - Creates a new entry.
PUT: - Updates an existing entry.
DELETE: - Remove an entry.
8. A WCF (Windows Communication Foundation) Data service can expose an entity model via URI
(Uniform Resource Identifier).
9. A WCF Data service could be consumed by any type of client like Windows, Silver light, Web, AJAX
and console.
10. The OData interface is implemented using XML and JSON format. Both of these formats are well
known, Plain text protocols for the transmission of the information over the web.
11. OData message is self-describing. So, any non-SAP Web developer can understand the content of
OData message without having knowledge of ABAP or how Sap works.
12. With the advent of OData, the communication barrier between SAP and non-SAP web developers
is removed. It is an Open Book now. There is no cost or license agreement needed for the use of
OData.
NOTE: - Many organizations have now started exposing data exposing data using REST based service
however, it is very difficult to write application which works with multiple data sources as each
provider will expose the data in a slightly different way. OData service provider can expose its services
along with metadata which contains the semantics for consumption. OData exploits the common
formats like XML ATOM and JSON for communication which are commonly understood. Clients can
now understand the OData services using generic tools and can combine information from multiple
data sources.
Whenever you find a question mark “?”, You should understand, it is the beginning if a query option.
Disadvantages: -
1. Since It is purely URL (Uniform Resource Locator) Based. It is less secure.
2. As per the observations, not every query in LINQ (language Integrated Query) is available in OData
like filter, skip, take etc.
The Project OData service gets created with four subfolders. Data Model, Service
Implementation Runtime Artifacts, Service Maintenance. Data model further has
three folders which are entity types, entity sets and association.
Entity type is our very own structure same as work area in se38 custom program. (Just
one row which means it can hold only single data) Entity set is the same as internal
tables (Which can handle more data).
1. Define view: - It’s a simple view work with only one table.
2. Define view with joins: - This view is used to join more than 2 tables using joins.
3. Define view with association: - This view is used to join more than 2 tables using association.
4. Define view with parameters: - In SE11 view can only have hard-coded selections, By this
we can make selection dynamic.
5. Extend view: - This view is used to extend the standard view.
6. Define table functions with parameters: - By using this we can call AMDP methods in view.
CDS views are like open SQL, they are database independent and run on any sap-supported
database system.
In SE11 view field calculation is not possible where as in CDS views we can have calculated
fields. (e.g. Adding two fields at runtime.)
CDS views support inner join, Outer join, right outer join, full join, Cross join.
CDS views support automatic client handling.
CDS views support open SQL and we can call them in the same way we call the SE11 view in
the application layer.
WHERE, GROUP BY, HAVING, UNION clauses are supported in CDS views.
Aggregation and Numeric functions are supported in CDS views.
We can achieve OData services directly from CDS views.
CDS views are based on single service logic they return only one result set in an output. Whereas
AMDP classes can get the results of multiple entities together by a single service call.
CDS view can be created to read and process the data at database layer. Whereas AMDP class can be
used for processing and modifying the data at database layer.
CDS view supports open SQL statements. Whereas AMDP class supports native SQL statements.
When there are two or multiple entity sets in the ODATA services and the user wants to fire only one
service call which then creates or pursues data of multiple entity sets together then it can be defined
as deep insert.
System alias can be defined as the result of an inbound request that is created or called on SAP
Gateway.
8). What is $expend?
$Expend can be used to get the data sources from multiple entity sets using only one single service
call instead of using two service calls then $expand can be used.
Join can be used when the user wants to get the data from two or more tables then join statements
can be used. Association is a lazy join. In other words, association can also be defined as join but on
demand.
Association does not do actual join until and unless someone triggers in. Association defines the
proper relationship between the data sources and not just joins the data sources as in joins.
Association keeps the relation between the data sources visible and not concealed as in joins.
11). What is the T-Code for checking the error log in OData services?
/IWFND/ERROR_LOG T code can be used to check the errors regarding OData services.
AMDP doesn’t support the parameter type RETURNING. You can only pass importing, exporting and
changing parameters into the AMDP class.
In AMDP class the parameters must be passed by value as pass by reference parameters are not
allowed.
Only structures, variables, and normal internal tables can be passed using AMDP classes. Complex
tales like nested tables as tables in tables cannot be passed.
In ABAP Dictionary if the structure is defined as method typing, then it cannot be implemented in
AMDP class methods.
Whatever in se11 views, structures, tables, variables can be implemented in AMDP class using
keyword USING. If the method is implemented using the keyword.
13). What are the differences between user exit and customer exit?
4. You need an access key for user exit. You need an access key for customer exit.
5. Changes are lost in case of upgrade. Customer exits came later and they
overcome the shortcomings of User exit.
6. User Exit will be activated automatically To activate a function module exit, you need
whenever we are activating the program. to create a project in CMOD transaction.
7. User exits are developed by the SAP only Whereas Customer exits are developed for
for SD module. SD, MM, PP, FI almost all modules.
Batch requests allow grouping multiple operations into a single HTTP Request Payload. Batch requests
are submitted in single HTTP POST request to the $batch endpoint of a service as described in [OData-
URI.]
We have to associate the parent entity with child entity and we have to define the relationship with
the key field.
Ans: - First URI will get you the item data only from the Item Data source while Second URI will get
you the Item data and it also displays the header data on which Items are dependent. In short, the
$expend query option is expanding the Header information with the help of the navigation
property and showing the dependent entity type.
CDS (Core Data Services) in brief:-
Why was CDS introduced?
With CDS, Data models are defined and consumed on the database rather than on server.
CDS also offers capabilities beyond the traditional data modelling tools, including support for
conceptual modelling and relationship definitions, built in functions, and extensions.
Originally, CDS was available only in the design time and run time environment of SAP
HANA. Now, CDS concept is also fully implemented in SAP NetWeaver AS ABAP, enabling
developers to work in ABAP layer with ABAP development tools while the code execution is
pushed down to the database.
DDL SQL View: It is read only classical database view which is read only in ABAP dictionary (SE11).
Note: - We don’t need to delete both CDS views and Dictionary DDL SQL individually for deleting CDS
views. We will not be able to delete DDL SQL view but we can delete CDS view entity. When the CDS
view entity is deleted then DDL SQL view will also be deleted.
Problems: -
In CDS views multiple parameters can be separated by comma ‘,’. We can have multiple parameters
in the WHERE clause separated by AND/OR. Also note that “$” sign needs to be provided with
parameters while using it in where clause.
(data display with parameters are not yet supported in ABAP dictionary).
1. System, and (system access taken care by SAP. We don’t need to bother much about this)
2. Object (Authorization Objects or access.
GRANT: -Used for providing any user access privileges or the other privileges for the database
operations
Role:- Special permission created by system admin for accessing (Display/Change/Create) any
particular T-Code for abap object. These shall be maintained in T-code PFCG
Vbak
The "workflow" definition is the set of rules that determine the path that the process takes.
For example, how a purchase requisition is processed, from the initial request to the creation
of the purchase order.
The Tasks are the steps in the process, which have to be performed either by people
or automatically by the software. For example, to check for the availability of the
spare computers in the company.
A Work item is the task instance that is performed as a single workflow step. For
example, check that there are no spare computers available in the company.
Agents are the people who process the tasks (via the work items). For example,
requisitioner and a member of the purchasing department.
Container is the place where all the data used in the workflow is collected.
Binding is the set of rules that define which data is passed to which part of the
process.