FM for Editable ALV Popup plus Clipboard Function

Nützliche Abap Codes und Code Fragmente

FM for Editable ALV Popup plus Clipboard Function

Postby Tron » Sun Aug 14, 2022 2:23 pm

Moin.
001.png
001.png (94.44 KiB) Viewed 158 times

002.png
002.png (77.52 KiB) Viewed 158 times


Das Dynpro 100
Dynpro.png
Dynpro.png (12.85 KiB) Viewed 158 times

Dynpro0.png
Dynpro0.png (45.37 KiB) Viewed 158 times

Dynpro1.png
Dynpro1.png (20.45 KiB) Viewed 158 times



Der GUI Status MAIN100
Gui Status.png
Gui Status.png (28.23 KiB) Viewed 158 times


Der GUI Title AUSW
GuiTitle.png
GuiTitle.png (6.46 KiB) Viewed 158 times


Die Struktur ZTAB4000
ztab4000.png
ztab4000.png (22.38 KiB) Viewed 158 times


The Function Module
Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. FUNCTION z_bc_alv_popup.
  2. *"----------------------------------------------------------------------
  3. *"*"Local Interface:
  4. *"  IMPORTING
  5. *"     VALUE(I_STRUC) TYPE  DD02L-TABNAME DEFAULT 'ZCVI_CUST2BP'
  6. *"     VALUE(I_WIDTH) TYPE  SY-CUCOL DEFAULT '200'
  7. *"     VALUE(I_HEIGHT) TYPE  SY-CUROW DEFAULT '20'
  8. *"     VALUE(I_TITLE) TYPE  CHAR80 DEFAULT 'Popup'
  9. *"     VALUE(I_EDIT) TYPE  XFELD DEFAULT ' '
  10. *"  CHANGING
  11. *"     REFERENCE(DATA) TYPE  ANY TABLE
  12. *"----------------------------------------------------------------------
  13.  
  14.  
  15.   IF NOT sy-batch IS INITIAL.
  16.     EXIT.
  17.   ENDIF.
  18.  
  19.   IF i_struc IS INITIAL.
  20.     EXIT.
  21.   ENDIF.
  22.  
  23.   PERFORM create_itab USING i_struc.
  24.  
  25.  
  26.   gv_title = i_title.
  27.   gv_structure_name = i_struc.
  28.   gv_allowedit = i_edit.
  29.  
  30.   ASSIGN data TO <data>.
  31.   IF sy-subrc EQ 0.
  32.  
  33.     CALL SCREEN 100 STARTING AT 1 1
  34.                     ENDING   AT i_width i_height.
  35.  
  36.   ENDIF.
  37.  
  38.  
  39.   EXIT.
  40.  
  41.  
  42. *---------------------------------------------------------------------*
  43. *       MODULE PBO OUTPUT                                             *
  44. *---------------------------------------------------------------------*
  45. MODULE pbo OUTPUT.
  46.  
  47.   IF grid1 IS INITIAL.
  48.  
  49.     IF cl_gui_alv_grid=>offline( ) IS INITIAL.
  50.  
  51.       CREATE OBJECT lo_split
  52.         EXPORTING
  53.           parent                  = cl_gui_container=>screen1
  54.           rows                    = 1
  55.           columns                 = 1
  56.           no_autodef_progid_dynnr = 'X'.
  57.  
  58.       lo_split->set_border( 'X' ).
  59.  
  60. *    lo_split->set_column_width(  EXPORTING id                = 1
  61. *                                           width             = 20 ).
  62. *    lo_split->set_column_width(  EXPORTING id                = 2
  63. *                                           width             = 40 ).
  64.  
  65. * Left:   List of reports
  66.       lo_container = lo_split->get_container( row       = 1
  67.                                               column    = 1 ).
  68.  
  69.  
  70.       CREATE OBJECT grid1
  71.         EXPORTING
  72.           i_parent = lo_container.
  73.     ELSE.
  74.  
  75. *    Hintergrund
  76.       CREATE OBJECT grid1
  77.         EXPORTING
  78.           i_parent = g_dock_container.
  79.  
  80.     ENDIF.
  81.  
  82. *--Creating an instance for the event handler
  83.     CREATE OBJECT gr_event_handler .
  84.  
  85. *----Preparing field catalog.
  86.     PERFORM prepare_field_catalog TABLES gt_fieldcat[] .
  87. *----Preparing layout structure
  88.     PERFORM prepare_layout CHANGING gs_layout .
  89. *----Preparing Disable Toolbar Buttons
  90.     PERFORM change_buttons .
  91.  
  92. *    is_variant-report = sy-repid.
  93. *    is_variant-variant = '/GLOB_DEF'.
  94.  
  95.     CALL METHOD grid1->set_table_for_first_display
  96.       EXPORTING
  97.         "       is_variant           = is_variant
  98.         "       i_save               = 'A'
  99.         is_layout            = gs_layout
  100.         it_toolbar_excluding = lt_exclude
  101.       CHANGING
  102.         it_outtab            = <data>[]
  103.         it_fieldcatalog      = gt_fieldcat[].
  104.  
  105.  
  106. *--Registering handler methods to handle ALV Grid events JG
  107.  
  108.     SET HANDLER gr_event_handler->handle_toolbar FOR grid1.
  109.     SET HANDLER gr_event_handler->handle_user_command FOR grid1.
  110.  
  111. * activate toolbar
  112.  
  113.     CALL METHOD grid1->set_toolbar_interactive.
  114.  
  115. * Der GRID1 wird noch refreshed
  116.     CALL METHOD grid1->refresh_table_display.
  117.  
  118.   ENDIF.
  119.  
  120.   SET PF-STATUS 'MAIN100'.
  121.  
  122.   SET TITLEBAR 'AUSW' WITH  gv_title.
  123. ENDMODULE.                    "PBO OUTPUT
  124. *---------------------------------------------------------------------*
  125. *       MODULE PAI INPUT                                              *
  126. *---------------------------------------------------------------------*
  127. MODULE pai INPUT.
  128. *   to react on oi_custom_events:
  129.   CALL METHOD cl_gui_cfw=>dispatch.
  130.   CASE ok_code.
  131.     WHEN 'EXIT'.
  132.       PERFORM exit_program.
  133.     WHEN OTHERS.
  134. *     do nothing
  135.   CLEAR ok_code.
  136. ENDMODULE.                    "PAI INPUT
  137. *---------------------------------------------------------------------*
  138. *       FORM EXIT_PROGRAM                                             *
  139. *---------------------------------------------------------------------*
  140. FORM exit_program.
  141.  
  142.   SET SCREEN 0.
  143.   LEAVE SCREEN.
  144. ENDFORM.                    "EXIT_PROGRAM
  145. *&--------------------------------------------------------------------*
  146. *&      Form  Change_buttons
  147. *&--------------------------------------------------------------------*
  148. *       text
  149. *---------------------------------------------------------------------*
  150. FORM change_buttons .
  151. * Kein Symbol für Drucken / Graphik / Info
  152.   ls_exclude = cl_gui_alv_grid=>mc_fc_print_back.
  153.   APPEND ls_exclude TO lt_exclude.
  154.   ls_exclude = cl_gui_alv_grid=>mc_fc_graph.
  155.   APPEND ls_exclude TO lt_exclude.
  156.   ls_exclude = cl_gui_alv_grid=>mc_fc_info.
  157.   APPEND ls_exclude TO lt_exclude.
  158.  
  159. ENDFORM.                    "Change_buttons
  160. *&--------------------------------------------------------------------*
  161. *&      Form  prepare_layout
  162. *&--------------------------------------------------------------------*
  163. *       text
  164. *---------------------------------------------------------------------*
  165. *      -->PS_LAYOUT  text
  166. *---------------------------------------------------------------------*
  167. FORM prepare_layout CHANGING ps_layout TYPE lvc_s_layo.
  168.   DATA rfctxt TYPE rfcdoc-rfcdoc1.
  169.  
  170.  
  171.   gs_layout-zebra = 'X' .
  172.   gs_layout-cwidth_opt ='X'.
  173.   gs_layout-numc_total = ' '.
  174.   gs_layout-no_merging = 'X'.
  175.   gs_layout-no_rowmark = ' '.
  176.   "gs_layout-sel_mode = 'A'.
  177.   gs_layout-edit = gv_edit.
  178.   gs_layout-edit_mode = 'X'.
  179.  
  180.   "ps_layout-ctab_fname = 'CELLCOLORS'." cellcolors
  181.  
  182.  
  183. *  ps_layout-grid_title = 'Flights' .
  184. *   ps_layout-smalltitle = 'X' .
  185. ENDFORM.                    "prepare_layout
  186. *&--------------------------------------------------------------------*
  187. *&      Form  handle_toolbar
  188. *&--------------------------------------------------------------------*
  189. *       text
  190. *---------------------------------------------------------------------*
  191. *      -->I_OBJECT   text
  192. *---------------------------------------------------------------------*
  193. FORM handle_toolbar USING i_object TYPE REF TO cl_alv_event_toolbar_set
  194. e_interactive .
  195.  
  196.   DATA: ls_toolbar TYPE stb_button.
  197.  
  198. * Seperator
  199.   CLEAR ls_toolbar.
  200.   MOVE 3 TO ls_toolbar-butn_type.
  201.   APPEND ls_toolbar TO i_object->mt_toolbar.
  202.  
  203. * Button Read/Edit
  204.   IF NOT  gv_allowedit IS INITIAL.
  205.     CLEAR ls_toolbar.
  206.     MOVE 'SWITCH_EDIT' TO ls_toolbar-function.              "#EC NOTEXT
  207.     MOVE icon_toggle_display_change TO ls_toolbar-icon.
  208.     MOVE 'Read/EditMode.'(200) TO ls_toolbar-quickinfo.
  209.     "MOVE ' TOGGLE Selection'(201) TO ls_toolbar-text.
  210.     MOVE ' ' TO ls_toolbar-disabled.                        "#EC NOTEXT
  211.     APPEND ls_toolbar TO i_object->mt_toolbar.
  212.   ENDIF.
  213.  
  214. *  Seperator
  215.   CLEAR ls_toolbar.
  216.   MOVE 3 TO ls_toolbar-butn_type.
  217.   APPEND ls_toolbar TO i_object->mt_toolbar.
  218.  
  219.   IF NOT gs_layout-edit IS INITIAL.
  220.  
  221. * Button PASTE Data from Clipboard
  222.     CLEAR ls_toolbar.
  223.     MOVE 'PASTE' TO ls_toolbar-function.                    "#EC NOTEXT
  224.     MOVE icon_system_paste TO ls_toolbar-icon.
  225.     MOVE 'Paste data from Clipboard'(201) TO ls_toolbar-quickinfo.
  226.     " MOVE ' Compare'(204) TO ls_toolbar-text.
  227.     MOVE ' ' TO ls_toolbar-disabled.                        "#EC NOTEXT
  228.     APPEND ls_toolbar TO i_object->mt_toolbar.
  229.  
  230. *  Seperator
  231.     CLEAR ls_toolbar.
  232.     MOVE 3 TO ls_toolbar-butn_type.
  233.     APPEND ls_toolbar TO i_object->mt_toolbar.
  234.  
  235.   ENDIF.
  236.  
  237. * Button COPY Data to Clipboard
  238.   CLEAR ls_toolbar.
  239.   MOVE 'COPY' TO ls_toolbar-function.                       "#EC NOTEXT
  240.   MOVE icon_copy_object TO ls_toolbar-icon.
  241.   MOVE 'Copy data to Clipboard'(202) TO ls_toolbar-quickinfo.
  242.   " MOVE ' Compare'(204) TO ls_toolbar-text.
  243.   MOVE ' ' TO ls_toolbar-disabled.                          "#EC NOTEXT
  244.   APPEND ls_toolbar TO i_object->mt_toolbar.
  245. ENDFORM .                    "handle_toolbar
  246.  
  247. *&---------------------------------------------------------------------*
  248. *&      Form  handle_user_command
  249. *&---------------------------------------------------------------------*
  250. *       text
  251. *----------------------------------------------------------------------*
  252.  
  253. FORM handle_user_command USING i_ucomm TYPE syucomm .
  254.   DATA lt_selected_rows TYPE lvc_t_roid .
  255.   DATA ls_selected_row TYPE lvc_s_roid .
  256.   DATA lv_name TYPE epsfili-name.
  257.   DATA lv_flag(1).
  258.   DATA lv_stable TYPE lvc_s_stbl.
  259.   DATA i TYPE i.
  260.   DATA lv_tit(80).
  261.  
  262.   CASE i_ucomm .
  263.     WHEN 'SWITCH_EDIT'.
  264.       IF gv_allowedit IS INITIAL.
  265.         gs_layout-edit = space.
  266.       ELSE.
  267.         IF gs_layout-edit = space.
  268.           gs_layout-edit = 'X'.
  269.         ELSE.
  270.           gs_layout-edit = space.
  271.         ENDIF.
  272.       ENDIF.
  273.  
  274.       "set_frontend_layout
  275.       CALL METHOD grid1->set_frontend_layout
  276.         EXPORTING
  277.           is_layout = gs_layout.
  278.  
  279.     WHEN 'PASTE'.
  280.  
  281.       REFRESH gt_clip_data[].
  282.       CALL METHOD cl_gui_frontend_services=>clipboard_import
  283.         IMPORTING
  284.           data                 = gt_clip_data[]
  285. *         length               =
  286.         EXCEPTIONS
  287.           cntl_error           = 1
  288.           error_no_gui         = 2
  289.           not_supported_by_gui = 3
  290.           OTHERS               = 4.
  291.       IF sy-subrc <> 0.
  292.       ENDIF.
  293.  
  294.       PERFORM create_itab_from_clip_board.
  295.  
  296.     WHEN 'COPY'.
  297.       REFRESH gt_clip_data.
  298.       PERFORM create_htab_itab .
  299.  
  300.       DATA lv_rc TYPE i.
  301.       CALL METHOD cl_gui_frontend_services=>clipboard_export
  302.         EXPORTING
  303.           no_auth_check        = 'X'
  304.         IMPORTING
  305.           data                 = gt_clip_data[]
  306.         CHANGING
  307.           rc                   = lv_rc
  308.         EXCEPTIONS
  309.           cntl_error           = 1
  310.           error_no_gui         = 2
  311.           not_supported_by_gui = 3
  312.           no_authority         = 4
  313.           OTHERS               = 5.
  314.       IF sy-subrc <> 0.
  315.       ENDIF.
  316.  
  317.  
  318.     WHEN OTHERS.
  319.   ENDCASE .
  320.  
  321.  
  322.   i = lines( <data> ).
  323.   WRITE i TO lv_tit.
  324.   CONDENSE lv_tit NO-GAPS.
  325.   CONCATENATE '/' lv_tit 'entries' INTO lv_tit SEPARATED BY space.
  326.   SET TITLEBAR 'AUSW' WITH lv_tit.
  327.  
  328.   lv_stable-row = 'X'.
  329.   CALL METHOD grid1->refresh_table_display
  330.     EXPORTING
  331.       is_stable = lv_stable
  332.     EXCEPTIONS
  333.       finished  = 1
  334.       OTHERS    = 2.
  335.  
  336. ENDFORM.                    "handle_user_command
  337.  
  338. *&--------------------------------------------------------------------*
  339. *&      Form  prepare_field_catalog
  340. *&--------------------------------------------------------------------*
  341. *       text
  342. *---------------------------------------------------------------------*
  343. *      -->PT_FIELDCATtext
  344. *---------------------------------------------------------------------*
  345. FORM prepare_field_catalog TABLES pt_fieldcat TYPE lvc_t_fcat .
  346.  
  347.   DATA ls_fcat TYPE lvc_s_fcat .
  348.  
  349.   CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
  350.     EXPORTING
  351.       i_structure_name       = gv_structure_name
  352.     CHANGING
  353.       ct_fieldcat            = pt_fieldcat[]
  354.     EXCEPTIONS
  355.       inconsistent_interface = 1
  356.       program_error          = 2
  357.       OTHERS                 = 3.
  358.  
  359.   IF sy-subrc <> 0.
  360. *--Exception handling
  361.   ENDIF.
  362.  
  363.  
  364. ENDFORM .                    "prepare_field_catalog
  365.  
  366. FORM create_htab_itab.
  367.   "gv_structure_name
  368.   DATA lv_query_table TYPE  dd02l-tabname.
  369.   DATA BEGIN OF table_structure OCCURS 10.
  370.           INCLUDE STRUCTURE dfies.
  371.   DATA END OF table_structure.
  372.   DATA table_type TYPE dd02v-tabclass.
  373.  
  374.   lv_query_table = gv_structure_name.
  375.  
  376.   CALL FUNCTION 'DDIF_FIELDINFO_GET'
  377.     EXPORTING
  378.       tabname        = lv_query_table
  379. *     FIELDNAME      = ' '
  380. *     LANGU          = SY-LANGU
  381. *     LFIELDNAME     = ' '
  382. *     ALL_TYPES      = ' '
  383. *     GROUP_NAMES    = ' '
  384.     IMPORTING
  385. *     X030L_WA       =
  386.       ddobjtype      = table_type
  387. *     DFIES_WA       =
  388. *     LINES_DESCR    =
  389.     TABLES
  390.       dfies_tab      = table_structure
  391. *     FIXED_VALUES   =
  392.     EXCEPTIONS
  393.       not_found      = 1
  394.       internal_error = 2
  395.       OTHERS         = 3.
  396.  
  397.  
  398.   DATA lv_res TYPE string.
  399.   FIELD-SYMBOLS <f> TYPE any.
  400.   DATA i TYPE i.
  401.  
  402.   i = lines( table_structure ).
  403.  
  404.   LOOP AT <data> INTO <dyn_rec>.
  405.  
  406.     CLEAR lv_res.
  407.     DO i TIMES.
  408.       ASSIGN COMPONENT sy-index OF STRUCTURE <dyn_rec> TO <f>.
  409.       CONCATENATE lv_res <f> INTO lv_res SEPARATED BY ht.
  410.     ENDDO.
  411.     SHIFT lv_res BY 1 PLACES LEFT.
  412.     gs_clip_data-wa = lv_res.
  413.     APPEND gs_clip_data TO gt_clip_data.
  414.  
  415.  
  416.  
  417.  
  418.  
  419. *&---------------------------------------------------------------------*
  420. *&      Form  create Structure / itab  dynamically
  421. *&---------------------------------------------------------------------*
  422. *       text
  423. *----------------------------------------------------------------------*
  424. FORM create_itab USING i_tdef TYPE dd02l-tabname .
  425.  
  426.   DATA:
  427.     l_ref_type_descr_ddic   TYPE REF TO cl_abap_typedescr,
  428.     l_ref_type_descr_line   TYPE REF TO cl_abap_typedescr,
  429.     l_ref_struct_descr_line TYPE REF TO cl_abap_structdescr,
  430.     l_tab_component         TYPE        cl_abap_structdescr=>component_table.
  431.  
  432.   DATA:
  433.     lop_tabledescr    TYPE REF TO cl_abap_tabledescr,
  434.     ldp_dynaic_record TYPE REF TO data,
  435.     ldp_dyn_table     TYPE REF TO data,
  436.     lop_strucdescr    TYPE REF TO cl_abap_structdescr.
  437.  
  438.  
  439.   l_ref_type_descr_ddic = cl_abap_typedescr=>describe_by_name( i_tdef ).
  440.   l_ref_struct_descr_line ?= l_ref_type_descr_ddic.
  441.   l_tab_component = l_ref_struct_descr_line->get_components( ).
  442.  
  443.   lop_strucdescr = cl_abap_structdescr=>create( l_tab_component ).
  444.   CREATE DATA ldp_dynaic_record TYPE HANDLE lop_strucdescr.
  445.  
  446.   lop_tabledescr ?= cl_abap_tabledescr=>create( p_line_type = lop_strucdescr ).
  447.   CREATE DATA ldp_dyn_table TYPE HANDLE lop_tabledescr.
  448.  
  449.   ASSIGN ldp_dynaic_record->* TO <dyn_rec>.
  450.   ASSIGN ldp_dyn_table->* TO <dyn_tab>.
  451.  
  452.  
  453.  
  454. FORM create_itab_from_clip_board.
  455.   DATA lt_tmp TYPE TABLE OF tab512.
  456.   DATA ls_tmp TYPE tab512.
  457.  
  458.   FIELD-SYMBOLS <f> TYPE any.
  459.  
  460.   REFRESH <dyn_tab>.
  461.   LOOP AT gt_clip_data INTO gs_clip_data.
  462.     SPLIT gs_clip_data AT ht INTO TABLE lt_tmp.
  463.     CLEAR <dyn_rec> .
  464.     LOOP AT lt_tmp INTO ls_tmp.
  465.       ASSIGN COMPONENT sy-tabix OF STRUCTURE <dyn_rec> TO <f>.
  466.       <f> = ls_tmp.
  467.     ENDLOOP.
  468.     APPEND <dyn_rec> TO <dyn_tab>.
  469.   <data>[] = <dyn_tab>[].
GeSHi ©


The TOP Include
Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. FUNCTION-POOL ZBCPOPUP.                     "MESSAGE-ID ..
  2.  
  3. * INCLUDE LZBCPOPUPD...                      " Local class definition
  4.  
  5. TABLES: sscrfields.
  6. TYPE-POOLS: icon,slis.
  7. * Tabellen der Varianten
  8. * ltdx
  9. * Ltdxd
  10. * Ltdxs
  11.  
  12.   ht(1)            VALUE %_horizontal_tab,
  13.   cr_lf(2)         VALUE %_cr_lf.
  14.   data gv_structure_name TYPE  dd02l-tabname.
  15.  
  16. * ALV Datenquelle DATA cellcolors TYPE lvc_t_scol .
  17. FIELD-SYMBOLS <data> type any TABLE.
  18. *FIELD-SYMBOLS <Clip_data> type any TABLE. ."table of ZSTRINGSTRUC." table of strings
  19. *FIELD-SYMBOLS <Clip_data_s> type ZSTRINGSTRUC-str."  strings
  20. FIELD-SYMBOLS <dyn_rec> type any.
  21. FIELD-SYMBOLS <dyn_tab> type INDEX TABLE.
  22. data gt_clip_data type table of ZTAB4000.
  23. data gs_clip_data type ZTAB4000.
  24.  
  25. DATA filter TYPE lvc_t_filt WITH HEADER LINE.
  26. * Grid Parameter
  27. DATA: ok_code          LIKE sy-ucomm,
  28.       g_container      TYPE scrfname VALUE 'GRID1',
  29.       grid1            TYPE REF TO cl_gui_alv_grid,
  30.       lo_split         TYPE REF TO cl_gui_splitter_container,
  31.       lo_container     TYPE REF TO cl_gui_container,
  32.       g_dock_container TYPE REF TO cl_gui_docking_container,
  33.       cl_gui_custom_container_obj TYPE REF TO cl_gui_custom_container.
  34.       "is_variant       TYPE disvariant.
  35.  
  36. *--- Field catalog table
  37. DATA gt_fieldcat TYPE lvc_t_fcat WITH HEADER LINE.
  38. *--- Layout structure
  39. DATA gs_layout TYPE lvc_s_layo .
  40.  
  41. * LT_EXCLUDE => Exclude Std. Buttons in toolbar
  42.  
  43. DATA: lt_exclude TYPE ui_functions,
  44.       ls_exclude TYPE ui_func.
  45.  
  46. data gv_edit(1) VALUE space." Status EdtitMode
  47. data gv_AllowEdit TYPE xfeld ." Status EdtitMode
  48.  
  49. DATA gv_title(80).
  50.  
  51.  
  52. *---------------------------------------------------------------------*
  53. *       CLASS lcl_event_handler DEFINITION
  54. *---------------------------------------------------------------------*
  55. *
  56. *---------------------------------------------------------------------*
  57. CLASS lcl_event_handler DEFINITION .
  58.   PUBLIC SECTION .
  59.     METHODS:
  60. *--To add new functional buttons to the ALV toolbar
  61.       handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
  62.         IMPORTING e_object e_interactive ,
  63.  
  64. *--To implement user commands
  65.       handle_user_command
  66.                     FOR EVENT user_command OF cl_gui_alv_grid
  67.         IMPORTING e_ucomm .
  68.  
  69.  
  70.   PRIVATE SECTION.
  71. ENDCLASS.                    "lcl_event_handler DEFINITION
  72.  
  73.  
  74.  
  75. *---------------------------------------------------------------------*
  76. *       CLASS lcl_event_handler IMPLEMENTATION
  77. *---------------------------------------------------------------------*
  78. *
  79. *---------------------------------------------------------------------*
  80. CLASS lcl_event_handler IMPLEMENTATION .
  81.  
  82. *--Handle Toolbar
  83.   METHOD handle_toolbar.
  84.     PERFORM handle_toolbar USING e_object e_interactive .
  85.   ENDMETHOD .                    "handle_toolbar
  86.  
  87. *--Handle User Command
  88.   METHOD handle_user_command .
  89.     PERFORM handle_user_command USING e_ucomm .
  90.   ENDMETHOD.                    "handle_user_command
  91.  
  92.  
  93.  
  94. ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
  95.  
  96. DATA gr_event_handler TYPE REF TO lcl_event_handler .
GeSHi ©


Caller Test
Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. *&---------------------------------------------------------------------*
  2. *& Report  ZTEST_Z_BC_ALV_POPUP
  3. *&
  4. *&---------------------------------------------------------------------*
  5. *&
  6. *&
  7. *&---------------------------------------------------------------------*
  8. REPORT ztest_z_bc_alv_popup.
  9.  
  10. DATA itab TYPE TABLE OF makt.
  11.  
  12. SELECT * FROM makt INTO TABLE itab.
  13.  
  14.  
  15. CALL FUNCTION 'Z_BC_ALV_POPUP'
  16.   EXPORTING
  17.     i_struc  = 'MAKT'
  18.     i_width  = '150'
  19.     i_height = '25'
  20.     I_EDIT   = 'X'
  21.   CHANGING
  22.     data     = itab.
GeSHi ©
Tron
.....
.....
 
Posts: 1112
Joined: Sat Aug 04, 2007 10:21 pm

Return to Code Snippets

Who is online

Users browsing this forum: No registered users and 1 guest

cron