{"id":7662,"date":"2015-09-15T21:46:38","date_gmt":"2015-09-16T00:46:38","guid":{"rendered":"http:\/\/www.orabr.com\/api-para-adicionar-usuario-e-para-atribuir-responsabilidades-no-oracle-ebsapps\/"},"modified":"2019-04-17T23:53:04","modified_gmt":"2019-04-18T02:53:04","slug":"api-para-adicionar-usuario-e-para-atribuir-responsabilidades-no-oracle-ebsapps","status":"publish","type":"post","link":"https:\/\/orabr.virttus.com\/?p=7662","title":{"rendered":"API para adicionar usu\u00e1rio e para atribuir responsabilidades no Oracle EBS\/APPS"},"content":{"rendered":"<HTML><HTML>\n<pre class=\"wp-block-code\"><code>\n\n-------------------------------------- \n-- API ORACLE PARA ADICIONAR USU\u00c1RIO\n-- -------------------------------------- \nDECLARE \n   lc_user_name                      VARCHAR2(100)  := 'TESTE_USER'; \n   lc_user_password                  VARCHAR2(100)  := 'Oracle123'; \n   ld_user_start_date                DATE           := TO_DATE('23-JUN-2012'); \n   ld_user_end_date                  VARCHAR2(100)  := NULL; \n   ld_password_date                  VARCHAR2(100)  := SYSDATE; \n   ld_password_lifespan_days         NUMBER         := 90; \n   ln_person_id                      NUMBER         := NULL; -- AQUI SERIA O ID DE UMA PESSOA CADASTRADA NO HR exemplo, funcion\u00e1rio.\n   lc_email_address                  VARCHAR2(100)  := 'teste_user@abc.com';\nBEGIN \n  fnd_user_pkg.createuser (x_user_name                => lc_user_name, \n                           x_owner                    => NULL, \n                           x_unencrypted_password     => lc_user_password, \n                           x_start_date               => ld_user_start_date, \n                           x_end_date                 => ld_user_end_date, \n                           x_password_date            => ld_password_date, \n                           x_password_lifespan_days   => ld_password_lifespan_days, \n                           x_employee_id              => ln_person_id, \n                           x_email_address            => lc_email_address); \n COMMIT;\nEXCEPTION \n  WHEN OTHERS THEN \n    ROLLBACK; \n      DBMS_OUTPUT.PUT_LINE(SQLERRM); \nEND; \n\/\n\n-- ---------------------------------------------------------- \n-- API PARA ADICIONAR RESPONSABILIDADES PARA UM USU\u00c1RIO\n-- ----------------------------------------------------------- \nDECLARE \n    lc_user_name              VARCHAR2(100)    := 'TESTE_USER'; \n    lc_resp_appl_short_name   VARCHAR2(100)    := 'FND'; \n    lc_responsibility_key     VARCHAR2(100)    := 'APPLICATION_DEVELOPER'; \n    lc_security_group_key     VARCHAR2(100)    := 'STANDARD'; \n    ld_resp_start_date        DATE             := SYSDATE; \n    ld_resp_end_date          DATE             := NULL; \n\nBEGIN \n     fnd_user_pkg.addresp(username           => lc_user_name, \n                          resp_app            => lc_resp_appl_short_name, \n                          resp_key            => lc_responsibility_key, \n                          security_group      => lc_security_group_key, \n                          description         => NULL, \n                          start_date          => ld_resp_start_date, \n                          end_date            => ld_resp_end_date);\n COMMIT; \nEXCEPTION \n  WHEN OTHERS THEN \n    ROLLBACK; \n      DBMS_OUTPUT.PUT_LINE(SQLERRM); \nEND; \n\n<\/code><\/pre>\n<\/HTML><\/HTML>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,127,124,110],"tags":[],"class_list":["post-7662","post","type-post","status-publish","format-standard","hentry","category-base-de-conhecimentos","category-applications","category-database","category-estudo-e-pesquisa"],"_links":{"self":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts\/7662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7662"}],"version-history":[{"count":1,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts\/7662\/revisions"}],"predecessor-version":[{"id":18144,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts\/7662\/revisions\/18144"}],"wp:attachment":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}