2019 May 24 7:48 AM
Dear all,
I want to update the Payment Method (ZWELS) field from KNB1 table.I could not see the field in BAPI_CUSTOMER_CHANGEFROMDATA1.
Kindly please let me know is there any BAPI available to update payment METHOD . Or any other possible way?
Best Regards,
Akil Syed
2019 May 24 1:21 PM
Have a look at abap class "CMD_EI_API".
A quick example:
DATA(ls_custdata) = VALUE cmds_ei_main(
customers = VALUE #( ( header-object_task = 'U'
header-object_instance = lv_kunnr
company_data-company = VALUE #( ( task = 'U'
data_key-bukrs = lv_bukrs
data-zwels = lv_paymeth
datax-zwels = abap_true ) )
) )
).
cmd_ei_api=>initialize( ).
cmd_ei_api=>maintain_bapi( EXPORTING is_master_data = ls_custdata ).
Maintain_bapi will give you back some result messages ofc. Don't forget to commit to see your changes.