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.
cancel
Showing results for 
Search instead for 
Did you mean: 

KNB1-ZTERM update

h_senden2
Active Contributor
0 Kudos

Hi,

based on customer number and company code, i want to update the KNB1-ZTERM (payment terms). The change log must be updated, so i need a bapi.

Which bapi will do the job ?

gr

Hans

1 ACCEPTED SOLUTION

Jarosław
Active Participant
0 Kudos

Hi,

You can use class CMD_EI_API. You can find in SDN how use it and put partameters.

To change KNB1-ZTERM You should use in method MAINTAIN_BAPI parameters:

MASTER_DATA->CUSTOMER->COMPANY_DATA->COMPANY (add line in table) and fields:

TASK = 'U' (Update)

DATA_KEY-BUKRS = (company code)

DATA-ZTERM = (payment terms)

DATAX-ZTERM = 'X'

Jarek

2 REPLIES 2

Jarosław
Active Participant
0 Kudos

Hi,

You can use class CMD_EI_API. You can find in SDN how use it and put partameters.

To change KNB1-ZTERM You should use in method MAINTAIN_BAPI parameters:

MASTER_DATA->CUSTOMER->COMPANY_DATA->COMPANY (add line in table) and fields:

TASK = 'U' (Update)

DATA_KEY-BUKRS = (company code)

DATA-ZTERM = (payment terms)

DATAX-ZTERM = 'X'

Jarek

former_member412
Participant
0 Kudos

Hi

A BAPI to specifically update a customer's company code level data (KNB1 table data) is available. ZWT_CUSTOMER_UPDATE is the BAPI. This can update KNB1-ZTERM (payment terms) field also.

However, I am not sure that the change log will be updated with this option. You may have to test the FM in SE37 and check the result.

Regards,

Anil