【发布时间】:2017-06-21 02:02:23
【问题描述】:
我在我的 SAP 系统中没有任何开发人员权限,但我找到了一种方法可以在里面的一个小“用户退出”框(我不知道你是不是这么称呼它)中编写一些 ABAP 代码一份报告。
我正在尝试提交一份 HR 报告并将其输出的 PERNR 再次插入同一份报告中。
有一个语法错误告诉我t_list 没有名称为PERNR 的组件。
我必须做什么才能让它工作?
DATA: t_list TYPE TABLE OF abaplist WITH HEADER LINE,
seltab TYPE TABLE OF rsparams,
selline LIKE LINE OF seltab.
*I found out that the name of the selection field in the Report-GUI is "PNPPERNR" and tested it
selline-selname = 'PNPPERNR'.
selline-sign = 'I'.
selline-option = 'EQ'.
SUBMIT Y5000112
USING SELECTION-SET 'V1_TEST'
EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = t_list
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
WRITE 'Unable to get list from memory'.
ELSE.
LOOP AT t_list.
*The Problem is here: how do I get the pnppernr out of t_list, it's the first column of the report output
selline-low = t_list-pernr.
append selline to seltab.
ENDLOOP.
SUBMIT Y5000112
WITH SELECTION-TABLE seltab
USING SELECTION-SET 'V2_TEST'
AND RETURN.
ENDIF.
【问题讨论】:
标签: abap