SHARE
TWEET

Untitled

a guest Nov 19th, 2019 144 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. *&---------------------------------------------------------------------*
  2. *& Report Z_TASK3
  3. *&---------------------------------------------------------------------*
  4. *&
  5. *&---------------------------------------------------------------------*
  6. REPORT Z_TASK3.
  7.  
  8. TABLES sflight.
  9.  
  10. PARAMETERS: pcarrid TYPE sflight-carrid DEFAULT 'AA',
  11. pconnid TYPE sflight-connid DEFAULT '64'.
  12. SELECT-OPTIONS s_fldate FOR sflight-fldate DEFAULT '20160101' TO '20161001' NO-EXTENSION.
  13.  
  14. DATA: data_sflight TYPE TABLE OF sflight.
  15.  
  16. *&---------------------------------------------------------------------*
  17. *& Class lcl_select_class
  18. *&---------------------------------------------------------------------*
  19. * Text
  20. *----------------------------------------------------------------------*
  21. CLASS lcl_select_class DEFINITION.
  22.   PUBLIC SECTION.
  23.   METHODS:
  24.     select_data.
  25. ENDCLASS.
  26.  
  27. *&---------------------------------------------------------------------*
  28. *& Class (Implementation) lcl_select_class
  29. *&---------------------------------------------------------------------*
  30. * Text
  31. *----------------------------------------------------------------------*
  32. CLASS lcl_select_class IMPLEMENTATION.
  33.   METHOD select_data.
  34.     SELECT * FROM sflight INTO TABLE data_sflight WHERE carrid = pcarrid AND connid = pconnid AND fldate IN s_fldate.
  35.   ENDMETHOD.
  36. ENDCLASS. "lcl_select_class
  37.  
  38.  
  39. *&---------------------------------------------------------------------*
  40. *& Class lcl_grid
  41. *&---------------------------------------------------------------------*
  42. * Text
  43. *----------------------------------------------------------------------*
  44. CLASS lcl_grid DEFINITION.
  45.   PUBLIC SECTION.
  46.   METHODS:
  47.     view.
  48. ENDCLASS.
  49.  
  50. *&---------------------------------------------------------------------*
  51. *& Class (Implementation) lcl_grid
  52. *&---------------------------------------------------------------------*
  53. * Text
  54. *----------------------------------------------------------------------*
  55. CLASS lcl_grid IMPLEMENTATION.
  56.   METHOD view.
  57.  
  58.     CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  59.     EXPORTING
  60.     I_STRUCTURE_NAME = 'sflight'
  61.     TABLES
  62.     T_OUTTAB = data_sflight.
  63.   ENDMETHOD.
  64. ENDCLASS.
  65.  
  66. Start-Of-Selection.
  67.   DATA: grid_inst TYPE REF TO lcl_grid.
  68.   DATA: select_inst TYPE REF TO lcl_select_class.
  69.   CREATE OBJECT: select_inst.
  70.   CREATE OBJECT: grid_inst.
  71.  
  72.  
  73.   select_inst->select_data( ).
  74.   grid_inst->view( ).
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top