cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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);
	}

Accepted Solutions (1)

Accepted Solutions (1)

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Chiangjian,

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

HTH,
. Horst

Former Member
0 Kudos

Hi Horst,

Thank you very much! I want to create a sub-tickets for the current tickets as following up by ABSL, do you have any good idea? I've been confused about this problem for several days, thanks again.

Changjian

Best Regard

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Changjian,

Did you had a look into the documentation of this action?

Bye,
. Horst

Former Member
0 Kudos

Hi Horst,

Thanks for you reply!

I review the BO "ServiceRequest"'s information in the Repository Explorer,I can not see any documentation for the action "CreateWithReference",see the following picture.

I'm trying another way to create the follow up, Although not dump,but the docu flow of the two tickets is not created.

The code as following:

    import ABSL;
    import AP.CRM.Global;

    //Assign the Document to the BTD Reference node
    var BTDReference: elementsof ServiceRequest.BusinessTransactionDocumentReference;
    BTDReference.BusinessTransactionDocumentReference.ID.content = this.ZTicketID2.content;
    BTDReference.BusinessTransactionDocumentReference.TypeCode = "118"; //Ticket Type
    BTDReference.BusinessTransactionDocumentRelationshipRoleCode = "2"; 
    this.BusinessTransactionDocumentReference.Create(BTDReference);

Sir, please help me check the above code,thanks very much.

Changjian

Best Regard

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Changjian,

Sorry, this needs internal knowledge about the ServiceRequest BO which I am missing. 😞

Sorry,
. Horst

Former Member
0 Kudos

Thank you Sir! Do you have any similar example for create follow up for Transaction?

Changjian

Best Regard

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Changjian,

I've asked some previous contacts on my side and they believe that the ID is wrong / not existing.
Does the "this.ZTicketID2.content" already exist in the system?

Second: It looks like they plan to provide some documentation 🙂

HTH,
. Horst

Former Member
0 Kudos

Hi Horst,

Thank you Sir! The "this.ZTicketID2.content" already exist in the system, I want to create Relationship between the two ServiceRequest,but not success. When I debug into the absl code ,the document flow has been created in the session when read the reference document of one of the ServiceRequest again,but not save to the DB,It seems not commit work. Sir,do you known what's wrong? Thank you very much!

Changjian

Best Regard

Former Member
0 Kudos

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

Answers (1)

Answers (1)

former_member200995
Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Benny,

Thanks for you reply! I try it as your code,but still have dump.Please review my steps as flowing:

Changjian

Best Regard

Former Member
0 Kudos

Hi Benny,

I want to known your C4C system's version,my C4C system version as flowing,Thank you.

Changjian

Best Regard

former_member200995
Contributor
0 Kudos

Hi Changjian,

I use the system of your version, it is the same issue, maybe you need the script as:

The instTask's id, you need back to created id, in the picture it is changed by the assignment.

Best Regards,

Benny

Former Member
0 Kudos

Hi Benny,

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, Benny.

Changjian

Best Regard

0 Kudos

As I too need to create a copy of present Service Request on basis of Status. Could you please share the steps with screenshots preferred or code. For me too the dump is coming while using CreateWithReference(this).

Thanks in advance.

Regards,

Rupesh

former_member200995
Contributor
0 Kudos
var elTaskRoot : elementsof ServiceRequest;
var instTask;

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