Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

Update Payment METHODS (ZWELS) field in KNB1

0 Kudos

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


0 Kudos

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.