‎2009 Jan 14 2:24 PM
Hi All,
I want to delete the relationship between position(S) and person(P).
I know the FM 'RH_RELATION_DELETE' can be used to for this purpose.
I tried execution it but desired output was not achieved and I received an exception ' NOT_FOUND'
If anyone of you have used it earlier please share ur knowledge regarding the same
I need to know what all params needs to pass for its successful execution.
Thank You,
Regards,
Rupesh
Edited by: Rupesh Mhatre on Jan 14, 2009 3:24 PM
Edited by: Rupesh Mhatre on Jan 14, 2009 3:28 PM
‎2009 Jan 14 2:42 PM
refresh objects.
clear objects.
move relation-plvar to objects-plvar.
move relation-otype to objects-otype.
move relation-objid to objects-objid.
append objects.
call function 'RH_READ_INFTY'
exporting
infty = '1001'
begda = relation-begda
endda = relation-endda
tables
innnn = local_p1001
objects = objects
exceptions
others = 0.
loop at local_p1001 where otype = relation-otype
and objid = relation-objid
and relat = relation-relat
and rsign = relation-rsign
and begda = relation-begda
and endda = relation-endda
and sobid = relation-sobid
and sclas = relation-sclas.
relation = local_p1001.
exit.
endloop.
As you can see here, first he will get every record between the 2 dates (begda and endda) for the object given in parameters otype and objid. Then it's doing a loop for all of those and checking for otype, objid, relat, rsign, begda and endda (and here it's equal and not between), sobid and sclas. So basically you will need to fill all these fields with the exact values of the record you wish to delete.
‎2009 Jan 14 2:42 PM
refresh objects.
clear objects.
move relation-plvar to objects-plvar.
move relation-otype to objects-otype.
move relation-objid to objects-objid.
append objects.
call function 'RH_READ_INFTY'
exporting
infty = '1001'
begda = relation-begda
endda = relation-endda
tables
innnn = local_p1001
objects = objects
exceptions
others = 0.
loop at local_p1001 where otype = relation-otype
and objid = relation-objid
and relat = relation-relat
and rsign = relation-rsign
and begda = relation-begda
and endda = relation-endda
and sobid = relation-sobid
and sclas = relation-sclas.
relation = local_p1001.
exit.
endloop.
As you can see here, first he will get every record between the 2 dates (begda and endda) for the object given in parameters otype and objid. Then it's doing a loop for all of those and checking for otype, objid, relat, rsign, begda and endda (and here it's equal and not between), sobid and sclas. So basically you will need to fill all these fields with the exact values of the record you wish to delete.
‎2009 Jun 24 2:10 PM