Quantcast
Channel: SCN : Popular Discussions - ABAP和Java开发 (ABAP & Java Development)
Viewing all articles
Browse latest Browse all 4604

提示 对采购订单无收货可能

$
0
0

各位专家: 我在用 BAPI收货的时候。提示 采购订单无收货可能 ,可是我用 MIGO做收货就能过去。可能错误在哪里呢??

我调用BAPI 的代码如下:

 

        • 开始创建101的正式订单的到货。

c_goodsmvt_code = '01'.

 

    *

          o

                + 抬头信息

 

CLEAR: GOODSMVT_H101.

READ TABLE GOODSMVT_H101 WITH KEY MAT_DOC = TEMP_101-MBLNR.

 

IF SY-SUBRC 0 .

CONCATENATE '发生严重错误。没有发现凭证' TEMP_101-MBLNR '抬头信息' INTO FMESSAGE.

MESSAGE E000(26) WITH FMESSAGE.

EXIT.

ENDIF.

****抬头数据赋值

 

ln_goodsmvt_header-pstng_date = CURDATE.

ln_goodsmvt_header-doc_date = SY-DATUM.

ln_goodsmvt_header-PR_UNAME = SY-UNAME.

ln_goodsmvt_header-REF_DOC_NO = GOODSMVT_H101-REF_DOC_NO. "到货单号

ln_goodsmvt_header-HEADER_TXT = GOODSMVT_H101-HEADER_TXT. "抬头文本

 

    *

          o

                +

                      #

                             

  • 明细数据赋值

 

CLEAR: GOODSMVT_D101.

READ TABLE GOODSMVT_D101 WITH KEY MAT_DOC = TEMP_101-MBLNR.

 

MOVE-CORRESPONDING GOODSMVT_D101 TO it_goodsmvt_item.

MOVE WA_HEAD-EBELN2 TO it_goodsmvt_item-PO_NUMBER.

MOVE WA_HEAD-EBELp9 TO it_goodsmvt_item-PO_ITEM.

APPEND it_goodsmvt_item.

 

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

goodsmvt_header = ln_goodsmvt_header

goodsmvt_code = c_goodsmvt_code

IMPORTING

goodsmvt_headret = goodsmvt_headret

TABLES

goodsmvt_item = it_goodsmvt_item

goodsmvt_serialnumber = it_goodsmvt_serialnumber

RETURN = it_return.

 

CURDATE 取的是当前日期

是不是我的值给的有问题?? 看谁遇到过这个问题??


Viewing all articles
Browse latest Browse all 4604

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>