cancel
Showing results for 
Search instead for 
Did you mean: 

Create and schedule mass data run in ABSL

Former Member
0 Kudos

Dear community,

i would need to create and schedule a mass data run in an ABSL script.

SAP Support has recommended me to use the MDRO library (AP.PlatinumEngieering).

Does someone know how to use this library? I could not find any documentation.

It would be great if someone could provide an example code or share his experience.

Kind regards,

Christine

Accepted Solutions (1)

Accepted Solutions (1)

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Christine,

I will ask my colleagues for some docu.

Stay tuned,

   Horst

Former Member
0 Kudos

Hallo Horst,

thank you!

Kind regards,

Christine

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Christine,

As a first step here is some example code:

import AP.PlatinumEngineering;

var QueryParam : QueryParameter;

var MDRO_ID : XPEString;

MDRO_ID = TaskUUID.content.ToString();

  1. MDRO.CreateInstance("MDR_ExecuteTask", "", MDRO_ID);
  2. QueryParam.ParameterName = "SelectByTaskUUIDContent";
  3. QueryParam.Sign = "I";
  4. QueryParam.Option = "EQ";
  5. QueryParam.Low = TaskUUID.content.ToString();
  6. MDRO.AddSelectionParameter("MDR_ExecuteTask", "", "SelectByTaskUUIDContent", MDRO_ID, QueryParam);

var currentTime = Context.GetCurrentGlobalDateTime();

var StartDuration = Library::Duration.Create(0,0,0,0,0,NrOfSeconds);

var startTime = currentTime.AddDuration(StartDuration);

  1. MDRO.ExecuteDateTime("MDR_ExecuteTask", "", startTime, MDROID);

HTH,

   Horst

Former Member
0 Kudos

Hi Horst,

that was already a great help! Thanks a lot!

I was able to create and schedule a mass data run with your example! 🙂

I had just one problem: I was not able to create a query parameter of compare type "EQ". My query parameter is of type ID.

I tried to use this code to define the selection:

var parameterName = "SelectByID";

queryParameter.ParameterName = parameterName;

queryParameter.Option = "EQ";

queryParameter.Sign = "I";

queryParameter.Low = "2";

There are no changes on BO 2.

When I substitute the code with the compare type BT it works for the objects with id 2 and 3:

var parameterName = "SelectByID";

queryParameter.ParameterName = parameterName;

queryParameter.Option = "BT";

queryParameter.Sign = "I";

queryParameter.Low = "2";

queryParameter.High= "3";

Do you have an idea, what might be the problem with that?

Kind regards,

Christine

former_member200567
Active Contributor
0 Kudos

Hi Christine,

Use SetSelectionLowParameter method.

var parameterName = "SelectByID";

queryParameter.ParameterName = parameterName;

queryParameter.Option = "EQ";

MDRO.AddSelectionParameter("MassDataRun1", "","SelectByID", MDRO_ID, QueryParam); // only needed once. New line will be added each time this code runs.

MDRO.SetSelectionLowParameter("MassDataRun1", "","SelectByID","LowerBoundaryID","2", MDRO_ID); // This will override the selection parameter each time this code runs.

Best Regards,

Fred

Former Member
0 Kudos

Hello Fred,

thank you for the hint! Now it's fine.

Kind regards,

Christine

Former Member
0 Kudos

Hi Fred,

I also implemented the MDRO call with your help. However, we would need the runs to be visible on the UI. I figured out that there is a SendLogViaEmail function, however, that doesn't exactly fit our needs. Is there a way (without more implementation effort) to display the MDRO log to the business user?

Thanks for you assistance so far!

Kindest Regards,

Florian Rogner

former_member200567
Active Contributor
0 Kudos

Hi Florian,

You can just create MDR screens from MDRO and assign the created WcView to any WcF.

Best Regards,

Fred

Former Member
0 Kudos

Hi Fred,

that's what I did. However, the runs do not show up. Is there anything else I need to configure/take care of?

Thanks!

Florian

former_member200567
Active Contributor
0 Kudos

Hi Florian,

You cannot see MDR runs or you cannot see execution?

Note : You need to check Save-After-Execution in the BO Action event handler on UI.

Best Regards,

Fred

Former Member
0 Kudos

Hi Fred,

I can confirm that the run is being executed (debugging and value setting confirm that), however, the list of runs doesn't list them. This is especially inconvinient because the logs and messages also don't show up then.

Thanks!

Florian

former_member200567
Active Contributor
0 Kudos

Hi Florian,

FYI, I can see the execution logs for the MDR created by ABSL codes.

I am afraid that I don't know why you can't see them.

Best Regards,

Fred

Former Member
0 Kudos

Hi Fred, dear Community,

here is how I solved my problem:

  1. Re-generate the screens for the MDR
  2. Delete the WCF assignment of the MDR WCView
  3. Unassign the WCView for all Business Users
  4. Re-add the WCView to the WCF of choice
  5. Assign the WCView to the required Business Users
  6. Re-activate the solution
  7. Schedule a run

Thanks for the assistance!

All the best,

Florian

former_member200567
Active Contributor
0 Kudos

Great, Florian and thanks.

Former Member
0 Kudos

Hi Horst,

When calling the MDR, I get an error message saying that the action is disabled.

Also tried with MDRO.ExecuteNow() function, with the same result.

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Fernando,

Did you try to call this action direct for this instance of this Business Object?

I would assume that the state of the BO prohibits the call of the action.

Bye,

   Horst

former_member275924
Active Participant
0 Kudos

Hello Horst,

I want to create MDR with recurrence and run after job schedule via code .

Now I can create MDR with single run job and start immediately .

In ExecuteDateTime() function , I can assign DateTime as parameter , but I don't know how to assign recurrence and run after job schedule as parameter . eg. every 15 minutes , daily , weekly .

Best Regards,

Pole

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Pole,

it is only possible to run a job every day, week or month.

A shorter recurence is not possible.

Sorry,

   Horst

former_member275924
Active Participant
0 Kudos

Hello Horst ,

Is it possible to run a job every day, week or month via absl by using ExecuteDateTime() function ?

Best Regards,

Pole

former_member200567
Active Contributor
0 Kudos

Hi Horst,

MDRO.CreateInstance() is giving UI dump after the tenant has upgraded to 1608.


Best Regards,

Fred

Former Member
0 Kudos

Hi Fred, hi Horst!

I can confirm that. We use mass data runs heavily in several solutions in different tenants and all of them dump. Hoping to be provided with a hotfix asap since this makes a good amount of solutions unusable for our customers.

Thanks,

Florian

Former Member
0 Kudos

Hello Horst,

Even we  also have requirements to trigger the MDR from the absl code. I have tried your code, but am getting error saying "Identifier TaskUUID" does not exist.could please tell me,why am getting this error?

Thanks and Regards

Ravi

former_member200567
Active Contributor
0 Kudos

Hi Ravikumar,

Horst took the codes from somewhere in which "TaskUUID" is declared in the business object.

You can use your own field of your business object. It just has to be a "String" data type.

You can also assign hard-code value to the mass data run ID.

And also, "MDR_ExecuteTask", "SelectByTaskUUIDContent" are specific only to Horst.

You will need to adapt it with your own names.

Best Regards,

Fred

Former Member
0 Kudos

Hi Fred,

Thank you very much for the reply.

Now we are getting UI Dump when the "MDRO.CreateInstance()" method is executed,but there is no entries in the Dump Analysis. so we could not find the issue. Could any one help us please....

Thanks and Regards

Ravi

former_member200567
Active Contributor
0 Kudos

Hi Ravikumar,

Sorry, I forgot to tell you that we are having that issue. (You will find in previous comments)

MDRO.CreateInstance() is giving UI dump after 1608 upgrade.

Hope SAP will fix it soon.


Best Regards,

Fred

Former Member
0 Kudos

Hello,

it would be great, if we could plan jobs with recurrance via absl. We would need this functionality too.

@pole star: Have you found a solution for this yet?

Does someone know if and how that's possible?

Kind regards,

Christine

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Christine,

Please keep in mind that every MDR requires some processing time.

So haveing many MDRs running very often slows down you online UI.

Bye,

   Horst

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Florian, Fred,

Did you raise an incident?

Keep in mind that the MDRO library is provided by the Platinum Engineering team with no 24/7 support.

Bye,

  Horst

Answers (0)