专栏首页Jerry的SAP技术分享如何避免SAP订单保存后生成的中间件CSA inbound queue

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

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:

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:

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • SAP UI5应用如果遇到数据绑定问题时,应该如何自己定位问题?

    I will use the field “ClosingDate” to demonstrate my favorite approach to troubl...

    Jerry Wang
  • ABAP CDS view redirect特性介绍

    Suppose we have a database table A, and then we create a CDS redirect view B for...

    Jerry Wang
  • SAP S/4HANA里如何创建Customer主数据以及执行后续处理

    1, Launch tcode: BP and select the Organization 2, Maintain the information for...

    Jerry Wang
  • 关于WCF服务在高并发情况下报目标积极拒绝的异常处理

    最近弄了个wcf的监控服务,偶尔监控到目标服务会报一个目标积极拒绝的错误。一开始以为服务停止了,上服务器检查目标服务好好的活着。于是开始查原因。 一般来说目标积...

    kklldog
  • Note_Place based audio detour

    王兵
  • OpenCV 利用getTickCount()与getTickFrequency()计算执行时间

    其实这是个很简单的应用,贴出来是因为我经常能用到这两个函数,顺便写一下吧。 double t1 = (double)getTickCount(); . . . ...

    chaibubble
  • Maven学习问题解决

    Java学习123
  • 漫谈并发和并行:概述

    木东居士
  • DAY79:阅读 Compute Capabilities

    The general specifications and features of a compute device depend on its comput...

    GPUS Lady
  • HDU 5144 NPY and shot(物理运动学+三分查找)

    NPY and shot Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768...

    Angel_Kitty

扫码关注云+社区

领取腾讯云代金券