我目前在使用选择选项数据类型调用方法时遇到问题。它给了我错误:S_NETWR
is not type-compatible with form parameter IN_NETWR
。
我不确定我需要做什么才能将它们作为参数导出。抱歉,我是 ABAP 新手。任何帮助将不胜感激。
源代码片段:
"set the audit at $50,000
lv_max = 50000.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_netwr FOR ekpo-netwr,
s_datvr FOR nast-datvr NO INTERVALS.
SELECTION-SCREEN END OF BLOCK blk1.
*sets last run date from tvarvc
INITIALIZATION.
PERFORM get_lastrun.
CALL METHOD lcl_audit->get_po
EXPORTING
in_netwr = s_netwr
in_datvr = s_datvr
IMPORTING
out_po = it_po
.
get_po
我班上的方法zcl_audit_02
:
METHOD get_po.
SELECT DISTINCT ekko~ebeln ekpo~netwr ekko~lifnr ekko~ekorg
ekpo~werks ekko~ekgrp t024~eknam
FROM ( ekpo
INNER JOIN ekko
ON ekko~ebeln = ekpo~ebeln
INNER JOIN t024
ON ekko~ekgrp = t024~ekgrp
INNER JOIN nast
ON nast~objky = ekko~ebeln )
INTO TABLE out_po
WHERE ekpo~netwr = in_netwr
AND nast~datvr = in_datvr.
IF sy-subrc = 0.
SORT out_po BY ebeln ASCENDING.
ELSE.
MESSAGE 'No Purchase Orders Found' TYPE 'I'.
ENDIF.
ENDMETHOD.
先感谢您!