process-mining
2021.10
true
- 发行说明
- 入门指南
- 安装
- 配置
- 集成
- 身份验证
- Working with Apps and Discovery Accelerators
- AppOne 菜单和仪表板
- AppOne 设置
- TemplateOne 1.0.0 菜单和仪表板
- TemplateOne 1.0.0 设置
- TemplateOne menus and dashboards
- TemplateOne 2021.4.0 设置
- Purchase to Pay Discovery Accelerator 菜单和仪表板
- 购买到付款 Discovery Accelerator 设置
- Order to cash Discovery Accelerator 菜单和仪表板
- “订单到现金” Discovery Accelerator 设置
- Basic Connector for AppOne
- SAP Connectors
- 适用于 AppOne 的 SAP 订单到现金连接器
- 适用于 AppOne 的 SAP 采购到付款连接器
- SAP Connector for Purchase to Pay Discovery Accelerator
- SAP Connector for Order-to-Cash Discovery Accelerator
- Superadmin
- 仪表板和图表
- 表格和表格项目
- 应用程序完整性
- How to ....
- 使用 SQL 连接器
- Introduction to SQL connectors
- Setting up a SQL connector
- CData Sync extractions
- Running a SQL connector
- Editing transformations
- 释放 SQL 连接器
- Scheduling data extraction
- Structure of transformations
- Using SQL connectors for released apps
- Generating a cache with scripts
- Setting up a local test environment
- Separate development and production environments
- 实用资源
在 SAP 系统上安装 Z_XTRACT_IS_TABLE 功能模块
重要 :
请注意此内容已使用机器翻译进行了部分本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。
Process Mining
在 SAP 系统上安装 Z_XTRACT_IS_TABLE 功能模块
要使用 UiPath Process Mining中的原生 SAP 提取,您必须将
Z_XTRACT_IS_TABLE
函数模块添加到 SAP 系统。
注意:设置本机 SAP 提取时,需要 SAP
Z_XTRACT_IS_TABLE
函数模块。例如,如果在 SAP 系统中重命名了此函数模块,则可以在 SAP 连接字符串的 FunctionModule
参数(可选)中指定正确的名称。
注意: 建议添加新的功能组以添加功能模块。
请按照以下步骤添加新的函数组。
步骤 |
操作 |
---|---|
1 |
打开 SAP GUI。 |
2 |
在左上角的命令字段中输入
SE37 。
|
3 |
转到“ 转到 ”菜单,然后选择“ 函数组” ->“创建组”。 |
4 |
输入“函数”组的名称。 注意: 名称必须以
Z 开头,例如Z_PM_DATA_EXTRACTION 。
|
5 |
在“ 短文本 ” 字段中输入函数组的说明,例如 ProcessMining Data Extraction。 |
6 |
单击“保存”。 |
创建函数组后,您可以从 SE37 GUI 窗口添加函数模块。
请按照以下步骤安装 Z_XTRACT_IS_TABLE 函数模块。
步骤 |
操作 |
---|---|
1 |
在“ 函数模块 ” 字段中输入
Z_XTRACT_IS_TABLE ,然后单击“ 创建”。
|
2 |
转到“ 属性 ” 选项卡,然后在“ 处理类型 ” 选项列表中选择“远程启用的模块” 选项。 |
3 |
转到“ 导入 ” 选项卡并定义导入参数,如下所示。 注意: 您可能会收到
LIKE 运算符已过时的警告。 您可以忽略警告并浏览列表。 单击“ENTER”以确认您仍要使用它。 浏览整个列表后,系统将接受该代码。
|
4 |
转到“ 表格 ” 选项卡并定义表格参数,如下所示。 注意: 您可能会收到
LIKE 运算符已过时的警告。 您可以忽略警告并浏览列表。 单击“ENTER”以确认您仍要使用它。 浏览整个列表后,系统将接受该代码。
|
5 |
转到“ 异常 ” 选项卡以定义异常,如下所示。 |
6 |
转到“ 源代码 ” 选项卡,然后输入
Z_XTRACT_IS_TABLE 的ABAP 代码。
注意: 您可以复制并粘贴下面显示的代码。
|
7 |
保存“函数”模块并将其激活。 |
有关要粘贴到“ 源代码 ” 选项卡中的 ABAP 代码,请参见下面的代码文本。
FUNCTION Z_XTRACT_IS_TABLE.
*"
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(QUERY_TABLE) LIKE DD02L-TABNAME
*" VALUE(DELIMITER) LIKE SONV-FLAG DEFAULT SPACE
*" VALUE(NO_DATA) LIKE SONV-FLAG DEFAULT SPACE
*" VALUE(ROWSKIPS) LIKE SOID-ACCNT DEFAULT 0
*" VALUE(ROWCOUNT) LIKE SOID-ACCNT DEFAULT 0
*" TABLES
*" OPTIONS STRUCTURE RFC_DB_OPT
*" FIELDS STRUCTURE RFC_DB_FLD
*" DATA STRUCTURE CHAR8000
*" EXCEPTIONS
*" TABLE_NOT_AVAILABLE
*" TABLE_WITHOUT_DATA
*" OPTION_NOT_VALID
*" FIELD_NOT_VALID
*" NOT_AUTHORIZED
*" DATA_BUFFER_EXCEEDED
*"-------------------------------------------
"
CALL FUNCTION 'VIEW_AUTHORITY_CHECK'
EXPORTING
VIEW_ACTION = 'S'
VIEW_NAME = QUERY_TABLE
EXCEPTIONS
NO_AUTHORITY = 2
NO_CLIENTINDEPENDENT_AUTHORITY = 2
NO_LINEDEPENDENT_AUTHORITY = 2
OTHERS = 1.
IF SY-SUBRC = 2.
RAISE NOT_AUTHORIZED.
ELSEIF SY-SUBRC = 1.
RAISE TABLE_NOT_AVAILABLE.
ENDIF.
* --------------------------------------------
* find out about the structure of QUERY_TABLE
* --------------------------------------------
DATA BEGIN OF TABLE_STRUCTURE OCCURS 10.
INCLUDE STRUCTURE DFIES.
DATA END OF TABLE_STRUCTURE.
"DATA TABLE_HEADER LIKE X030L.
DATA TABLE_TYPE TYPE DD02V-TABCLASS.
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
TABNAME = QUERY_TABLE
* FIELDNAME = ' '
* LANGU = SY-LANGU
* LFIELDNAME = ' '
* ALL_TYPES = ' '
* GROUP_NAMES = ' '
IMPORTING
* X030L_WA =
DDOBJTYPE = TABLE_TYPE
* DFIES_WA =
* LINES_DESCR =
TABLES
DFIES_TAB = TABLE_STRUCTURE
* FIXED_VALUES =
EXCEPTIONS
NOT_FOUND = 1
INTERNAL_ERROR = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
RAISE TABLE_NOT_AVAILABLE.
ENDIF.
IF TABLE_TYPE = 'INTTAB'.
RAISE TABLE_WITHOUT_DATA.
ENDIF.
* -------------------------------------------
* isolate first field of DATA as output field
* (i.e. allow for changes to structure DATA!)
* -------------------------------------------
DATA LINE_LENGTH TYPE I.
FIELD-SYMBOLS <D>.
ASSIGN COMPONENT 0 OF STRUCTURE DATA TO <D>.
* If this line leads to a syntax error
* please just delete the 'in character mode'
DESCRIBE FIELD <D> LENGTH LINE_LENGTH in character mode.
* -------------------------------------------
* if FIELDS are not specified, read all available fields
* -------------------------------------------
DATA NUMBER_OF_FIELDS TYPE I.
DESCRIBE TABLE FIELDS LINES NUMBER_OF_FIELDS.
IF NUMBER_OF_FIELDS = 0.
LOOP AT TABLE_STRUCTURE.
MOVE TABLE_STRUCTURE-FIELDNAME TO FIELDS-FIELDNAME.
APPEND FIELDS.
ENDLOOP.
ENDIF.
* -------------------------------------------
* for each field which has to be read, copy structure information
* into tables FIELDS_INT (internal use) and FIELDS (output)
* -------------------------------------------
DATA: BEGIN OF FIELDS_INT OCCURS 10,
FIELDNAME LIKE TABLE_STRUCTURE-FIELDNAME,
TYPE LIKE TABLE_STRUCTURE-INTTYPE,
DECIMALS LIKE TABLE_STRUCTURE-DECIMALS,
LENGTH_SRC LIKE TABLE_STRUCTURE-INTLEN,
LENGTH_DST LIKE TABLE_STRUCTURE-LENG,
OFFSET_SRC LIKE TABLE_STRUCTURE-OFFSET,
OFFSET_DST LIKE TABLE_STRUCTURE-OFFSET,
END OF FIELDS_INT,
LINE_CURSOR TYPE I.
LINE_CURSOR = 0.
* for each field which has to be read ...
LOOP AT FIELDS.
READ TABLE TABLE_STRUCTURE WITH KEY FIELDNAME = FIELDS-FIELDNAME.
IF SY-SUBRC NE 0.
RAISE FIELD_NOT_VALID.
ENDIF.
* compute the place for field contents in DATA rows:
* if not first field in row, allow space for delimiter
IF LINE_CURSOR <> 0.
IF NO_DATA EQ SPACE AND DELIMITER NE SPACE.
MOVE DELIMITER TO DATA+LINE_CURSOR.
ENDIF.
LINE_CURSOR = LINE_CURSOR + STRLEN( DELIMITER ).
ENDIF.
* ... copy structure information into tables FIELDS_INT
* (which is used internally during SELECT) ...
FIELDS_INT-FIELDNAME = TABLE_STRUCTURE-FIELDNAME.
FIELDS_INT-LENGTH_SRC = TABLE_STRUCTURE-INTLEN.
* FIELDS_INT-LENGTH_DST = TABLE_STRUCTURE-LENG.
* modified by Theobald, 2007-11-20
FIELDS_INT-LENGTH_DST = TABLE_STRUCTURE-OUTPUTLEN.
FIELDS_INT-OFFSET_SRC = TABLE_STRUCTURE-OFFSET.
FIELDS_INT-OFFSET_DST = LINE_CURSOR.
FIELDS_INT-TYPE = TABLE_STRUCTURE-INTTYPE.
FIELDS_INT-DECIMALS = TABLE_STRUCTURE-DECIMALS.
* compute the place for contents of next field in DATA rows
* LINE_CURSOR = LINE_CURSOR + TABLE_STRUCTURE-LENG.
* modified by Theobald, 2007-11-20
LINE_CURSOR = LINE_CURSOR + TABLE_STRUCTURE-OUTPUTLEN.
IF LINE_CURSOR > LINE_LENGTH AND NO_DATA EQ SPACE.
RAISE DATA_BUFFER_EXCEEDED.
ENDIF.
APPEND FIELDS_INT.
* ... and into table FIELDS (which is output to the caller)
FIELDS-FIELDTEXT = TABLE_STRUCTURE-FIELDTEXT.
FIELDS-TYPE = TABLE_STRUCTURE-INTTYPE.
FIELDS-LENGTH = FIELDS_INT-LENGTH_DST.
FIELDS-OFFSET = FIELDS_INT-OFFSET_DST.
MODIFY FIELDS.
ENDLOOP.
* end of loop at FIELDS
* -------------------------------------------
* read data from the database and copy relevant portions into DATA
* -------------------------------------------
* output data only if NO_DATA equals space (otherwise the structure
* information in FIELDS is the only result of the module)
IF NO_DATA EQ SPACE.
DATA: BEGIN OF WORK, BUFFER(30000), F TYPE F, END OF WORK.
FIELD-SYMBOLS: <WA> TYPE ANY, <COMP> TYPE ANY.
ASSIGN WORK TO <WA> CASTING TYPE (QUERY_TABLE).
IF ROWCOUNT > 0.
ROWCOUNT = ROWCOUNT + ROWSKIPS.
ENDIF.
SELECT * FROM (QUERY_TABLE) INTO <WA> WHERE (OPTIONS).
IF SY-DBCNT GT ROWSKIPS.
* copy all relevant fields into DATA (output) table
LOOP AT FIELDS_INT.
IF FIELDS_INT-TYPE = 'P'.
ASSIGN COMPONENT FIELDS_INT-FIELDNAME
OF STRUCTURE <WA> TO <COMP>
TYPE FIELDS_INT-TYPE
DECIMALS FIELDS_INT-DECIMALS.
ELSE.
ASSIGN COMPONENT FIELDS_INT-FIELDNAME
OF STRUCTURE <WA> TO <COMP>
TYPE FIELDS_INT-TYPE.
ENDIF.
MOVE <COMP> TO
<D>+FIELDS_INT-OFFSET_DST(FIELDS_INT-LENGTH_DST).
ENDLOOP.
* end of loop at FIELDS_INT
APPEND DATA.
IF ROWCOUNT > 0 AND SY-DBCNT GE ROWCOUNT. EXIT. ENDIF.
ENDIF.
ENDSELECT.
ENDIF.
ENDFUNCTION.
FUNCTION Z_XTRACT_IS_TABLE.
*"
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(QUERY_TABLE) LIKE DD02L-TABNAME
*" VALUE(DELIMITER) LIKE SONV-FLAG DEFAULT SPACE
*" VALUE(NO_DATA) LIKE SONV-FLAG DEFAULT SPACE
*" VALUE(ROWSKIPS) LIKE SOID-ACCNT DEFAULT 0
*" VALUE(ROWCOUNT) LIKE SOID-ACCNT DEFAULT 0
*" TABLES
*" OPTIONS STRUCTURE RFC_DB_OPT
*" FIELDS STRUCTURE RFC_DB_FLD
*" DATA STRUCTURE CHAR8000
*" EXCEPTIONS
*" TABLE_NOT_AVAILABLE
*" TABLE_WITHOUT_DATA
*" OPTION_NOT_VALID
*" FIELD_NOT_VALID
*" NOT_AUTHORIZED
*" DATA_BUFFER_EXCEEDED
*"-------------------------------------------
"
CALL FUNCTION 'VIEW_AUTHORITY_CHECK'
EXPORTING
VIEW_ACTION = 'S'
VIEW_NAME = QUERY_TABLE
EXCEPTIONS
NO_AUTHORITY = 2
NO_CLIENTINDEPENDENT_AUTHORITY = 2
NO_LINEDEPENDENT_AUTHORITY = 2
OTHERS = 1.
IF SY-SUBRC = 2.
RAISE NOT_AUTHORIZED.
ELSEIF SY-SUBRC = 1.
RAISE TABLE_NOT_AVAILABLE.
ENDIF.
* --------------------------------------------
* find out about the structure of QUERY_TABLE
* --------------------------------------------
DATA BEGIN OF TABLE_STRUCTURE OCCURS 10.
INCLUDE STRUCTURE DFIES.
DATA END OF TABLE_STRUCTURE.
"DATA TABLE_HEADER LIKE X030L.
DATA TABLE_TYPE TYPE DD02V-TABCLASS.
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
TABNAME = QUERY_TABLE
* FIELDNAME = ' '
* LANGU = SY-LANGU
* LFIELDNAME = ' '
* ALL_TYPES = ' '
* GROUP_NAMES = ' '
IMPORTING
* X030L_WA =
DDOBJTYPE = TABLE_TYPE
* DFIES_WA =
* LINES_DESCR =
TABLES
DFIES_TAB = TABLE_STRUCTURE
* FIXED_VALUES =
EXCEPTIONS
NOT_FOUND = 1
INTERNAL_ERROR = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
RAISE TABLE_NOT_AVAILABLE.
ENDIF.
IF TABLE_TYPE = 'INTTAB'.
RAISE TABLE_WITHOUT_DATA.
ENDIF.
* -------------------------------------------
* isolate first field of DATA as output field
* (i.e. allow for changes to structure DATA!)
* -------------------------------------------
DATA LINE_LENGTH TYPE I.
FIELD-SYMBOLS <D>.
ASSIGN COMPONENT 0 OF STRUCTURE DATA TO <D>.
* If this line leads to a syntax error
* please just delete the 'in character mode'
DESCRIBE FIELD <D> LENGTH LINE_LENGTH in character mode.
* -------------------------------------------
* if FIELDS are not specified, read all available fields
* -------------------------------------------
DATA NUMBER_OF_FIELDS TYPE I.
DESCRIBE TABLE FIELDS LINES NUMBER_OF_FIELDS.
IF NUMBER_OF_FIELDS = 0.
LOOP AT TABLE_STRUCTURE.
MOVE TABLE_STRUCTURE-FIELDNAME TO FIELDS-FIELDNAME.
APPEND FIELDS.
ENDLOOP.
ENDIF.
* -------------------------------------------
* for each field which has to be read, copy structure information
* into tables FIELDS_INT (internal use) and FIELDS (output)
* -------------------------------------------
DATA: BEGIN OF FIELDS_INT OCCURS 10,
FIELDNAME LIKE TABLE_STRUCTURE-FIELDNAME,
TYPE LIKE TABLE_STRUCTURE-INTTYPE,
DECIMALS LIKE TABLE_STRUCTURE-DECIMALS,
LENGTH_SRC LIKE TABLE_STRUCTURE-INTLEN,
LENGTH_DST LIKE TABLE_STRUCTURE-LENG,
OFFSET_SRC LIKE TABLE_STRUCTURE-OFFSET,
OFFSET_DST LIKE TABLE_STRUCTURE-OFFSET,
END OF FIELDS_INT,
LINE_CURSOR TYPE I.
LINE_CURSOR = 0.
* for each field which has to be read ...
LOOP AT FIELDS.
READ TABLE TABLE_STRUCTURE WITH KEY FIELDNAME = FIELDS-FIELDNAME.
IF SY-SUBRC NE 0.
RAISE FIELD_NOT_VALID.
ENDIF.
* compute the place for field contents in DATA rows:
* if not first field in row, allow space for delimiter
IF LINE_CURSOR <> 0.
IF NO_DATA EQ SPACE AND DELIMITER NE SPACE.
MOVE DELIMITER TO DATA+LINE_CURSOR.
ENDIF.
LINE_CURSOR = LINE_CURSOR + STRLEN( DELIMITER ).
ENDIF.
* ... copy structure information into tables FIELDS_INT
* (which is used internally during SELECT) ...
FIELDS_INT-FIELDNAME = TABLE_STRUCTURE-FIELDNAME.
FIELDS_INT-LENGTH_SRC = TABLE_STRUCTURE-INTLEN.
* FIELDS_INT-LENGTH_DST = TABLE_STRUCTURE-LENG.
* modified by Theobald, 2007-11-20
FIELDS_INT-LENGTH_DST = TABLE_STRUCTURE-OUTPUTLEN.
FIELDS_INT-OFFSET_SRC = TABLE_STRUCTURE-OFFSET.
FIELDS_INT-OFFSET_DST = LINE_CURSOR.
FIELDS_INT-TYPE = TABLE_STRUCTURE-INTTYPE.
FIELDS_INT-DECIMALS = TABLE_STRUCTURE-DECIMALS.
* compute the place for contents of next field in DATA rows
* LINE_CURSOR = LINE_CURSOR + TABLE_STRUCTURE-LENG.
* modified by Theobald, 2007-11-20
LINE_CURSOR = LINE_CURSOR + TABLE_STRUCTURE-OUTPUTLEN.
IF LINE_CURSOR > LINE_LENGTH AND NO_DATA EQ SPACE.
RAISE DATA_BUFFER_EXCEEDED.
ENDIF.
APPEND FIELDS_INT.
* ... and into table FIELDS (which is output to the caller)
FIELDS-FIELDTEXT = TABLE_STRUCTURE-FIELDTEXT.
FIELDS-TYPE = TABLE_STRUCTURE-INTTYPE.
FIELDS-LENGTH = FIELDS_INT-LENGTH_DST.
FIELDS-OFFSET = FIELDS_INT-OFFSET_DST.
MODIFY FIELDS.
ENDLOOP.
* end of loop at FIELDS
* -------------------------------------------
* read data from the database and copy relevant portions into DATA
* -------------------------------------------
* output data only if NO_DATA equals space (otherwise the structure
* information in FIELDS is the only result of the module)
IF NO_DATA EQ SPACE.
DATA: BEGIN OF WORK, BUFFER(30000), F TYPE F, END OF WORK.
FIELD-SYMBOLS: <WA> TYPE ANY, <COMP> TYPE ANY.
ASSIGN WORK TO <WA> CASTING TYPE (QUERY_TABLE).
IF ROWCOUNT > 0.
ROWCOUNT = ROWCOUNT + ROWSKIPS.
ENDIF.
SELECT * FROM (QUERY_TABLE) INTO <WA> WHERE (OPTIONS).
IF SY-DBCNT GT ROWSKIPS.
* copy all relevant fields into DATA (output) table
LOOP AT FIELDS_INT.
IF FIELDS_INT-TYPE = 'P'.
ASSIGN COMPONENT FIELDS_INT-FIELDNAME
OF STRUCTURE <WA> TO <COMP>
TYPE FIELDS_INT-TYPE
DECIMALS FIELDS_INT-DECIMALS.
ELSE.
ASSIGN COMPONENT FIELDS_INT-FIELDNAME
OF STRUCTURE <WA> TO <COMP>
TYPE FIELDS_INT-TYPE.
ENDIF.
MOVE <COMP> TO
<D>+FIELDS_INT-OFFSET_DST(FIELDS_INT-LENGTH_DST).
ENDLOOP.
* end of loop at FIELDS_INT
APPEND DATA.
IF ROWCOUNT > 0 AND SY-DBCNT GE ROWCOUNT. EXIT. ENDIF.
ENDIF.
ENDSELECT.
ENDIF.
ENDFUNCTION.
粘贴 ABAP 代码后,建议在激活函数模块之前检查代码是否存在语法错误。