Skip to Content
avatar image
Former Member

How to create follow up document(also Service Request) for Service Request by ABSL

My friends,

I want to create a follow up document for a Service ticket using ABSL script language,the follow up document also is a Service ticket,but not the same process type.

I write the logic in the BeforeSave event of Service Request's root node, when I save one Service ticket, it trigger the breakpoint I have set in the ABSL before,but there is a dump.

I don't know which issue cause the dump.The following is the detail step.

The following picture is the Dump Analysis, but I don't know what's mean, My friend, please help me with this problem, Thank you very much.

import ABSL;
import AP.Common.Global;
import AP.CRM.Global;


//ServiceRequest: Root node
var elTaskRoot : elementsof ServiceRequest;


var instTask = ServiceRequest.CreateWithReference(this);


// ServiceRequest: define party node
var elTaskParty : elementsof ServiceRequest.Party;
var instParty;


instTask.Name.content = "Subject Ticket " + this.ID.content.RemoveLeadingZeros();


if (! instTask.ProcessorParty.IsSet()) {
		elTaskParty.PartyKey.PartyID.content = this.ProcessorParty.PartyKey.PartyID.content;
		instTask.ProcessorParty.Create(elTaskParty);
	}
	else
	{
		instTask.ProcessorParty.Delete();
		elTaskParty.PartyKey.PartyID.content = this.ProcessorParty.PartyKey.PartyID.content; 
		instTask.ProcessorParty.Create(elTaskParty);
	}
1.jpg (82.3 kB)
2.png (55.3 kB)
3.png (24.7 kB)
4.png (68.5 kB)
5.png (23.0 kB)
6.png (74.6 kB)
7.png (21.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 08, 2017 at 12:07 PM

    Hello Chiangjian,

    Based on the documentation from the Repository Explorer the action CreateWithReference of the BO ServiceRequest does not support any parameters.

    HTH,
    . Horst

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Sir,

      I try to use call the webservice to create follow up for ServiceRequest, the method was a SAP Colleague give to me.

      And it works, Thank you very much,Sir.

      Changjian

      Best Regard

  • Sep 13, 2017 at 02:07 AM

    Hi Changjian,

    In new PDI tools, the "this" is not instance.

    Try using the instance as:

    var elTaskRoot : elementsof ServiceRequest;
    var instTask;

    foreach(var ins_this in this)
    {
    instTask = ServiceRequest.CreateWithReference(ins_this);
    }

    Best Regards,

    Benny

    Add comment
    10|10000 characters needed characters exceeded