供应商导添加预扣税字段

发布时间:2024年01月22日

1 Introduction

I only think I can assign value to them and I implement it by the following code .
在这里插入图片描述

2 Code

      LOOP AT gt_bukrs INTO gs_bukrs WHERE lifnr = gs_alv1-lifnr.
       CLEAR:ls_company.
        ls_company-task = 'M'.
        ls_company-data_key-bukrs = gs_bukrs-bukrs. "公司代码
        ls_company-data-akont     = gs_bukrs-akont. "统驭科目
        ls_company-data-zterm     = gs_bukrs-zterm. "付款条款

        ls_company-datax-akont    = abap_true.
        ls_company-datax-zterm    = abap_true.
  “ add it by jinggl 20240122
     IF lt_wtax_type[] IS  INITIAL.
      IF  gs_alv-witht IS  NOT INITIAL  AND  gs_alv-wt_withcd IS NOT INITIAL  AND  gs_alv-wt_subjct IS NOT INITIAL.

        ls_wtax_type-data_key-witht  =  gs_alv-witht.
        ls_wtax_type-data-wt_subjct  =  gs_alv-wt_subjct.
        ls_wtax_type-data-wt_withcd  =  gs_alv-wt_withcd.
        ls_wtax_type-task  = 'M' .

        APPEND  ls_wtax_type TO lt_wtax_type .

        ls_company-wtax_type-wtax_type    =    lt_wtax_type.
  "  add it by jingl 20240122
      ENDIF.

        APPEND ls_company TO lt_company.
        gv_bukrs = gs_alv1-bukrs.
      ENDLOOP.
      ls_vendor-company_data-company = lt_company.

  CALL METHOD vmd_ei_api=>maintain_bapi
        EXPORTING
          is_master_data       = ls_vendors
        IMPORTING
          es_message_defective = ls_return3.

3 Summary

We may use 'task ’ with two place and we should be sure if there is
value to BAPI .

文章来源:https://blog.csdn.net/beyond911/article/details/135757727
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。