Professional Documents
Culture Documents
tables-in-abap)
8/12/2014 0 Comments (http://saptechconcepts.weebly.com/home/types-of-internal-tables-in-abap#comments) Archives
November 2016
There are 3 different types of internal tables :
(/home/archives/11-2016)
1. Standard table
January 2015
2. Sorted table
(/home/archives/01-2015)
3. Hashed table
October 2014
(/home/archives/10-2014)
Standard table :
September 2014
The records of standard table are accessed by using a table index or key.
(/home/archives/09-2014)
Standard tables always have a non-unique key.
August 2014
A standard table can be populated by using the APPEND statement .
(/home/archives/08-2014)
July 2014
Sorted table :
(/home/archives/07-2014)
The records of sorted table are accessed by using a table index or key.
June 2014
The key is defined as either unique or non-unique.
(/home/archives/06-2014)
Sorted table is populated by using INSERT statement.In sorted tables records entered are automatically
May 2014
sorted.
(/home/archives/05-2014)
Hashed table :
RSS Feed (/1/feed)
These records of hashed table are accessed only by the keys (using hash algorithm) but not by indexes.
The key of a hashed table must be defined as unique.
Hashed table is populated by using INSERT statement.
Hashed tables are useful if you want to construct and use an internal table which resembles a database
table or for processing large amounts of data.
Additional Info :Standard and Sorted tables are called index tables.
Index access is the quickest possible access.
Like 0 Tweet
0 Comments (http://saptechconcepts.weebly.com/home/types-of-internal-tables-in-abap#comments)
RICEF is an acronym that categorizes the SAP technical development objects into five different areas.
RICEF stands for Reports , Interfaces , Conversions , Enhancements , Forms .
R - Reports : All categories of reports like Classical, Interactive, ALV , Query reports , report painter ,
module pool etc., comes under this category.
I - Interfaces : Interfaces includes development objects that are used for communication between SAP
and non-SAP systems by picking or placing a file in the application server. The technical concepts
ALE/IDOCS , FTP using OPEN DATASET..,PI concept etc., comes under this part.
*FTP - file transfer protocol , PI - process integration .
C - Conversions : Conversions are nothing but the techniques used to transfer data from legacy(non-
SAP) systems to SAP system from a flat file as if the user is manually giving the inputs with thorough
checks through a transaction.The techniques like BDC(call transaction and Session) , LSMW , BAPI etc
comes under this category.
https://saptechconcepts.weebly.com/home/category/generic-abap 1/10
12/23/2017 Category: Generic ABAP - SAP TECH CONCEPTS
E - Enhancements : Enhancements include all the modifications to SAP standard delivered objects.
User Exits,Customer exits,BTE s,Enhancement points,Enhancement sections,Implicit and explicit Categories
enhancements,BADI are the techniques that come under enhancements.
All (/home/category/all)
BDC
F - Forms : Forms refer to the display of structured data in a layout as required by the Business.
(/home/category/bdc)
Scripts, Smart forms , Adobe forms will come under this category.
Data Dictionary
(/home/category/data-
Like 0 Tweet
dictionary)
0 Comments (http://saptechconcepts.weebly.com/home/ricef-frice-in-sap-abap#comments) Enhancements
(/home/category/enhanc
ements)
What is the significance of Fixed point arithmetic check box in Function Modules
(/home/category/functio
attributes section of report ? n-modules)
Generic ABAP
(http://saptechconcepts.weebly.com/home/what-is-the- (/home/category/generic
significance-of-fixed-point-arithmetic-check-box-in-attributes- -abap)
OOPS
section-of-report) (/home/category/oops)
7/15/2014 Performance Tuning
0 Comments (http://saptechconcepts.weebly.com/home/what-is-the-significance-of-fixed-point-arithmetic-check- (/home/category/perfor
box-in-attributes-section-of-report#comments)
mance-tuning)
SAP Query & LDB
(/home/category/sap
query ldbc350e11eb0)
SAP R/3 Architecture
(/home/category/sap-r3-
architecture)
Tips And Tricks
(/home/category/tips-
and-tricks)
Tricky Interview Q's
(/home/category/tricky-
interview-qs)
If you mark this check box , all calculations in the program will consider the decimals for packed numbers.
Like 0 Tweet
0 Comments (http://saptechconcepts.weebly.com/home/what-is-the-significance-of-fixed-point-arithmetic-check-
box-in-attributes-section-of-report#comments)
https://saptechconcepts.weebly.com/home/category/generic-abap 2/10
12/23/2017 Category: Generic ABAP - SAP TECH CONCEPTS
0 Comments (http://saptechconcepts.weebly.com/home/difference-between-at-newendat-and-on-change-
ofendon-statements#comments)
1. Can only be used inside the LOOP...ENDLOOP 1. Can be used in any kind of loop constructing
statements. statements like LOOP..ENDLOOP,
SELECT...ENDSELECT,CASE...ENDCASE,
DO...ENDDO,WHILE...ENDWHILE.
Can be used outside the loop also.
2. Cannot be used with WHERE expression. 2. Can be used with WHERE expression.
3. ELSE clause cannot be used between AT 3. ELSE clause can be used between ON CHANGE
NEW...ENDAT OF...ENDON.
AT NEW statement triggers when concerned field changes and also when the fields left to the concerned field
changes,in this case if f1 or f2 changes to a new value.
The right side fields,in this case field f3 will be considered as.... * if it is character type(non-numeric) field
0 if it is numeric type field
ON CHANGE OF statement triggers ony if the concerned field changes, in this case f2.
Like 0 Tweet
0 Comments (http://saptechconcepts.weebly.com/home/difference-between-at-newendat-and-on-change-
ofendon-statements#comments)
Pseudo comments and Pragmas both are used to suppress the errors / warnings shown during the
Extended program check.
Since SAP NW 7.0 EhP2 (Enhancement Package),pseudo comments are obsolete and were replaced by
Pragmas.
Pseudo comments : Pseudo comments are placed after the end of the statement i.e. after ‘.’ Or ‘,’
PRAGMAS: Pragmas are part of the statement, it has to be added before end of the statement. Unlike
pseudo comments,it can’t occur after end of the statement.
Example :
Pseudo comment Pragmas
#EC NEEDED ==> ##NEEDED
#EC NOTEXT ==> ##NO_TEXT
Additional information :
Report that displays the list of Pseudo comments and it's replacement
Pragmas ABAP_SLIN_PRAGMAS
Table : SLIN_DESC
Like 0
https://saptechconcepts.weebly.com/home/category/generic-abap 3/10
12/23/2017 Category: Generic ABAP - SAP TECH CONCEPTS
Tweet
0 Comments (http://saptechconcepts.weebly.com/home/what-are-pragmas-and-pseudo-comments-in-sap-
abap#comments)
1. A primary/unique key can be more than just one field and used to uniquely identify a row of a table .
2. A table can have only one primary key and it cannot be a null value.
However , a table can have more than one unique key and it can accept null values.
3. A primary key is a unique key by default.
Example :
Consider a table with fields...empid,name,passport No
Here we make empid as a primary key,through which we can identify a particular row.
Passport No. can be considered as a Unique key(which is unique always) but this can be empty as every
employee need not hold a passport.
Like 0 Tweet
0 Comments (http://saptechconcepts.weebly.com/home/difference-between-primary-key-and-unique-
key#comments)
Abend ( A ) : To terminate the report program after displaying a customized message but the processing
cannot be resumed in this case.
Example case : If incorrect password is entered 3 times.
MESSAGE 'This is an Abend message' TYPE 'A'.
Error ( E ) : Displays an error message and the system interrupts the current processing so that the
errors can be corrected. Only then can processing continue.
When used in selection screen events ,displays an error message and the input fields are refreshed for
the user to enter new values .
Example case : Characters entered instead of numbers
MESSAGE 'This is an error message' TYPE 'E' .
https://saptechconcepts.weebly.com/home/category/generic-abap 4/10
12/23/2017 Category: Generic ABAP - SAP TECH CONCEPTS
Information ( I ) : To display some information in a dialog box which user should know before
proceeding.
It can be safely ignored without any consequences,program execution starts from the statement next to
the message statement.
Example : MESSAGE 'This is information message' TYPE 'I'.
Status ( S ) : To display message on the status bar of the next screen as a Success message.
Example : MESSAGE 'This is a Status message' TYPE 'S'.
Warning ( W ) : To display a warning message.These messages cannot be ignored but the user can
choose whether or not to make a correction or bypass the message.When used in selection screen
events,unlike error message, after a warning message user input fields are not reset in this case,the user
can correct the input .
Example : MESSAGE 'This is a Warning message' TYPE 'W' DISPLAY LIKE 'W'.
Without [DISPLAY LIKE 'W'] addition,it will be displayed like an error message.
https://saptechconcepts.weebly.com/home/category/generic-abap 5/10
12/23/2017 Category: Generic ABAP - SAP TECH CONCEPTS
Exit ( X ) : To handle a run-time error . The program terminates with a short dump(which can also be
viewed in ST22 transaction).
Example : MESSAGE 'This is an Exit message' TYPE 'X'.
Like 0 Tweet
0 Comments (http://saptechconcepts.weebly.com/home/what-are-the-types-of-error-messages-in-sap-
abap#comments)
APPEND structure and Customizing Include are meant for enhancing the Standard Tables/Structures in
customer perspective.
Normal Include structure is used to add fields to Z Tables.
https://saptechconcepts.weebly.com/home/category/generic-abap 6/10
12/23/2017 Category: Generic ABAP - SAP TECH CONCEPTS
APPEND structure : An append structure is a structure that is assigned to exactly one table or structure.
There can be more than one append structure for a table or structure.
Append structure is used to add additional fields to standard SAP tables.
Append structure cannot be used with cluster and pooled tables.
Append structure is included in a table/structure using .APPEND
The name of a append structure can begin with Z* / Y* .
INCLUDE structure:
Both Customizing Include and normal Include are included in a table/structure using .INCLUDE
Customizing Include : Some SAP Standard tables/structures are delivered with Customizing/Customer
Include which act as container of custom fields.So Customers can thus enhance tables and structures of
the standard system without themselves having to modify the table and structure definitions.
In contrast to append structures,a Customizing include can be contained in several tables or structures.
The name of a customizing include begins with 'CI_' and the include is in the customer namespace.
The fields in customizing includes need to be in customer namespace (YY* / ZZ*) in order to avoid
conflicts with future fields added by SAP to the same table/structure.
Normal Include structure can be used in multiple tables/structures and structure name can begin with Z* /
Y*.
Like 0 Tweet
0 Comments (http://saptechconcepts.weebly.com/home/what-is-the-difference-between-includecustomizing-
include-and-append-structure-in-a-tablestructure#comments)
Aggregate functions return a single value from the values in several lines of a column in a database
table.The value is calculated in the database system.
These functions can be used with SELECT statement by specifying a column(column identifier) of a
database table as an argument.
Any number of column identifiers can be used as arguments of aggregate functions in SELECT
statement.
Also multiple aggregate functions can be used in a single SELECT statement.
Following are the aggregate functions available :
Average(AVG) , MAXIMUM(MAX) , Minimum(MIN) , Total(SUM) , Count(COUNT) .
Average(AVG) :
Syntax : AVG( [DISTINCT] col ) AVG determines the average value of the column col
specified. It can only be applied to a numeric field.
Data types like DF16_DEC, D34_DEC (decimal floating point numbers ) , F(float) are recommended for
the target fields.
Example :
DATA: lv_avgnetwr TYPE f.
PARAMETERS: p_vbeln TYPE vbeln_va.
SELECT AVG( netwr ) FROM vbap INTO lv_avgnetwr WHERE vbeln EQ p_vbeln.
Maximum(MAX) :
Syntax : MAX( [DISTINCT] col )
MAX determines the maximum value of the contents of the column col specified.
Example :
DATA: lv_maxkwmeng TYPE kwmeng.
https://saptechconcepts.weebly.com/home/category/generic-abap 7/10
12/23/2017 Category: Generic ABAP - SAP TECH CONCEPTS
PARAMETERS: p_vbeln TYPE vbeln_va.
SELECT MAX( kwmeng ) FROM vbap INTO lv_maxkwmeng WHERE vbeln EQ p_vbeln.
Minimum(MIN) :
Syntax : MIN( [DISTINCT] col )
MIN determines the minimum value of the contents of the column col specified.
Example :
DATA: lv_minkwmeng TYPE kwmeng.
PARAMETERS: p_vbeln TYPE vbeln_va.
SELECT MIN( kwmeng ) FROM vbap INTO lv_minkwmeng WHERE vbeln EQ p_vbeln.
Total(SUM) :
Syntax : SUM( [DISTINCT] col )
SUM determines the sum of contents of the column col specified.This can only be applied to a numeric
field.
To avoid overflows it is recommended to make data type of target field greater than that of the source
field.
Example :
DATA: lv_sumkwmeng TYPE p decimals 2.
PARAMETERS: p_vbeln TYPE vbeln_va.
SELECT SUM( kwmeng ) FROM vbap INTO lv_sumkwmeng WHERE vbeln EQ p_vbeln.
Count(COUNT) :
1. Syntax : COUNT( DISTINCT col )
It determines the number of different values in the column col .
Example :
DATA: lv_countmatnr TYPE int4.
PARAMETERS: p_vbeln TYPE vbeln_va.
SELECT COUNT( DISTINCT matnr ) FROM vbap INTO lv_countmatnr WHERE vbeln EQ p_vbeln.
2. Syntax : COUNT( * )
It determines the number of rows in the result set. No column identifier col is specified in this case.
DATA: lv_counttotal TYPE i.
PARAMETERS: p_vbeln TYPE vbeln_va.
SELECT COUNT( * ) FROM vbap INTO lv_counttotal WHERE vbeln EQ p_vbeln.
Like 0 Tweet
0 Comments (http://saptechconcepts.weebly.com/home/what-are-aggregate-functions-in-abap#comments)
Syntax :
DO [n times]
[statement block]
ENDDO.
It is a unconditional loop statement.This defines a control structure that contains a closed statement
block.
Without 'n times' addition,the statement block is repeated until it is exited with one of the loop exiting
statements like EXIT.
Otherwise, the loop will execute endlessly.
https://saptechconcepts.weebly.com/home/category/generic-abap 8/10
12/23/2017 Category: Generic ABAP - SAP TECH CONCEPTS
With 'n times' addition,the number of loop passes can be limited.
Here n is a numeric expression of type i.
The statement block will be executed only if n > 0.
The numeric value that n has at the point of entry into the loop determines the number of times the
statement block will be executed.The changes done to the value of n within the loop will not be
considered by the control structure
Like 0 Tweet
0 Comments (http://saptechconcepts.weebly.com/home/what-is-doenddo-in-abap#comments)
CALL TRANSACTION : If Call Transaction statement is used,the calling program will stay active and the
control comes back to calling program after the execution of called transaction.
Call Transaction statement retains the calling program and it's data .After exiting the called transaction
,processing is resumed in the calling program after the call.
LEAVE TO TRANSACTION : The control leaves the calling program permanently and moves to the
called transaction.Upon exiting the called transaction, processing is not resumed in the calling program
Example :
Report ztest1.
CALL TRANSACTION 'MM01'.
WRITE 'Hi'.
Output : Hi
This output can be seen by you if you press back/exit/cancel button in MM01 transaction.
Report ztest2.
LEAVE TO TRANSACTION 'MM01'.
WRITE 'HELLO'.
Nothing will be printed on output screen as the program quits the calling program and if you press
back/exit/cancel button in MM01 transaction , control comes back to the point from where you started the ✕
By using this site you consent to the use of cookies. Cookies can be managed in your browser or device settings.
execution.
SUBMIT : This statement accesses an executable program (report) and control won't come back to the
calling program output screen after execution of the called program .
SUBMIT AND RETURN : Using this statement the control comes back to the output screen of calling
program after the execution of called program.
Example :
Report ztest.
WRITE / 'Test'.
Report zsubmit.
WRITE / 'Hi'.
SUBMIT ztest.
Output :
Test
Report zreturn.
WRITE / 'Hi'.
SUBMIT ztest.
https://saptechconcepts.weebly.com/home/category/generic-abap 9/10
12/23/2017 Category: Generic ABAP - SAP TECH CONCEPTS
Output :
Test
Like 1 Tweet
0 Comments (http://saptechconcepts.weebly.com/home/may-23rd-2014#comments)
SAP Memory : SAP memory is a memory area to which all main sessions within a SAPgui have
access. You can use SAP memory either to pass data from one program to another within a session, or to
pass data from one session to another. Application programs that use SAP memory must do so using
SPA/GPA parameters (also known as SET/GET parameters).
These parameters can be set either for a particular user or for a particular program using the SET
PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET
PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens.
Syntax : SET PARAMETER ID '<parameter id>' FIELD <'value'/variable>.
GET PARAMETER ID '<parameter id>' FIELD <'value'/variable>.
ABAP Memory : ABAP memory is a memory area that all ABAP programs within the same internal
session can access using the EXPORT and IMPORT statements.
Syntax : EXPORT <variable/internal table> TO MEMORY ID 'idname'.
IMPORT <variable/internal table> FROM MEMORY ID 'idname'.
Like 0 Tweet
0 Comments (http://saptechconcepts.weebly.com/home/generic-abap#comments)
https://saptechconcepts.weebly.com/home/category/generic-abap 10/10