Skip to Content
Apr 17 at 04:27 PM

ABSL - Copy Service Ticket


Dear Sap Experts,

I've tried to use the "Copy"-Action from the ServiceRequest-BO in my BeforeSave-Event.

For both Attempts I've got the following Error:

Source type \INTERFACE=IF_SERVICE_REQUEST\TYPE=TY_ROOT is not compatible, for the purposes of assignment, with target type \CLASS-POOL=BO_SERVICE_REQUEST\CLASS=ROOT\TYPE=TY_STRUCTURE

var query = ServiceRequest.QueryByElements;
var query_SelParams = query.CreateSelectionParams();
query_SelParams.Add(query.ID.content, "I", "EQ", this.ID.content);
var query_Results = query.Execute(query_SelParams);

var parent = query_Results.GetFirst();
var salesOrder = ServiceRequest.Copy(parent); OR var salesOrder = ServiceRequest.Copy(this);