{"id":1827,"date":"2011-04-17T14:18:39","date_gmt":"2011-04-17T14:18:39","guid":{"rendered":"http:\/\/sendyoursmiles.com\/?p=1827"},"modified":"2011-04-17T14:18:39","modified_gmt":"2011-04-17T14:18:39","slug":"script-to-end-date-responsibility-for-a-user","status":"publish","type":"post","link":"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user","title":{"rendered":"Script to End Date Responsibility for a User"},"content":{"rendered":"<p>This script below will get the list of all inactive users and end date all the responsibilities assigned to them.<\/p>\n<p><code><\/p>\n<p>Declare<br \/>\n  --cursor to get all inactive users<br \/>\n  CURSOR cur_inactive_user<br \/>\n  IS<br \/>\n        select<br \/>\n        fu.user_id,<br \/>\n        fd.responsibility_id,<br \/>\n        fd.responsibility_application_id,<br \/>\n        fd.security_group_id,<br \/>\n        fd.start_date,<br \/>\n        fd.end_date<br \/>\n    from<br \/>\n        fnd_user fu,<br \/>\n        fnd_user_resp_groups_direct fd<br \/>\n    where<br \/>\n        fu.user_id = fd.user_id<br \/>\n        and  (fu.end_date &lt;= sysdate or fu.end_date is NOT NULL)<br \/>\n        and fd.end_date is null;<\/p>\n<p>BEGIN <\/p>\n<p>FOR rec_inactive_user IN cur_inactive_user<br \/>\nLOOP<\/p>\n<p>--checking if the responsibility is assigned to the user<\/p>\n<p>IF (fnd_user_resp_groups_api.assignment_exists<br \/>\n   (rec_inactive_user.user_id,<br \/>\n    rec_inactive_user.responsibility_id,<br \/>\n    rec_inactive_user.responsibility_application_id,<br \/>\n    rec_inactive_user.security_group_id)) then                                                                <\/p>\n<p>    -- Call API to End date the responsibility<\/p>\n<p>    fnd_user_resp_groups_api.update_assignment<\/p>\n<p>     (user_id  => rec_inactive_user.user_id,<br \/>\n      responsibility_id => rec_inactive_user.responsibility_id,<br \/>\n      responsibility_application_id => rec_inactive_user.responsibility_application_id,<br \/>\n      security_group_id =>  rec_inactive_user.security_group_id ,<br \/>\n      start_date => rec_inactive_user.start_date ,<br \/>\n      end_date => rec_inactive_user.end_date,<br \/>\n      description => NULL);      <\/p>\n<p>    COMMIT;                                                                                          <\/p>\n<p>END IF;<br \/>\nEND LOOP;<br \/>\nEND;<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This script below will get the list of all inactive users and end date all the responsibilities assigned to them. Declare &#8211;cursor to get all inactive users CURSOR cur_inactive_user IS select fu.user_id, fd.responsibility_id, fd.responsibility_application_id, fd.security_group_id, fd.start_date, fd.end_date from fnd_user fu, fnd_user_resp_groups_direct fd where fu.user_id = fd.user_id and (fu.end_date &lt;= sysdate or fu.end_date is NOT NULL) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-1827","post","type-post","status-publish","format-standard","hentry","category-scripts"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>responsibility end date in oracle apps pl sql api script<\/title>\n<meta name=\"description\" content=\"This script below will get the list of all inactive users and end date all the responsibilities assigned to them.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prudhvi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user#article\",\"isPartOf\":{\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user\"},\"author\":{\"name\":\"Prudhvi\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/dbed9bb7fb66aa7a700fc565da024512\"},\"headline\":\"Script to End Date Responsibility for a User\",\"datePublished\":\"2011-04-17T14:18:39+00:00\",\"dateModified\":\"2011-04-17T14:18:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user\"},\"wordCount\":28,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\"},\"articleSection\":[\"Scripts\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user\",\"url\":\"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user\",\"name\":\"responsibility end date in oracle apps pl sql api script\",\"isPartOf\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#website\"},\"datePublished\":\"2011-04-17T14:18:39+00:00\",\"dateModified\":\"2011-04-17T14:18:39+00:00\",\"description\":\"This script below will get the list of all inactive users and end date all the responsibilities assigned to them.\",\"breadcrumb\":{\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/erpschools.com\/erps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Script to End Date Responsibility for a User\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/erpschools.com\/erps\/#website\",\"url\":\"https:\/\/erpschools.com\/erps\/\",\"name\":\"erpSchools\",\"description\":\"Oracle Apps\",\"publisher\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/erpschools.com\/erps\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\",\"name\":\"erpSchools\",\"url\":\"https:\/\/erpschools.com\/erps\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png\",\"contentUrl\":\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png\",\"width\":250,\"height\":60,\"caption\":\"erpSchools\"},\"image\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"http:\/\/facebook.com\/erpschools\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/dbed9bb7fb66aa7a700fc565da024512\",\"name\":\"Prudhvi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/488cec3605845b95cb20e60c67a8f5c7e74b65a305525c8006315d524f120db9?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/488cec3605845b95cb20e60c67a8f5c7e74b65a305525c8006315d524f120db9?s=96&d=blank&r=g\",\"caption\":\"Prudhvi\"},\"sameAs\":[\"http:\/\/www.erpschools.com\"],\"url\":\"https:\/\/erpschools.com\/erps\/author\/prudhvi\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"responsibility end date in oracle apps pl sql api script","description":"This script below will get the list of all inactive users and end date all the responsibilities assigned to them.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user","twitter_misc":{"Written by":"Prudhvi","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user#article","isPartOf":{"@id":"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user"},"author":{"name":"Prudhvi","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/dbed9bb7fb66aa7a700fc565da024512"},"headline":"Script to End Date Responsibility for a User","datePublished":"2011-04-17T14:18:39+00:00","dateModified":"2011-04-17T14:18:39+00:00","mainEntityOfPage":{"@id":"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user"},"wordCount":28,"commentCount":0,"publisher":{"@id":"https:\/\/erpschools.com\/erps\/#organization"},"articleSection":["Scripts"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user#respond"]}]},{"@type":"WebPage","@id":"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user","url":"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user","name":"responsibility end date in oracle apps pl sql api script","isPartOf":{"@id":"https:\/\/erpschools.com\/erps\/#website"},"datePublished":"2011-04-17T14:18:39+00:00","dateModified":"2011-04-17T14:18:39+00:00","description":"This script below will get the list of all inactive users and end date all the responsibilities assigned to them.","breadcrumb":{"@id":"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/erpschools.com\/erps\/scripts\/script-to-end-date-responsibility-for-a-user#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/erpschools.com\/erps"},{"@type":"ListItem","position":2,"name":"Script to End Date Responsibility for a User"}]},{"@type":"WebSite","@id":"https:\/\/erpschools.com\/erps\/#website","url":"https:\/\/erpschools.com\/erps\/","name":"erpSchools","description":"Oracle Apps","publisher":{"@id":"https:\/\/erpschools.com\/erps\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/erpschools.com\/erps\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/erpschools.com\/erps\/#organization","name":"erpSchools","url":"https:\/\/erpschools.com\/erps\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/","url":"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png","contentUrl":"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png","width":250,"height":60,"caption":"erpSchools"},"image":{"@id":"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/"},"sameAs":["http:\/\/facebook.com\/erpschools"]},{"@type":"Person","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/dbed9bb7fb66aa7a700fc565da024512","name":"Prudhvi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/488cec3605845b95cb20e60c67a8f5c7e74b65a305525c8006315d524f120db9?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/488cec3605845b95cb20e60c67a8f5c7e74b65a305525c8006315d524f120db9?s=96&d=blank&r=g","caption":"Prudhvi"},"sameAs":["http:\/\/www.erpschools.com"],"url":"https:\/\/erpschools.com\/erps\/author\/prudhvi"}]}},"_links":{"self":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts\/1827","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/comments?post=1827"}],"version-history":[{"count":0,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts\/1827\/revisions"}],"wp:attachment":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/media?parent=1827"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/categories?post=1827"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/tags?post=1827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}