Have anybody seen before a GET OBJEC looping indefinetelly? We have a PCH program to handle some training management.
The EV PATH is L-D-E-E.
We always start the execution with an L object. If the L object is not on one of the highest levels, the program works and ends fine, but from a certain level up, the GET OBJEC start looping and the program never stops.
Once the last E object of the catalog has been reached, for some reason, the next GET OBJEC execution starts again from the original L object.
Any idea why?
The obviuos work around is to flag the first L object and exit the program when reached for the second time, but I was looking for an ellegant solution
Other question (hope stupid one): How can you exit a GET OBJECT loop and continue processing at the END-OF-SELECTION command?
Thanks in advance
Message was edited by:
to find recursions please use the report RHSTRU00.
Start this report with your criterias and set the flag "Recursion".
If a recursion occurs the evaluation is stopped.
In the resulting display the recursion will be displayed in red.
you should also check how the evaluation path is defined. Maybe there is also a recursion already in the definition. (Table T77AW)
that is an interesting program, but the structure seems ok.
So, I would assume that I am doing something wrong in my program that somehow changes the OBJEC table so it gets initilized again.
There is no objec-XXXXX = .....
meaning that I do not see how I can update the OBJEC ids so the list get reinitiliced.
any ideas on this?
Sorry for the expresion.
You are right Michael.
The problem is that the structure OBJEC get filled with the objects that the process has already gone thorugh.
So, is it possible somehow to restart the filling of the structure OBJEC? Is there any way to debug the order applied by the system to fill the structure? Which one will be the next?
I think slowly I understand your point.
You get the same ID more than once, correct?
If these objects are more than once in the evaluation period in the structure, this is correct.
E.g. the department Sales migh occur twice in an Org.structure if it was reorganized during the year and you start from the BOard with evaluation period complete year. It will appear under Orgunit Europe and Global with different dates (only as an example)
That's also something you can check using RHSTRU00.
Normally this vanishes if you use a key date as evaluation pariod.
Maybe this clarifies it?
If you only want each object ID only once, collect them at GET OBJEC. and do all the rest of the processing in END-OF-SELECTION. after throwing away the duplicates.
The problem is not on the structure, but on the selection parameters. Depending on the selections, the program does a different job, but always working with the same structure.
For some reason, my program is somehow affecting the GET OBJEC instruction, so it is getting the first object again, and starting the loop for all the objects.
I do not see any update that can be affecting the objec structure, as I only use it as for reading purposes.
I need to do some further debugging to get a better clue I can post it here, unless someone tells me a way to identify the next OBJEC that the program will get during the previous GET OBJEC process.
Michael, I really appreciate all your inputs
The problem seems to be recursion
Please use he recursion report RHSTRU00 in two different session. Have the recursion flag blank in one and selected in other and execute the reprot.
If we have a recursion, the session with recursion flag selected will come out and not the other. If both session output come out at same time, please ignore rest of this post.
After output select Settings --> display recursion . The object with recursion would be highlighted with red.