Page tree
Skip to end of metadata
Go to start of metadata

Sub Areas

ABAP Documentation


What does ABAP stand for?

ABAP currently stands for Advanced Business Application Programming; however the original meaning was Allgemeiner Berichtsaufbereitungsprozessor, which is German for "generic report preparation processor". A different explanation is Anfänger Basteln An Programmen, which is German for "beginners tinker with programs". (tongue)

back to top

What are the different types of internal tables?

There are three types of internal tables in ABAP:

  • standard table,
  • sorted table and
  • hashed table.

back to top

What is the difference between SAP memory and ABAP memory?

SAP Memory is a global memory area which all sessions within a SAPgui have access to if they run on the same application server instance. This allows for passing data between sessions.
The SET PARAMETER ID and GET PARAMETER ID statements are used to manipulate the SAP Memory.

SET PARAMETER ID 'MAT' field p_matnr.
GET PARAMETER ID 'MAT' field p_matnr.

ABAP Memory is a memory area which all programs in the call stack within the same internal session can access. The EXPORT and IMPORT statements are used here.

export p_matnr = p_matnr to memory id 'ZTESTMAT'.
import p_matnr = p_matnr from memory id 'ZTESTMAT'.

back to top

What are the events used in report programs?

  • Load-of-Program
  • Initialization
  • At Selection-Screen
  • At Selection-Screen on <field(mention the field name)>
  • At Selection-Screen on block
  • At Selection-Screen output
  • start-of-selection
  • top-of-page
  • end-of-selection.
  • end-of-page.
  • At Pf<nn>
  • At Line-Selection
  • At User-Command
  • Top-of-Page during line-selection

back to top

How are RANGES different from SELECT-OPTIONS?

They are the same, except SELECT-OPTIONS will provide an interface
on the selection screen for the user to input data.

SELECT-OPTIONS have an inbuilt internal table having the fields LOW, HIGH, OPTION, SIGN where  as in RANGES we have to explicitly define the internal table with the above fields.

back to top

Are header lines and the OCCURS extension obsolete?

In regard to internal tables, header lines and the OCCURS extension are obsolete. These are actually not allowed in the OO context. The correct way to define internal tables and work areas is to use a TYPE statement to define the structure and the table type and then to use a DATA statement to define the internal table and work area.

  begin of ty_Item,
    fld1 type c length 10,
    fld2 type c length 10,
  end of ty_Item,
  ty_Items type standard table of ty_Item with default key.
data: itab type ty_Items.
data: wa   like line of itab.

back to top

What is the difference between OCCURS n and INITIAL SIZE n?

OCCURS n is obsolete in OO Context and it is advisable to use INITIAL SIZE instead. The difference between the two is that OCCURS n allocates memory to store specified number of rows in the internal table and also creates a header line, whereas INITIAL SIZE allocates memory for the specified number of rows without creating the header line.

back to top

How do I define a deep structure in modern ABAP?

  BEGIN OF ty_Message,
    count          TYPE sytabix,
    bdc_Messages   TYPE STANDARD TABLE OF bdcmsgcoll WITH DEFAULT KEY,
  END OF ty_Message,
DATA:  all_Messages TYPE ty_Messages.

One thing needing to be clarified is that there are 3 terms often mixed up:

  1. Nested Structure,
  2. Deep Structure,
  3. Flat Structure.

According to official training material BC402, they are explained as follows:

  1. Nested Structure : Structure contains other structure as component.
  2. Deep Structure : Structure contains variable length components (string / xstring), or even an internal table
  3. Flat Structure : Structure only contains fixed-length components.

back to top

What is the difference between "'" and "`" in a character literal?

A character sequence within single quote characters (') is a char literal, while within (`) is a string literal. That is especially important for trailing spaces, a string literal preserves the trailing space while a char literal ignores them.


DATA v_char TYPE c LENGTH 32.
v_char = 'This is a'.
CONCATENATE v_char 'text   ' INTO v_char SEPARATED BY space.
*" v_char would be "This is a text"
CONCATENATE v_char `text   ` INTO v_char SEPARATED BY space.
*" v_char would be "This is a text   "

back to top

How can I access parameters to MACROS?

The parameters in MACROS can be accessed by &1, &2 ...

DATA sum TYPE i.

"Macro definition
DEFINE add_macro.
sum = &1 + &2.

add_macro 10 20.
WRITE sum.

back to top

  • No labels

1 Comment

  1. Unknown User (jco70hx)

    Hi, I have one default screen, in this screen i will press f8  it will lead to  another screen,in this screen i will select Test for dsd (it is created  by my own),

    again it will lead to another screen ,in this third screen i want to disable the buttons and one table data(the whole table data).

    how can i disable the buttons and table data in my third intractive screen.

    please help me out..

    Thank you.