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

documentation for the function module 'RH_OM_MAINTAIN_RELATION'

Former Member
0 Likes
692

Hello everyone!

Can anyone provide the documentation for the FM 'RH_OM_MAINTAIN_RELATION'

? Also could anyone tell me where this FM is used and if possible provide a sample code? Looks like there isn't any documentation for this FM anywhere on the net. Please help!

Thanks and Regards,

Smitha

3 REPLIES 3
Read only

uwe_schieferstein
Active Contributor
0 Likes
524

Hello Smitha

As the name of the function module implies you can insert, cut and move relationships between OM objects.

Using transaction PO10 and PO13 I created a single orgunit ('O ') and a single position ('S '). If we want to link the position to the orgunit we have to create an infotype '1001' of subtype 'B003' (orgunit INCORPORATES position). To create this infotype you have to feed function module 'RH_OM_MAINTAIN_RELATION' with the following parameters:

ACT_FCODE                       INSE      
ACT_PLVAR                       01        
ACT_ISTAT                       1         
VBEGDA                          26.11.2006
VENDDA                          31.12.9999

PARENT_OBJECT                                                                                
PLVAR                          01          
       OTYPE                          O           
       OBJID                          50003125    
       BEGDA                                      
       ENDDA                                      
       ISTAT                                      
       HISTO                                      
       SHORT                          ZUS_ORGEINH1
       STEXT                                      
       REALO                          50003125

ACT_INFTY                       1001  
ACT_SUBTY                       B003

CHILD_OBJECT                                                                                
PLVAR                          01            
       OTYPE                          S             
       OBJID                          50007250      
       BEGDA                                        
       ENDDA                                        
       ISTAT                                        
       HISTO                                        
       SHORT                          ZUS_PLANSTL1  
       STEXT                                        
       REALO                          50007250   

If you set NO_DIALOG = ' ' then a popup will appear where you see link between the two OM objects. Push the SAVE button to create the linkage and check the result in transaction PPOSE.

The function codes are:

- INSE = insert

- DEL = delete

- CUTI = I guess cut & insert = move (In this case you probably have to provide OLD_PARENT_OBJECT and set MOVE = 'X').

Regards

Uwe

Read only

0 Likes
524

Thank you Uwe for your reply. It really helped.

Regards,

Smitha

Read only

0 Likes
524

Hi all.

Thank you very much for your effort: the function module RH_OM_MAINTAIN_RELATION is very usefull.

However i've a problem using this function module for a massive deletion of BP relationships. After a few iterations (few BP relationships deleted succesfully) the following error message appear:

Message no. 5A503

Diagnosis

The object Organizational unit 0000005831 (object-ID 50017175) is already being processed by you. Perhaps you are currently processing the object in another session.

I try to solve my problem installing sap notes 934438 and 528352, but unfortunately the lock problem does not disappear.

Any idea ?

Thanks a lot,

Fabrizio Gemma