如何通过T-Code 查询后台IMG路径 ?
ABAP Source Code as Below:
*----------------------------------------------------------------------
* Program ID/Name: ZW_ALV_GRID_STD Date Written: 2010.09.09
* Author's Name: Lilo.Zhu Last Update:
* Program Title:
* Project Name: ABAP Tools
* Version: 1.0
*----------------------------------------------------------------------
* Description: (Via T-Code Get IMG Menu Path.)
*----------------------------------------------------------------------
* Change History
*----------------------------------------------------------------------
* Date | Programmer | Corr. # | Description
* 2010.09.09 | Lilo.Zhu | | New Create
* | | |
* | | |
*-----------------------------------------------------------------------
REPORT ZW_TCODE_GET_IMG .
*------Data Define------
DATA: L_TCODE TYPE CUS_IMGACH-TCODE.
DATA: T_ACTIV TYPE STANDARD TABLE OF CUS_IMGACH WITH HEADER LINE.
DATA: T_ACTIV_X TYPE STANDARD TABLE OF CUS_IMGACH WITH HEADER LINE.
*DATA: BEGIN OF T_ACTIV OCCURS 0,
* INCLUDE LIKE CUS_IMGACH.
*DATA: END OF T_ACTIV.
*---SELECTION SCREEN---
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_TCODE TYPE SY-UCOMM.
SELECTION-SCREEN: END OF BLOCK B1.
START-OF-SELECTION.
PERFORM GET_IMG_ACTIV.
PERFORM DISP_IMG_ACTIV.
*&---------------------------------------------------------------------*
*& Form GET_IMG_ACTIV
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM GET_IMG_ACTIV .
CLEAR: L_TCODE,
T_ACTIV,
T_ACTIV[].
MOVE P_TCODE TO L_TCODE.
CALL FUNCTION 'S_CUS_IMG_ACTIVITY_GET_W_TCODE'
EXPORTING
TCODE = L_TCODE
TABLES
ACTIVITIES_FOUND = T_ACTIV
* EXCEPTIONS
* NO_TCODE_GIVEN = 1
* NOT_USED_IN_IMG_ACTIVITIES = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " GET_IMG_ACTIV
*&---------------------------------------------------------------------*
*& Form DISP_IMG_ACTIV
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM DISP_IMG_ACTIV .
IF NOT T_ACTIV[] IS INITIAL.
LOOP AT T_ACTIV.
WRITE: / T_ACTIV-ACTIVITY ,
T_ACTIV-DOCU_ID ,
T_ACTIV-ATTRIBUTES ,
T_ACTIV-C_ACTIVITY.
HIDE: T_ACTIV-ACTIVITY,
T_ACTIV-DOCU_ID ,
T_ACTIV-ATTRIBUTES ,
T_ACTIV-C_ACTIVITY.
ENDLOOP.
ELSE.
ENDIF.
ENDFORM. " DISP_IMG_ACTIV
AT LINE-SELECTION.
IF T_ACTIV-ACTIVITY NE ''.
CLEAR: T_ACTIV_X,
T_ACTIV_X[].
T_ACTIV_X = T_ACTIV.
APPEND T_ACTIV_X.
CALL FUNCTION 'S_CUS_IMG_ENTRY_VIA_ACTIVITY'
* EXPORTING
* USE_PROJECT_IMG = ' '
* PROJECT_NUMBER_OBLIGATORY = ' '
* USE_PROJECT_NUMBER = ' '
* SHOW_ALL_ENTRIES_AT_ONCE = ' '
* ACTIVITY = 'M'
* LANGUAGE = SY-LANGU
* IMPORTING
* ES_MESSAGE =
TABLES
IMG_ACTIVITIES = T_ACTIV_X
* DOCU_IDS =
* NODE_IDS =
* EXCEPTIONS
* NO_ACTIVITIES_GIVEN = 1
* NOT_FOUND_IN_IMG = 2
* NOT_FOUND_IN_PROJECT = 3
* OTHERS = 4
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.