on 06-29-2016 8:18 AM
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
Hello Christine,
I will ask my colleagues for some docu.
Stay tuned,
Horst
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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();
var currentTime = Context.GetCurrentGlobalDateTime();
var StartDuration = Library::Duration.Create(0,0,0,0,0,NrOfSeconds);
var startTime = currentTime.AddDuration(StartDuration);
HTH,
Horst
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
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
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
Hi Fred, dear Community,
here is how I solved my problem:
Thanks for the assistance!
All the best,
Florian
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
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
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.