Skip to Content
0
Feb 11, 2018 at 07:13 AM

How do create a new Contact (Business Patner) in SAP ByDesign?

1031 Views Last edit Jun 13, 2018 at 04:16 PM 5 rev

Hi Experts,

I have a business scenario to create new contacts from Custom Screen. I have tried a piece of ABSL code from custom Business object's Before save event. But I am getting an error "Last Name Missing".

Is there any specific code to create a contact?

//Create a new contact
var createContact : elementsof BusinessPartner;
createContact.CategoryCode = "1";
var resultContact = BusinessPartner.Create(createContact);
var currentCommon : elementsof BusinessPartner.Common;
currentCommon.Person.Name.GivenName = "SDK";
currentCommon.Person.Name.FamilyName = "SDK";
resultContact.CurrentCommon.Create(currentCommon);