A macro is a text replacement technique defined using DEFINE … END-OF-DEFINITION. It’s similar to a preprocessor directive and is expanded at runtime. When to use: · For short code blocks with similar patterns (e.g., logging or repetitive output). · Used mainly in ...
SAP EWM Help Latest Questions
A function module (FM) is a globally reusable procedure created in transaction SE37 or inside a Function Group. It can be called from anywhere in the system. When to use: · When you want reusable logic across different programs. · Supports exception handling ...
An include is a code fragment stored separately and inserted into a program using the INCLUDE statement. It’s mainly used to split a large program into manageable blocks. When to use: To split large programs into smaller reusable blocks. Often used for reusable ...
A subroutine is a block of reusable code defined using FORM and called using PERFORM. It is a procedural method of modularization mainly used in classical ABAP programming. When to use: In classic procedural ABAP programs. For logic reuse in the same or ...
In OData (Open Data Protocol), an entity is a representation of a data record that typically maps to a row in a database table. Key Concepts: Entity = Object or Record For example, a Customer, Order, or Product can each be ...
SEGW (Service Gateway Builder) is a transaction code used to create ODATA services in SAP NetWeaver Gateway. It lets you define models, entities, and implement CRUD operations using a UI-based interface. Steps to Create an ODATA Project in SEGW Step 1: Open ...
A constructor is a special method automatically called when an object is created using CREATE OBJECT or NEW. Types of Constructors in ABAP Type Method Name Called On Purpose Instance Constructor CONSTRUCTOR When an ...
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.
A Listbox in SAP refers to a dropdown list UI element that allows users to select one value from a predefined set of values. *&---------------------------------------------------------------------* *& Report ZREP_LCLCLASS *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT zrep_lclclass. PARAMETERS: p_color AS LISTBOX VISIBLE LENGTH 20 USER-COMMAND uc. INITIALIZATION. DATA: lt_list TYPE vrm_values, ls_list TYPE vrm_value. ls_list-key = 'R'. ls_list-text = 'Red'. APPEND ls_list TO lt_list. ls_list-key = 'G'. ls_list-text = 'Green'. APPEND ls_list TO lt_list. ls_list-key = 'B'. ls_list-text = 'Blue'. APPEND ls_list TO lt_list. CALL FUNCTION 'VRM_SET_VALUES' EXPORTING id = 'P_COLOR' values = lt_list. Output: execute the Code.
A Singleton class is a design pattern that restricts the instantiation of a class to one single object throughout the lifecycle of a program. This is useful when exactly one object is needed to coordinate actions across the system — such as logging, configuration ...