Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 1.80 KB | None | 0 0
  1. *&---------------------------------------------------------------------*
  2. *& Report  ZJL_ALV2
  3. *&
  4. *&---------------------------------------------------------------------*
  5. *&
  6. *&
  7. *&---------------------------------------------------------------------*
  8.  
  9. REPORT  zjl_alv2.
  10.  
  11. DATA: gr_grid TYPE REF TO cl_gui_alv_grid,
  12.       gr_container TYPE REF TO cl_gui_custom_container,
  13.       gt_table TYPE TABLE OF zjl_table.
  14.  
  15. IF gr_container IS INITIAL.
  16.   CREATE OBJECT gr_container
  17.     EXPORTING
  18.       container_name = 'CONT'.
  19.   CREATE OBJECT gr_grid
  20.     EXPORTING
  21.       i_parent = gr_container.
  22. ENDIF.
  23.  
  24. SELECT * FROM zjl_table INTO TABLE gt_table.
  25.  
  26. CALL METHOD gr_grid->set_table_for_first_display
  27.   EXPORTING
  28. *      i_buffer_active               =
  29. *      i_bypassing_buffer            =
  30. *      i_consistency_check           =
  31.     i_structure_name              = 'zjl_table'
  32. *      is_variant                    =
  33. *      i_save                        =
  34. *      i_default                     = 'X'
  35. *      is_layout                     =
  36. *      is_print                      =
  37. *      it_special_groups             =
  38. *      it_toolbar_excluding          =
  39. *      it_hyperlink                  =
  40. *      it_alv_graphics               =
  41. *      it_except_qinfo               =
  42. *      ir_salv_adapter               =
  43.   CHANGING
  44.     it_outtab                     = gt_table
  45. *      it_fieldcatalog               =
  46. *      it_sort                       =
  47. *      it_filter                     =
  48. *    EXCEPTIONS
  49. *      invalid_parameter_combination = 1
  50. *      program_error                 = 2
  51. *      too_many_lines                = 3
  52. *      others                        = 4
  53.         .
  54. IF sy-subrc <> 0.
  55. *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
  56. *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  57. ENDIF.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement