Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem while creating contactpersons


In Tcode: XD01, we have a contactperson tab where we can fill up multiple contact person details along with their Private addresses and can create multiple contactpersons for a normal KNA1-customer.The same thing is to be implemented through portal screens.

The steps which I followed in creation of customer are as follows.

1) FM: SD_CUSTOMER_MAINTAIN_ALL is used for creating customer and multiple contactpersons, by passing I_KNA1, contact persons details to KNVK (tableu2019s parameter) and PI_POSTFLAG = u2018Xu2019 and I_MAINTAIN_ADDRESS_BY_KNA1 = u2018Xu2019 . With this step I could create successfully multiple contact persons for a customer but not their private addresses (ContactPerson).

2) After commit work, FM: BAPI_ADDRESSPERS_SAVEREPLICA is called and Contact person number obtained in step1, OBJ_TYPE as u2018BUS1006001u2019 , Context as u20180004u2019 are passed and the private address details of contactpersons are filled up in BAPIAD2VL (tables parameters).

3) FM: CUSTOMER_UPDATE is called in update task mode by passing the updated KNVK table with address number and person number obtained in step2.

With steps 1, 2 & 3 I could successful in creating customer with no errors raised but when I view the customer in display mode, a customer is created with multiple contact persons but the Home address details are not updated as desired

I.e. the contactperson address details are not updated back into KNVK table (ADRNP_2) table and in some of adr... Tables.

I even tried to create contactpersons with recording of Tcode u201CVAP1u201D (Create Contact persons) but the contact persons details are not updated back into KNVK and other required ADRu2026 table as desired.

To conclude: I need a FM which creates a customer with multiple contactpersons (along with Private address information which contains strret address,telephone numbers, remarks etc..).

Can anyone offer me some code to do this? If not, how about some other suggestions as to how to do this.



Former Member
Not what you were looking for? View more on this topic or Ask a question