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

  • 0
  • 0
DPM125

What is an Interactive Report?

An Interactive Report in ABAP is a report that lets users interact with the list (usually by clicking on a line or hotspot).

When the user clicks, the program reacts to the event and shows secondary details (like drilling down).

Classic mechanism: Events AT LINE-SELECTION, AT USER-COMMAND, AT PFx.

Example Scenario (using MARAMARC)
  1. Basic list (Level 1): Show materials (MARA).
  2. Secondary list (Level 2): When user clicks on a material, show its plant-specific details (MARC).
*&---------------------------------------------------------------------*
*& Report  ZTEST_PROGRAM_2
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT ztest_program_2.

TABLESmaramarc.

DATAit_mara TYPE TABLE OF mara,
      it_marc TYPE TABLE OF marc.

"--- Fetch data
SELECT matnr mtart FROM mara UP TO 20 ROWS INTO TABLE it_mara.

"--- Event: START-OF-SELECTION -> Display Basic List
START-OF-SELECTION.
  WRITE/ 'Material No.'15 'Material Type'.
  ULINE.

  LOOP AT it_mara INTO DATA(wa_mara).
    WRITE/ wa_mara-matnr15 wa_mara-mtart.
    HIDE wa_mara-matnr"Hide material no for later use
  ENDLOOP.

"--- Event: AT LINE-SELECTION -> Drill down to details
AT LINE-SELECTION.
  CLEAR it_marc.

  SELECT matnr werks dismm
    FROM marc
    INTO TABLE it_marc
    WHERE matnr sy-lisel+0(18)" Material from selected line

  IF sy-subrc 0.
    NEW-PAGE.
    WRITE/ 'Material:'sy-lisel+0(18).
    ULINE.
    WRITE/ 'Plant'15 'MRP Type'.
    ULINE.

    LOOP AT it_marc INTO DATA(wa_marc).
      WRITE/ wa_marc-werks15 wa_marc-dismm.
    ENDLOOP.
  ELSE.
    MESSAGE 'No plant data found for this material' TYPE 'I'.
  ENDIF. 

Output :

Related Questions

Leave an answer

Leave an answer