/
ALV Grid in Detail View
ALV Grid in Detail View
This exit can be used to display individual additional information in the detail section of the workflow monitor.
Location for activation
TM Server
Template Report
/RTC/TM_TABSTRIP_TEMPLATE
Interface
Import Parameters
Field | TYPE | Description |
---|---|---|
GV_TRKORR | /RTC/TM_REQ-TRKORR | Transport Request |
Example
Beside TransportManager, the customer is also using SyncAssist and is using an integration between the 2 products. ! part of the integration is, that all messages, returned by the synchronization process should be displayed in the detailed section of the maintenance request…
Step 1 | Copy report /RTC/TM_TABSTRIP_TEMPLATE to a new report |
Add the following code:
*&---------------------------------------------------------------------*
*& Report /RTC/TM_TABSTRIP_TEMPLATE *
*& *
*&---------------------------------------------------------------------*
*& *
*& You can use this report as a template to implement own tab strips *
*& in the detail view of the Workflow Monitor *
*& Instructions: *
*& - Screen type must me "subscreen" *
*& - Import the request number form memory with the id "TRKORR" *
*& *
*&---------------------------------------------------------------------*
REPORT /rtc/tm_tabstrip_template.
* §1 Global data declarations
DATA: gv_trkorr TYPE /rtc/tm_req-trkorr.
DATA: g_container TYPE scrfname VALUE 'GV_MESSLOG',
msg_grid TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container.
* §2 Call Subscreen
* Important: Screen type must be "Subscreen"
CALL SCREEN 0100.
*&---------------------------------------------------------------------*
*& Module INIT_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE init_0100 OUTPUT.
* §3 Get request number from memory
* Do not change this line
IMPORT trkorr TO gv_trkorr FROM MEMORY ID 'TRKORR'.
* §4 Customer implementation
DATA: lv_langu TYPE t100-sprsl.
DATA: lv_message TYPE t100-text.
DATA: lw_prot_tab TYPE /rtc/sa_prot_tab.
DATA: lt_mess_tab TYPE TABLE OF /rtc/sa_mess_tab,
lw_mess_tab TYPE /rtc/sa_mess_tab.
DATA: lt_prot_tab TYPE TABLE OF /rtc/sa_prot_tab.
lv_langu = sy-langu.
REFRESH: lt_mess_tab, lt_prot_tab.
SELECT * FROM /rtc/sa_mess_tab INTO TABLE lt_mess_tab
WHERE trkorr = gv_trkorr ORDER BY msgcnt descending.
LOOP AT lt_mess_tab INTO lw_mess_tab.
CALL FUNCTION 'TRINT_GET_T100_FROM_BUFFER'
EXPORTING
iv_sprsl = lv_langu
iv_arbgb = lw_mess_tab-msgid
iv_msgnr = lw_mess_tab-msgnr
IMPORTING
ev_text = lv_message.
lw_prot_tab-line = lv_message.
CALL FUNCTION 'TRINT_PUT_VARS_INTO_LINE'
EXPORTING
iv_line = lw_prot_tab-line
iv_var1 = lw_mess_tab-msgv1
iv_var2 = lw_mess_tab-msgv2
iv_var3 = lw_mess_tab-msgv3
iv_var4 = lw_mess_tab-msgv4
iv_with_sep = ' '
iv_condense_vars = ' '
IMPORTING
ev_line = lw_prot_tab-line.
lw_prot_tab-as4date = lw_mess_tab-as4date.
lw_prot_tab-as4time = lw_mess_tab-as4time.
APPEND lw_prot_tab TO lt_prot_tab.
ENDLOOP.
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
CREATE OBJECT msg_grid
EXPORTING i_parent = g_custom_container.
ENDIF.
CALL METHOD msg_grid->set_table_for_first_display
EXPORTING i_structure_name = '/RTC/SA_PROT_TAB'
CHANGING it_outtab = lt_prot_tab.
*....
ENDMODULE. " INIT_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
* §5 Customer implementation
CALL METHOD cl_gui_cfw=>dispatch.
ENDMODULE. " USER_COMMAND_0100 INPUT