Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Calling a Recursive Select Statement

Former Member
0 Likes
1,295

Hi Experts,

I have small requirement in which I need to get the entries of the table as per the below explaination.

1. First get the Position details of a Employee Reporting Manger from the Database table.

2. Now Verify whether Manager has approving rights or not.

3. If Yes I need end the processing.

4. If No then using the Reporting Manager position (Found from Step 1) I need to get his Reporting Mager Details.

5. Then again follow the same logic from step 2 till I get the Correct Approving Reporting Manager.

Table Details : HRP1001 to get the Reporting Manger

HRP1010 to get the Approving Rights Details

Please help me with a piece of code or Logic to get this.

Thanks in advance.

Regards,

Srinivas

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
957

you can check fm RH_STRUC_GET instead of all these complex select queries.

4 REPLIES 4
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
958

you can check fm RH_STRUC_GET instead of all these complex select queries.

Read only

0 Likes
957

Hi Keshav,

Thanks for your reply Can you please let me know what are the details needs to be passed it.

Thanks,

Srinivas

Read only

0 Likes
957

Hi Srinivas

Here is example input to get all Persons found under a given Org Unit effective August 20, 2010

ACT_OTYPE                       O
ACT_OBJID                       50000635
ACT_WEGID                       O-S-P
ACT_INT_FLAG
ACT_PLVAR                       01
ACT_BEGDA                       08/20/2010
ACT_ENDDA                       08/20/2010
ACT_TDEPTH                          3
ACT_TFLAG                       X
ACT_VFLAG                       X
AUTHORITY_CHECK                 X
TEXT_BUFFER_FILL
BUFFER_MODE

The Parent object is an Org Unit u2013 O 50000635

O-S-P is an Evaluation path u2013 gets subordinate Positions, Persons and Org Units for a given Org Unit. These Evaluation Paths are found in T778A. If nothing works for you there maybe another one can be configured.

ACT_TDEPTH = 3 stops the recursion after 3 levels u2013 use default 0 if you want everything thatu2019s subordinate

Read only

0 Likes
957

Thanks for you answer...My problem is resolved...

Thanks,

Srinivas