Purpose of TMG Events Events in TMG are used to: Validate data before it’s saved. Set default values when creating entries. Restrict access to rows based on user roles. Log changes or trigger custom logic. Enforce complex business rules beyond field-level checks. Where You Configure TMG Events Transaction: ...
SAP EWM Help Latest Questions
Value Help (F4 Help) provides users with a list of valid input values for a field to ensure accurate data entry. Types of Value Help: Automatic Value Help Provided by the data element (via domain fixed values or check tables). No coding needed. Search ...
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 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 ...
Reports are a major part of application development used to display data to users. There are three main types of reports: Classical Reports Simplest and most basic report type. Output is in line-by-line format using WRITE statements. Limited formatting, but supports interactive ...
Classical Reports in ABAP use a sequence of predefined events during program execution. These events let you structure your code based on data fetching, formatting, and output rendering. Event Description LOAD-OF-PROGRAM Triggered once when the program is loaded into memory (before anything else) INITIALIZATION Called before ...
It returns a filtered internal table based on a condition—no need for loops or APPEND. *&---------------------------------------------------------------------* *& Report ZREP_LCLCLASS *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT zrep_lclclass. 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' ). LOOP AT lt_active_users INTO DATA(user). WRITE: / user-name, user-status. ENDLOOP. Output : Alice ACTIVE Charlie ACTIVE
In ABAP, system fields are predefined fields provided by the SAP runtime environment. They hold important contextual information about the program’s current state — like the current date, time, user, or return codes of statements. These fields start with SY- and ...
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 ...
The Table Maintenance Generator allows authorized users or support staff to: Maintain data in custom or standard tables without writing ABAP code. Provide a standardized UI for table maintenance. Enforce data consistency and validation through events and screen logic. Use Case Description Maintain custom config tables Enter ...