前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >如何避免SAP订单保存后生成的中间件CSA inbound queue

如何避免SAP订单保存后生成的中间件CSA inbound queue

作者头像
Jerry Wang
发布2020-08-17 19:49:34
2820
发布2020-08-17 19:49:34
举报

By default after a service order is saved, there is a distribution lock set, which prevents you from editing this order in status transferring. Click edit button you will meet with error message below until it has successfully been transferred.

In blog Regarding Service Order distribution lock and status I introduce the step how to avoid this distribution lock. Nevertheless there is still BDOC and an inbound CSA queue automatically generated. The purpose of CSA queue has already been well explained by Rohit Sharma in this thread:

In case you really would like that for a given transaction type, no BDOC and inbound CSA queue should be generated for whatever reasons, you can suppress this behavior by enhancement on function module CRM_ORDER_SAVE_OW.

In this function module, the BDOC and CSA queue will be created by function module CRM_ORDER_UPLOAD_SINGLE only when ALL the THREE condition in IF are fulfilled. The second condition, lv_send_bdoc is controlled by a switch.

So the solution would be: Create a new enhancement on function module CRM_ORDER_SAVE_OW:

Insert one line below:

Suppose you would like that for transaction type ZSRV, no BDOC should be generated, then the source code of run method:

代码语言:javascript
复制
METHOD run.
    DATA lv_process_type    TYPE crmt_process_type.

    LOOP AT it_object_list ASSIGNING FIELD-SYMBOL(<guid>).
      CALL FUNCTION 'CRM_ORDERADM_H_READ_OW'
        EXPORTING
          iv_orderadm_h_guid     = <guid>
        IMPORTING
          ev_process_type        = lv_process_type
        EXCEPTIONS
          admin_header_not_found = 1
          OTHERS                 = 2.

      CHECK lv_process_type = 'ZSRV'.

      CALL FUNCTION 'CRM_ORDER_SET_NO_BDOC_SEND_OW'
        EXPORTING
          iv_guid = <guid>
          iv_flag = 'N'.
    ENDLOOP.

  ENDMETHOD.

Now the lv_send_bdoc will be set as false in the runtime according to the switch you set in enhancement, as a result no BDOC and inbound queue will be created any more.

Now after service order is saved you can still continue to edit.

Update on 2017-01-23

I am told by my colleague today that there is a better solution to leverage BAdI CRM_DATAEXCHG_BADI:

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-08-16 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Update on 2017-01-23
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档