cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI to add additional partner functions in customer master(KNA1)

Former Member
0 Kudos

Hello All,

I wanted to add additional partner functions(2) to the list of partner functions which gets added by default while creating a customer. I am currently using BAPI_CUSTOMER_CREATEDATA1 to create the customer master. There i do not find any option to add my partner functions.

NOTE: I need to update KUNN2 field as well while adding my partner functions.

Could anyone please help here?

Regards,

Jay

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

if it possible go for below LSMW batch input method

Program Name RFBIDEK0 or RFBIDE00

Program Type B Batch Input

Regards,

Harish

Former Member
0 Kudos

Hi,

Is there any FM or BAPI to do it instead of this approach. Actually i wanted to do this when i am creating the customer from BAPI - BAPI_CUSTOMER_CREATEDATA1. I tried to write a wrapper for this BAPI and pass the PF data but that was not possible.

Regards,

Jay

Former Member
0 Kudos

Hi Jayakanth,

You could try with FM "SD_CUSTOMER_MAINTAIN_ALL"?

Regards,

Chen

Former Member
0 Kudos

Hi,

I tired with SD_CUSTOMER_MAITAIN_ALL. I tried to update the KNVP internal table before calling this FM. It was creating the extra partner function which i add in knvp internal table. But the KNN2 field was empty. I was also not able to fill this field when i update the knvp table before the calling this FM as the customer is not created at that point.

Regards,

Jay

Former Member
0 Kudos

Hi Jayakanth,

I am running on a IDES system, and do not have enough data to try the FM out. However looking at the coding and the comments in the FM, i feel confident (i am sure you will too once you go through the routines - XKNVP_COMPARE, PARTNER_UPDATE and UPDATE_TASK) that this might be used to update KNVP after debugging a few times. Anyways below are my thoughts on this.

1) Use the BAPI to create the customer, and commit the changes.

2) Select the data from KNVP for the customer in concern and update the ITAB YKNVP.

3) Build XKNVP itab, as per the changes you need.

4) Invoke the FM "SD_CUSTOMER_MAITAIN_ALL"

Regards,

Chen

Former Member
0 Kudos

Hi,

No you should not feel confident with SD_CUSTOMER_MAINTAIN_ALL.

It is used for only one very special case. The maintenance of consumer. And this should only be true from the transaction itself.

There exists other cases, one of the oldest one is the BAPI_CUSTOMER_CREATEFROMDATA1. But is is exclusively reserved for SAP Online store.

Despite the fact CMD_EI_API is quite difficult to use, it has the main benefit that is it supported if being triggered directly.

For the maintenance of customers, there is NO BAPI and NO direct function module.

There are some functions modules like the one above where the name is looking nice. But these should not be used.

The only valid solutions are :

  • Below ECC 2005 (6.00), the only solution was batch input and DEBMAS idocs. See note 384462

  • Starting with ECC 2005 (6.00) and above: a synchronisation tool has been introduce. See class CMD_EI_API and VMD_EI_API

Hope this helps

BR

Alain

Former Member
0 Kudos

Hi Alain,

Thanks for your inputs, i could have never know these intricacies.

Regards,

Chen

Answers (0)