Agreed, it’s not your everyday request, but it’s still some 4h+ of work, let alone create all the 96 variants to the transaction.
What if you could make them at the touch (click) of a button?
Said and done ?
The issue with the manual work is that it’s not only tedious but prone to human errors since the name of the variants isn’t that long and 1 character can change everything. Also, since SM36 has a bug that doesn’t allow you to create one job after the other without exiting the transaction, there is a “/nSM36” that breaks the process … every time ?
Since I already created an excel file with all the variants that need to be created for the current transaction, I figured I can use that as input to my new bright idea.
The input data is something like this:
In my case, job name and variant name are identical, but you can easily use this transaction to create multiple jobs, even if they are not dependent on each other or, in case of SM36 transaction restrictions, offer this option. It was just easier for me like this.
I also added the “Predecessor job name” column, to tell the program that the current job created has to be started after the previous “one” ended (with success or error, not specified).
Once all details are filled in, it’s only a matter of pressing “” to create all the jobs.
Fortunately, SM36 provides most of the error messages, so I didn’t have to process them, including the checks for variant and program name (above you can see the variant check and below you can see the program check):
But I had to do some checks when deleting the job created. For one, if the job(s) were aborted for a reason or another, you shouldn’t lose the log, so the program will not delete the already processed (successfully or not) job, or the active one, only the ones that aren’t started yet.
Since Murphy’s law is a .. law … if something can go wrong, it will ? so … after a few jobs successfully finished, I had an error and all subsequent jobs where aborted. Ergo, I had to delete the remaining 80+ jobs and recreate them, and then restart them to finish them off.
All the time was spent well ?
Good learning exercise.
PS: You can ignore the first colors of the first column. It was an example of all the colors that the ALV can show.