OOALV_NOTES_WITH_PROGRAMS(1)santosh.pdf

Please download to get full document.

View again

of 39
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information Report
Category:

Documents

Published:

Views: 137 | Pages: 39

Extension: PDF | Download: 0

Share
Related documents
Description
VINAYAKA ALV (Advanced List Viewer / ABAP List Viewer): - 1) Using classes 2) Using function module ALV Reporting using classes: - ALV reports are used for displaying data in the form of the table as part of the we use the following classes. 1) CL_GUI_ALV_GRID 2) CL_GUI_CUSTOM_CONTAINER 3) CL_GUI_CONTAINER 4) CL_GUI_SIMPLE_TREE 5) CL_GUI_PICTURE 6) CL_GUI_DOCKING_CONTAINER 7) CL_DD_DOCUMENT 8) CL_GUI_SPLITTER_CONTAINER As part of the ALV reporting we need to develop t
Tags
Transcript
    1 | Page Santosh P  VINAYAKA ALV (Advanced List Viewer / ABAP List Viewer): - 1)   Using classes 2)   Using function module ALV Reporting using classes: - ALV reports are used for displaying data in the form of the table as part of the we use the following classes. 1)   CL_GUI_ALV_GRID  2)   CL_GUI_CUSTOM_CONTAINER   3)   CL_GUI_CONTAINER   4)   CL_GUI_SIMPLE_TREE  5)   CL_GUI_PICTURE  6)   CL_GUI_DOCKING_CONTAINER   7)   CL_DD_DOCUMENT  8)   CL_GUI_SPLITTER_CONTAINER As part of the ALV reporting we need to develop the ALV grid   which is display on top of a custom control. A custom control is a physical control which is available as part of dialog screen. ALV grid cannot recognize custom control on its own it required an interface. These interfaces are  provided in the form of a standard class. This class can be either. 1)   CL_GUI_CUSTOM_CONTAINER   2)   CL_GUI_CONTAINER    CL_GUI_CUSTOM_CONTAINER / CL_GUI_CONTAINER CUSTOM CONTROL MODULE POOL SCREEN ALV GRID    2 | Page Santosh P  CUSTOM CONTROL CONTAINER ALV GRID PHYSICAL CONTAL CL_GUI_CUSTOM_CONTAINER / CL_GUI_CONTAINER CL_GUI_CONTAINER Example1: - Sale Document Header Data Sale Document Item Data Material Data MM02 Transaction(Change Material) To display an internal table data in the grid we need to use the instance method 'SET_TABLE_FOR_FIRST_DISPLAY ’   of the class ‘ CL_GUI_ALV_GRID ’. This method contains on ly one mandatory parameter ‘ IT_OUTTAB ’ which expects internal table of output.  VBELN POSNR MATNR NETWR 4972 10 M1 4972 20 M2 4972 30 M3 VBELN ERDAT ERZET ERNAM 4970 4971 4972   MATNR MTART MATKL Material Number M2    3 | Page Santosh P  While displaying the internal table data in the ALV grid we need to generate the field catalog for the field, if the field catalog is not specified if result in ABORT error field catalog is not found. A field catalog can generate in two waves by using. 1)   Function modules  2)   Manually Field catalog is an object which stores the information of the fields like field name, field position, field label, etc. once the field catalog is generated we need to pass the field catalog object as on input to the parameter IT_FIELDCATALOG  of the method ‘SET_TABLE_FOR_TABLE_DISPLAY‘.   LVC_T_FCAT is a table type used for generating the field catalog this table type is associated with the structure LVC_S_FCAT. Note: - To display an ALV column and hotspot we need to set the field hotspot as part of field catalog generation. HOTSPOT_CLICK: - It is the event of the class ‘CL_GUI_ALV_GRID’ which triggered by SAP, whenever a hotspot column is clicked. REFRESH_TABLE_DISPLAY: -  Is an instance method of the class CL_GUI_ALV_GRID used for refresh the ALV grid with the latest internal table data. DOUDLE_CLICK: - It is the instance event of the class CL_GUI_ALV_GRID which is triggered whenever a ALV column cell value is double click. REPORT Z9AM_ALV1. tables : vbak. types : begin of ty_vbak, vbeln type vbak-vbeln, erdat type vbak-erdat, erzet type vbak-erzet, ernam type vbak-ernam, end of ty_vbak. data : lt_vbak type standard table of ty_vbak, ls_vbak type ty_vbak.    4 | Page Santosh P  types : begin of ty_vbap, vbeln type vbap-vbeln,  posnr type vbap-posnr, matnr type vbap-matnr, end of ty_vbap. data : lt_vbap type standard table of ty_vbap, ls_vbap type ty_vbap. types : begin of ty_mara, matnr type mara-matnr, mtart type mara-mtart, matkl type mara-matkl, end of ty_mara. data : lt_mara type standard table of ty_mara, ls_mara type ty_mara. data : vbak_grid type ref to cl_gui_alv_grid, vbak_cont type ref to cl_gui_custom_container, vbap_grid type ref to cl_gui_alv_grid, vbap_cont type ref to cl_gui_custom_container, mara_cont type ref to cl_gui_custom_container, mara_grid type ref to cl_gui_alv_grid. data : lt_fcat type lvc_t_fcat, ls_fcat type lvc_s_fcat, * ls_fcat like line of lt_fcat, ls_layo type lvc_s_layo. select-options : so_vbeln for vbak-vbeln. class lcl_eventreceiver definition.  public section. methods handle_hotspot_click for event hotspot_click of cl_gui_alv_grid importing e_row_id. methods handle_double_click for event double_click of cl_gui_alv_grid importing e_row. methods handle_button_click for event button_click of cl_gui_alv_grid
Recommended
View more...
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks