When we create a variable in the public section of a class, we can use it within the methods of that class. Let’s say we assign it an initial value. Later, if we create another variable with the same name ...
SAP EWM Help Latest Questions
In SAP ABAP, pass by value and pass by reference are two methods of passing data to methods, function modules, or forms. They determine how the data is handed over and whether changes to the data affect the original variable.
Help Request (triggered by F1 key) provides field-level documentation to help users understand the purpose or use of a field. Types of Help Request: Automatic Help (F1) from Data Element Comes from documentation maintained in the data element. No coding needed — ...
Memory id is a place holder or memory location which stores the data. We need to specify the name of the memory location in a way to access it. In code below, the memory location is CID where the value of c ...
Feature List Report Grid Report (ALV) Output Format Plain text list Interactive grid/table User Interactivity Low High Sorting/Filtering Manual (if needed) Built-in Totals/Subtotals Not available Available Export Options Manual Export to Excel, etc. Development Effort Low Medium to High Modern UI Experience No Yes
ABAP Old vs New Syntax Cheat Sheet Assigning Value to a Variable *--Old Syntax DATA var1 TYPE char5. var1 = 'ABC'. *--New Syntax DATA(var1) = 'ABC'. 2. SELECT SINGLE INTO Work Area *--Old Syntax DATA wa TYPE ... SELECT SINGLE fld1 ...
AT SELECTION-SCREEN OUTPUT Purpose:This event is triggered before the selection screen is displayed to the user. Use Case:To modify the selection screen dynamically — for example, to hide/show fields, enable/disable them, or set default values based on conditions.
In-App Extension involves customizing or extending SAP standard applications within the SAP core system itself (e.g., within SAP S/4HANA). Where it runs: Inside the same SAP S/4HANA system Uses SAP tools like Key User Extensibility tools, ABAP in Eclipse, or Fiori App Customization Typical ...
You can build a new internal table with only selected entries and fields like this: *&---------------------------------------------------------------------* *& Report ZREP_LCLCLASS *&---------------------------------------------------------------------* *& Demonstrates modern ABAP syntax: REDUCE, FILTER, FOR expressions *&---------------------------------------------------------------------* REPORT zrep_lclclass. *---------------------------- * Example 1: REDUCE Operator *---------------------------- TYPES: BEGIN OF ty_order, id TYPE i, amount TYPE i, END OF ty_order. DATA: lt_orders TYPE STANDARD TABLE OF ty_order WITH EMPTY KEY, lv_total TYPE i. lt_orders = VALUE #( ( id = 1 amount = 100 ) ( id = 2 amount = 250 ) ( id = 3 amount = 150 ) ). lv_total = REDUCE i( INIT sum = 0 FOR order IN lt_orders NEXT sum = sum + order-amount ). WRITE: / '--- REDUCE Example ---', / 'Total Amount:', lv_total. *---------------------------- * Example 2: FILTER Operator *---------------------------- TYPES: BEGIN OF ty_user, name TYPE string, status TYPE string, END OF ty_user. DATA: lt_users TYPE STANDARD TABLE OF ty_user WITH EMPTY KEY, lt_active_users TYPE STANDARD TABLE OF ty_user WITH EMPTY KEY. lt_users = VALUE #( ( name = 'Alice' status = 'ACTIVE' ) ( name = 'Bob' status = 'INACTIVE' ) ( name = 'Charlie' status = 'ACTIVE' ) ). lt_active_users = FILTER #( lt_users WHERE status = 'ACTIVE' ). WRITE: / '--- FILTER Example ---'. LOOP AT lt_active_users INTO DATA(user). WRITE: / user-name, user-status. ENDLOOP. *------------------------------------------------------ * Example 3: FOR Expression - Extract Specific Fields *------------------------------------------------------ DATA: lt_names TYPE STANDARD TABLE OF string WITH EMPTY KEY. lt_names = VALUE string_table( FOR user IN lt_users WHERE ( status = 'ACTIVE' ) ( user-name ) ). WRITE: / '--- FOR Expression Example ---'. LOOP AT lt_names INTO DATA(name). WRITE: / name. ENDLOOP. This creates a new string table containing only the names of users whose status = 'ACTIVE'—short, clean, and readable. Output: — ...
The SET PARAMETER ID and GET PARAMETER ID statements are used with SAP memory to pass data between two separate transactions, each running in its own session. When you use SET PARAMETER ID to assign a value to a field, opening ...