REPORT zos_test.
DATA : gs_rs38m TYPE rs38m.
DATA : gs_textpool TYPE textpool.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
SELECT-OPTIONS :
s_prog FOR gs_rs38m-programm NO INTERVALS NO-EXTENSION OBLIGATORY,
s_langu FOR sy-langu NO INTERVALS NO-EXTENSION DEFAULT 'EN',
s_search FOR gs_textpool-entry NO INTERVALS NO-EXTENSION .
SELECTION-SCREEN END OF BLOCK b1.
*----------------------------------------------------------------------*
* CLASS cl_txt_symbol_finder DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS cl_txt_symbol_finder DEFINITION FINAL.
PUBLIC SECTION.
METHODS : get_data ,
alv_setup,
display_alv.
PRIVATE SECTION.
TYPES : BEGIN OF gty_s_tadir,
pgmid TYPE tadir-pgmid ,
object TYPE tadir-object ,
obj_name TYPE tadir-obj_name,
END OF gty_s_tadir.
TYPES : BEGIN OF gty_s_final,
programm TYPE rs38m-programm,
key TYPE textpool-key,
entry TYPE textpool-entry,
END OF gty_s_final.
DATA: gt_texttab TYPE TABLE OF textpool .
DATA: gs_texttab TYPE textpool .
DATA : gs_tadir TYPE gty_s_tadir,
gt_tadir TYPE SORTED TABLE OF gty_s_tadir WITH UNIQUE KEY pgmid
object obj_name.
DATA : gs_final TYPE gty_s_final,
gt_final TYPE TABLE OF gty_s_final.
DATA : gr_cust_container TYPE REF TO cl_gui_custom_container,
gr_alv_grid TYPE REF TO cl_gui_alv_grid.
DATA : gs_fcat_lvc TYPE lvc_s_fcat,
gt_fcat_lvc TYPE lvc_t_fcat.
ENDCLASS. "cl_txt_symbol_finder DEFINITION
*----------------------------------------------------------------------*
* CLASS cl_txt_symbol_finder IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS cl_txt_symbol_finder IMPLEMENTATION.
METHOD get_data.
CLEAR gt_tadir.
SELECT pgmid
object
obj_name
FROM tadir
INTO TABLE gt_tadir
WHERE obj_name IN s_prog
AND pgmid = 'R3TR'.
LOOP AT gt_tadir INTO gs_tadir.
gs_rs38m-programm = gs_tadir-obj_name.
READ TEXTPOOL gs_rs38m-programm LANGUAGE s_langu-low INTO gt_texttab
STATE 'A'.
LOOP AT gt_texttab INTO gs_texttab
WHERE id = 'I' AND entry CS s_search-low.
gs_final-programm = gs_tadir-obj_name.
gs_final-key = gs_texttab-key.
gs_final-entry = gs_texttab-entry.
APPEND gs_final TO gt_final.
CLEAR :gs_texttab,gs_final.
ENDLOOP.
CLEAR gs_tadir.
ENDLOOP.
ENDMETHOD. "get_data
METHOD alv_setup.
CREATE OBJECT gr_cust_container
EXPORTING
* PARENT =
container_name = 'CC_ALV'.
CREATE OBJECT gr_alv_grid
EXPORTING
i_parent = gr_cust_container.
gs_fcat_lvc-fieldname = 'PROGRAMM'.
gs_fcat_lvc-tabname = 'GT_FINAL'.
gs_fcat_lvc-scrtext_s =
gs_fcat_lvc-scrtext_m =
gs_fcat_lvc-scrtext_l = 'Program'(001).
APPEND gs_fcat_lvc TO gt_fcat_lvc.
gs_fcat_lvc-fieldname = 'KEY'.
gs_fcat_lvc-tabname = 'GT_FINAL'.
gs_fcat_lvc-scrtext_s =
gs_fcat_lvc-scrtext_m =
gs_fcat_lvc-scrtext_l = 'Key'(002).
APPEND gs_fcat_lvc TO gt_fcat_lvc.
gs_fcat_lvc-fieldname = 'ENTRY'.
gs_fcat_lvc-tabname = 'GT_FINAL'.
gs_fcat_lvc-scrtext_s =
gs_fcat_lvc-scrtext_m =
gs_fcat_lvc-scrtext_l = 'Entry'(003).
APPEND gs_fcat_lvc TO gt_fcat_lvc.
ENDMETHOD. "alv_setup
METHOD display_alv.
CALL METHOD gr_alv_grid->set_table_for_first_display
CHANGING
it_outtab = gt_final[]
it_fieldcatalog = gt_fcat_lvc.
ENDMETHOD. "display_alv
ENDCLASS. "cl_txt_symbol_finder IMPLEMENTATION
START-OF-SELECTION.
DATA gr_txt_finder TYPE REF TO cl_txt_symbol_finder.
CREATE OBJECT gr_txt_finder.
CALL METHOD gr_txt_finder->get_data.
CALL METHOD gr_txt_finder->alv_setup.
CALL METHOD gr_txt_finder->display_alv.
CALL SCREEN 0100.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |