自动创建成功的 TR 编号,存储在变量 LV_TRKORR
内。
*&---------------------------------------------------------------------*
*& Report P_SFT_CREATE_PROJECT
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT /SFT/P_SFT_CREATE_TR_PROJECT.
DATA:
LV_TRKORR TYPE TRKORR.
CALL FUNCTION 'TR_RFC_CREATE_PROJECT'
EXPORTING
IV_EXTERNALPS = 'SAP_CTS_AUXILIARY_PROJECT_SYSTEM'
IV_EXTERNALID = '0000000003'
IV_DESCRIPTION = 'Service Factory Tools Phase 1.2(SP09)'
IMPORTING
EV_TRKORR = LV_TRKORR
* ES_CTSPROJECT =
EXCEPTIONS
DB_ACCESS_ERROR = 1
INVALID_INPUT = 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.
ELSE.
WRITE:/ 'TRKORR', LV_TRKORR.
ENDIF.