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

Lock problem with RH_RELATION_MAINTAIN

Former Member
0 Likes
1,047

Hello everybody,

i have a little problem in one of my custom programs and i hope someone can provide me with a better solution than mine ;-).

What I am trying to do:

create a position in SAP OM with RH_OBJECT_CREATE:

works fine

create a relationship between this position and an orgunit with RH_RELATION_MAINTAIN:

works fine

create a relationship between the position and a cost center:

works fine via debugging, but does'nt work in normal run...

Seems to be a problem with a lock entry for plogi tab, the first RH_RELATION_MAINTAIN unlocks not fast enough so the second call can't access the locked position.

A WAIT UP TO 1 SECONDS between the creating of the relations solves this problem, but in my opinion that is no smart solution, does anybody have a better solution.

I tried HR:DEQUEUE_OBJECT and COMMIT WORK after the creation of the first relationship, but both didn't work...

Thanks in advance

Alex

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
831

Hi, take a look at this thread , it suggested alternative fm's as  RH_RELATION_MAINTAIN has 'Not released' status.

In this one the problem is similar to yours.

Regards,

Felipe

3 REPLIES 3
Read only

Former Member
0 Likes
832

Hi, take a look at this thread , it suggested alternative fm's as  RH_RELATION_MAINTAIN has 'Not released' status.

In this one the problem is similar to yours.

Regards,

Felipe

Read only

0 Likes
831

Thanks Felipe, i will have a look :-).

Read only

former_member491698
Discoverer
0 Likes
831

Hello,

Use the functions RH_INSERT_INFTY_1001_EXT & RH_DELETE_INFTY_1001_EXT.

Kr,

Mohamed.