1944211 - BAPI_GOODSMVT_CREATE: 262; Planned reversal and order update

Symptom

Movement type 262 is replaced by 261 when using BAPI BAPI_GOODSMVT_CREATE.

Environment

Materials Management (MM)

  • SAP R/3
  • SAP R/3 Enterprise 4.7
  • SAP ERP Core Component
  • SAP ERP
  • SAP enhancement package for SAP ERP
  • SAP enhancement package for SAP ERP, version for SAP HANA

Reproducing the Issue

  1. Post a reversal movement 262 against an Order with the BAPI BAPI_GOODSMVT_CREATE.
  2. Specify the two fields RESERV_NO and RES_ITEM in the table GOODSMVT_ITEM as mentioned in the KBA 1944210.
  3. In the resulting material document you see that the system has replaced the movement 262 by the 261.

Cause

When the system reads the reservation, it takes the movement type from it.

In this way the system replaces the movement type 262 that we specify in the BAPI with the movement type 261 in the reservation item.

Resolution

Specify the data as follows in the Table GOODSMVT_ITEM:

MOVE_TYPE = 261
XSTOB         = X

The field XSTOB = X indicates that this is a reversal movement. Then the system will post the reversal movement 262 with such a setting.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
BAPI_GOODSMVT_CREATE是一个用于生成物料凭证的BAPI。它有多个参数需要提供值,其中包括goodsmvt_header、goodsmvt_code和gt_good等。\[2\]在调用该BAPI时,需要将这些参数赋予相应的值。goodsmvt_header用于存储过账日期、操作者和抬头文本等抬头数据,goodsmvt_code用于指定使用的过账事务码。gt_good是一个重要的表,用于存储要进行货物移动的物料、数量等信息。调用BAPI后,可以通过返回参数goodsmvt_headret获取物料凭证编号和年份。\[2\] 以下是一个示例代码,展示了如何使用BAPI_GOODSMVT_CREATE进行物料凭证的生成: ```ABAP DATA: goodsmvt_header TYPE bapi2017_gm_head_01, goodsmvt_code TYPE bapi2017_gm_code, gt_good TYPE TABLE OF bapi2017_gm_item_create, gw_good TYPE bapi2017_gm_item_create, goodsmvt_headret TYPE bapi2017_gm_head_ret, return LIKE TABLE OF bapiret2 WITH HEADER LINE, materialdocument TYPE bapi2017_gm_head_ret-mat_doc, matdocumentyear TYPE bapi2017_gm_head_ret-doc_year, ev_msgty TYPE BAPI_MTYPE, ev_mestx TYPE BAPI_MSG. "设置好goodsmvt_header、goodsmvt_code和gt_good的值 CALL FUNCTION 'BAPI_GOODSMVT_CREATE' EXPORTING goodsmvt_header = goodsmvt_header goodsmvt_code = goodsmvt_code TABLES goodsmvt_item = gt_good IMPORTING goodsmvt_headret = goodsmvt_headret materialdocument = materialdocument matdocumentyear = matdocumentyear return = return. "处理返回的日志消息 LOOP AT return WHERE type = 'A' OR type = 'E'. ev_msgty = 'E'. ev_mestx = return-message. EXIT. ENDLOOP. ``` 以上是一个示例代码,展示了如何使用BAPI_GOODSMVT_CREATE进行物料凭证的生成。你可以根据自己的需求,设置相应的参数值,并根据返回的日志消息进行处理。\[2\]\[3\] #### 引用[.reference_title] - *1* *2* *3* [金色传说:SAP-BAPI-BAPI_GOODSMVT_CREATE创建物料凭证bapi的使用及参数值讲解](https://blog.csdn.net/weixin_43675474/article/details/122258115)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值