• 周六. 7 月 13th, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

工艺路线修改——CPCC_S_TASK_LIST_MAINTAIN

admin

11 月 28, 2021

代码:

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(  ).

运行效果:

木叶飞舞之处,火亦生生不息

发表回复