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 .