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

FCODE for delete object relationship

Former Member
0 Likes
1,354

Hi All,

Can anyone tell me what should I put for FCODE in the FM 'RH_RELATION_MAINTAIN' if I want to delete the object relationship?

I put 'DELETE' and 'DEL' but return me runtime error.

Hope someone can help me. It's urgent.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
946

Is anyone use this FM before? Pls help, it's urgent.

Or is there other FM that can use to delete object relationship??

Thanks.

Message was edited by:

Lai Min Sam

9 REPLIES 9
Read only

Former Member
0 Likes
946

hi Sam,

Check Program <b>RHWFOTSK</b>

[code] call function 'RH_RELATION_MAINTAIN'

exporting

act_fcode = 'INSE'

act_plvar = pc-plvar

act_otype = wi_stat-otype

act_objid = wi_stat-objid

act_rsign = $trela+0(1)

act_relat = $trela+1(3)

act_sclas = wi_stat-org_obj-otype

act_sobid = wi_stat-org_obj-objid

exceptions

maintainance_failed = 01.

if sy-subrc = 0.

message s230(5w).

else.

message s225(5w).

endif.

endif.

[/code]

Read only

0 Likes
946

Why when I execute in T Code SE37, it show me 'Action Canceled'?

Is there any other thing I need to maintain?

Read only

0 Likes
946

I had also used this FM to create relationship for position object my program calls it 4 times to create relation to org unit, person, manager.... when i am in debug mode the record is created using RH_RELATION_MAINTAIN but when I execute the program I get 'action canceled'.... i tried putting commit and wait but did not help.

Any ideas?

Read only

Former Member
0 Likes
946

hi Sam,

Note : FCODE Should be 4 Characters Long ...

Regards,

Santosh

Read only

Former Member
0 Likes
946

Hi,

Use DELO for FCODE in the FM 'RH_RELATION_MAINTAIN' if you want to delete the object relationship.

Hope it helps.

Reward if helpful.

Regards,

Sipra

Read only

0 Likes
946

Hi, I used 'DELO' and 'DELE' as well, but all return runtime error. Can some one tell me what's wrong about this FM?

Read only

Former Member
0 Likes
947

Is anyone use this FM before? Pls help, it's urgent.

Or is there other FM that can use to delete object relationship??

Thanks.

Message was edited by:

Lai Min Sam

Read only

0 Likes
946

Can you use RH_RELATION_DELETE?

Read only

0 Likes
946

As per code, both 'DEL' and 'CUT' should work.