cancel
Showing results for 
Search instead for 
Did you mean: 

Update of Custom fields in KNA1 or KNVV through an inbound IDOC during creation of Business Partner

PANKAJ_SHARMA81
Discoverer

Hi All,

 

I am writing this post to update about the BADI used to update the custom fields in Business partner in S4 HANA.

As we all know that the custom fields in S4 HANA Business Partner ( Customer or Vendor ) are enhanced using BDT Analyzer. Our requirement was to create/update the business partner using DEBMAS06 IDOC with an extension containing the custom fields. I went through a lot of Blogs but the BADI CUSTOMER_ADD_DATA_BI was not working for us.

Hence after a lot of struggle, we checked with SAP to update us. SAP told us a BADI DEBMAS_IDOC_EXTENSION which is used to update the custom fields in SAP Business partner ( customer master ) and the other BADI CREMAS_IDOC_EXTENSION for update of custom fields in SAP Vendor master via BP. 

 

The sample implementation OI0_DEBMAS_IDOC_EXTENSION_BP of the BADI is sufficient to understand. Its very simple.

The method MAP_EXTERNAL_DATA is implemented to change the data in the fields in the CVIS_EI_EXTERN structure and MODIFY it.

PANKAJ_SHARMA81_0-1707485006071.png

 

Screenshot of the code done in our case is below  :

PANKAJ_SHARMA81_1-1707485077080.png

 

PANKAJ_SHARMA81_2-1707485120766.png

 

In our case, we had to update some custom fields in Sales area data of the business partner. Hence, the structure CUSTOMER-SALES_DATA-SALES was used. Make sure to mark the updated fields as 'X; in the datax structure as well. Please let me know in case you still face a little difficulty in understanding this.

 

Cheers!

Pankaj Sharma

 

 

Accepted Solutions (0)

Answers (0)