注意点:
ECC版本没有单独修改成本中心组的BAPI,当前使用的BAPI都是创建,只是该BAPI可以重复创建,覆盖之前的成本中心组
所以修改就是把原有的所有数据全部取出来,重新创建就会覆盖实现修改的目的
DATA:ls_return TYPE bapiret2, "
lv_language TYPE sy-langu, "
lt_sethier TYPE STANDARD TABLE OF sethier_co, "
ls_sethier TYPE sethier_co, "
lt_setval TYPE STANDARD TABLE OF setval_co, "
ls_setval TYPE setval_co, "
lv_top_node_only TYPE sy-datar, " SPACE
lv_tolerate_ambiguity TYPE sy-datar. " SPACE
CLEAR ls_setval.
REFRESH lt_setval.
ls_setval-valfrom = ps_data-kostl.
ls_setval-valto = ps_data-kostl.
APPEND ls_setval TO lt_setval.
SELECT
*
INTO TABLE @DATA(lt_setleaf)
FROM setleaf
WHERE setname = @ps_data-telfx.
IF sy-subrc = 0.
LOOP AT lt_setleaf INTO DATA(ls_setleaf).
CLEAR ls_setval.
ls_setval-valfrom = ls_setleaf-valfrom.
ls_setval-valto