Hello,

Sign up to join our community!

Welcome Back,

Please sign in to your account!

Forgot Password,

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask a question.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

SAP EWM Help Latest Questions

REDUCE is used to aggregate values like totals, counts, etc., in a clean, functional style. *&---------------------------------------------------------------------* *& Report  ZREP_LCLCLASS *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT zrep_lclclass. 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: / 'Total Amount:', lv_total. Output: Total Amount: 500

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 ...

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 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.