工艺路线修改——CPCC_S_TASK_LIST_MAINTAIN

代码:

DATA: lt_return TYPE TABLE OF bapiret2,
      lt_oper   TYPE TABLE OF cps_task_list_maint_opr,
      ls_oper   TYPE cps_task_list_maint_opr,
      lt_operx  TYPE TABLE OF cps_task_list_maint_opr_x,
      ls_operx  TYPE cps_task_list_maint_opr_x.

ls_oper-maintain_mode = 'M'. 
ls_oper-flag_bar_pointer = '0000000001'.
ls_oper-activity = '0010'.
ls_oper-std_value_01 = 700.
APPEND ls_oper TO lt_oper.
CLEAR ls_oper.

ls_oper-maintain_mode = 'M'.
ls_oper-flag_bar_pointer = '0000000002'.
ls_oper-activity = '0020'.
ls_oper-std_value_02 = 700.
APPEND ls_oper TO lt_oper.
CLEAR ls_oper.

ls_operx-std_value_01 = 'X'.
APPEND ls_operx TO lt_operx.
CLEAR ls_operx.

ls_operx-std_value_02 = 'X'.
APPEND ls_operx TO lt_operx.
CLEAR ls_operx.

CALL FUNCTION 'CPCC_S_TASK_LIST_MAINTAIN'
  EXPORTING
    key_date        = sy-datum
    task_list_type  = 'N'
    task_list_group = '50062824'
    group_counter   = '01'
  TABLES
    operations      = lt_oper
    operations_x    = lt_operx
    return          = lt_return.

READ TABLE lt_return WITH KEY type = 'E' TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
  COMMIT WORK AND WAIT.
ELSE.
  ROLLBACK WORK.
ENDIF.

cl_demo_output=>write( lt_return ).
cl_demo_output=>display(  ).

运行效果:

 

 

posted @ 2021-07-18 14:41  鲸与海  阅读(2902)  评论(0编辑  收藏  举报