ABAP-SET UPDATE LOCAL TASK

意思是在设置本地更新后 会将下一个commit work之间的更新函数进程 放在主进程
不会再进行异步处理。后续如果调用bapi也不会遇到数据被锁定的问题。


SET UPDATE LOCAL TASK

  call function 'CSAP_MAT_BOM_DELETE'
      exporting
        material           = lv_matnr
        plant              = lv_plant
        bom_usage          = lv_bom_usage
        alternative        = lv_alternative
        fl_commit_and_wait = 'X'
      exceptions
        error              = 1
        others             = 2.

  call function 'BAPI_TRANSACTION_COMMIT'
        exporting
          wait = 'X'.


  call function 'BAPI_MATERIAL_BOM_GROUP_CREATE'
    exporting
      all_error         = 'X'
    tables
      bomgroup          = bomgroup
      variants          = variants
      items             = items
      materialrelations = materialrelations
      itemassignments   = itemassignments
      return            = return.

你可能感兴趣的:(ABAP-SET UPDATE LOCAL TASK)