Quantcast
Channel: SCN : Popular Discussions - SAP Cloud Applications Studio
Viewing all articles
Browse latest Browse all 1333

Slow Performance - External Web-Service Call in BeforeSave Event of Customer

$
0
0

Dear Experts,

 

currently, we have a customer specific solution which invokes an external webservice when a customer is saved or updated (BeforeSave & AfterModify Event). The customer data is transfered to SAP Netweaver PI which then forwards the message to MS Navision.

Unfortunately, it makes the creation of a new customer via frontend very slow. Do you have  idea how to improve the performance by improving code? Or maybe other optimizations are possible.... I already created an incident in the tenant.

 

SampleCode in BeforeSave Event

 

createRequest.CustomerData.No  = this.InternalID;

createRequest.CustomerData.Customer_Status = this.Status.LifeCycleStatusCode;

 

 

//check if customer is a person or organisation

if (this.CategoryCode == "Person"){

createRequest.CustomerData.Customer_is_a_Person = true;

}else{

createRequest.CustomerData.Customer_is_a_Person = false;

}

 

if (this.AddressSnapshot.IsSet()){

//Name & Address Snapshot information

createRequest.CustomerData.Name = this.AddressSnapshot.Name.GetFirst().Name.FirstLineName;

createRequest.CustomerData.Name_2 = this.AddressSnapshot.Name.GetFirst().Name.SecondLineName;

createRequest.CustomerData.Address = this.AddressSnapshot.FormattedAddress.GetFirst().FormattedPostalAddressDescription;

}

 

// execute the web service 

createResponse = Library::CustomerDataWebServInt1.Create(createRequest, "", "CustomerDataCommSc");

 

var commFault = createResponse.CommunicationFault;

var commFaultItem = createResponse.CommunicationFault.Item;

 

var CustomerInternalID = createResponse.CustomerData.No;

raise MsgExternalResponse.Create("S", CustomerInternalID);

}

 

Thank you in advance!

 

 

Best regards,

Rufat Gadirov


Viewing all articles
Browse latest Browse all 1333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>