<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Function module:RH_RELATION_DELETE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-rh-relation-delete/m-p/4979770#M1160411</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;         I want to delete the relationship between position(S) and person(P).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         I know the FM 'RH_RELATION_DELETE' can be used to for this purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         I tried execution it but desired output was not achieved and I received an exception ' NOT_FOUND'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        If anyone of you have used it earlier please share ur knowledge regarding the same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       I need to know what all params needs to pass for its successful execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rupesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rupesh Mhatre on Jan 14, 2009 3:24 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rupesh Mhatre on Jan 14, 2009 3:28 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jan 2009 14:24:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-14T14:24:22Z</dc:date>
    <item>
      <title>Function module:RH_RELATION_DELETE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-rh-relation-delete/m-p/4979770#M1160411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;         I want to delete the relationship between position(S) and person(P).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         I know the FM 'RH_RELATION_DELETE' can be used to for this purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         I tried execution it but desired output was not achieved and I received an exception ' NOT_FOUND'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        If anyone of you have used it earlier please share ur knowledge regarding the same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       I need to know what all params needs to pass for its successful execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rupesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rupesh Mhatre on Jan 14, 2009 3:24 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rupesh Mhatre on Jan 14, 2009 3:28 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 14:24:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-rh-relation-delete/m-p/4979770#M1160411</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-14T14:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Function module:RH_RELATION_DELETE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-rh-relation-delete/m-p/4979771#M1160412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
  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.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 14:42:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-rh-relation-delete/m-p/4979771#M1160412</guid>
      <dc:creator>PedroGuarita</dc:creator>
      <dc:date>2009-01-14T14:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Function module:RH_RELATION_DELETE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-rh-relation-delete/m-p/4979772#M1160413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 13:10:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-rh-relation-delete/m-p/4979772#M1160413</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-24T13:10:04Z</dc:date>
    </item>
  </channel>
</rss>

