Skip to Content
0
Former Member
Jul 31, 2009 at 08:35 AM

who can help me ,call function WSTN1_INFO_RECORD_BUILD error

34 Views

REPORT ZIFCCREATE.

DATA: M_MSG LIKE SMESG,

ES_INFO TYPE WSTN_INFO_RECORDS.

DATA:BEGIN OF ITAB1 OCCURS 0.

INCLUDE STRUCTURE WSTN_PP_PURCH.

DATA:END OF ITAB1.

ITAB1-PPNR = '000000001030000147'." 预包装物料的物料编号

ITAB1-EKORG = '1000'." EKORG CHAR 4 0 采购组织

ITAB1-WERKS = '1000'." EWERK CHAR 4 0 工厂

ITAB1-LIFNR = '0000200016'."LIFNR CHAR 10 0 供应商或债权人的帐号

ITAB1-ACTUAL_PR = '11' ."WSTN_ACTUAL_PR CURR 11 2 当前预包装采购价格

ITAB1-CALC_PR = '12'."WSTN_CALC_PR CURR 11 2 计算的预包装采购价格1

ITAB1-OVR_PR = '13'." WSTN_OVR_PR CURR 11 2 覆盖预包装采购价格

ITAB1-WAERS = 'CNY'."WAERS CUKY 5 0 货币码

ITAB1-FRC_RECALC = '14'." WSTN_FRC_RECALC CHAR 1 0 更新预包装采购价格

append ITAB1.

call FUNCTION 'WSTN1_INFO_RECORD_BUILD'

EXPORTING

IV_REFERENCE = '000000001030000147' "MARA-MATNR

IV_MATERIAL = '000000001030000147' "MARA-MATNR

IT_PP_PURCH = ITAB1"L_INFOR "WSTN_PP_PURCH_TAB

IMPORTING

  • ES_INFO_RECORDS = last_id "WSTN_INFO_RECORDS

ES_SMESG = M_MSG "SMESG

.

IF sy-subrc = 0.

WRITE /:'OK'.

ELSE.

WRITE /:'NO'.

ENDIF.