0% found this document useful (0 votes)
27 views

Example: ALV Reporting Using Classes (ABORT ERROR - Field Catalog Not Found)

The document describes how to create an ALV report in ABAP using classes to display sales order data from a database table. It defines data structures, selects the sales order data, creates ALV grid and custom container objects, and displays the data in the grid on the screen.

Uploaded by

Gaurav Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Example: ALV Reporting Using Classes (ABORT ERROR - Field Catalog Not Found)

The document describes how to create an ALV report in ABAP using classes to display sales order data from a database table. It defines data structures, selects the sales order data, creates ALV grid and custom container objects, and displays the data in the grid on the screen.

Uploaded by

Gaurav Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Example: ALV Reporting using classes (ABORT ERROR - Field

Catalog Not Found)


REPORT Z730ALV1.

*tables  vbak.
*SELECT-OPTIONS so_vbeln for vbak-vbeln.

data v_vbeln type vbak-vbeln.
select-OPTIONS so_vbeln for v_vbeln DEFAULT '4980' to '4985'.

data : o_cust_cont type ref to cl_gui_custom_container,
       o_grid type ref to cl_gui_alv_grid.

types : begin of ty_sales,
             vbeln type vbak-vbeln,
             erdat type vbak-erdat,
             erzet type vbak-erzet,
             ernam type vbak-ernam,
        end of ty_sales.

data t_sales type table of ty_sales.

START-OF-SELECTION.
  call screen 100.

MODULE STATUS_0100 OUTPUT.
  SET PF-STATUS 'ABC'.
*   SET  TITLEBAR 'xxx'.

*  link custom container  with custom control
CREATE OBJECT O_CUST_CONT
  EXPORTING
    CONTAINER_NAME              = 'CUSTCTRL'.

*  link alv grid  with custom container
CREATE OBJECT O_GRID
  EXPORTING
    I_PARENT          = o_cust_cont.

*  get sales  orders
  perform getsalesorders.
  if t_sales is not INITIAL.
*  display  sales orders
      CALL METHOD O_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        CHANGING
          IT_OUTTAB                     = t_sales.
  endif.

ENDMODULE.                 " STATUS_0100   OUTPUT

MODULE USER_COMMAND_0100 INPUT.
   CASE sy-ucomm.
      when 'FC1'.
          leave PROGRAM.
   endcase.
ENDMODULE.                 " USER_COMMAND_0100   INPUT

FORM GETSALESORDERS .
  select vbeln erdat erzet ernam
           from vbak
        into table t_sales
            where vbeln in so_vbeln.
ENDFORM.                    "  GETSALESORDERS

Flowlogic:

PROCESS BEFORE OUTPUT.
 MODULE STATUS_0100.
*
PROCESS AFTER INPUT.
 MODULE USER_COMMAND_0100.
Module pool screen 100:

PF-STATUS ‘ABC’:

You might also like