{"id":316,"date":"2009-11-20T10:44:30","date_gmt":"2009-11-20T08:44:30","guid":{"rendered":"http:\/\/oracle.malin.pl\/?p=316"},"modified":"2015-04-09T13:53:30","modified_gmt":"2015-04-09T11:53:30","slug":"administracja-zleceniami-wspolbieznymi-z-poziomu-bazy","status":"publish","type":"post","link":"http:\/\/oracle.malin.pl\/?p=316","title":{"rendered":"administracja Zleceniami Wsp\u00f3\u0142bie\u017cnymi z poziomu bazy"},"content":{"rendered":"<h1>Concurrent Program Registration Scripts<\/h1>\n<p>The scripts in this article can be used to:<br \/>\n1)    Register the executable and Program<br \/>\n2)    Attach Concurrent program to a Request Group<br \/>\n3)    Submit Concurrent program<!--more--><\/p>\n<h2>1)    Registering the Executable from back end<\/h2>\n<p>Usually we create executable in the front-end, but this can be done from the database tier i.e. back-end too.<br \/>\nBelow is the PL\/SQL code to create an executable from back-end.<\/p>\n<p>         BEGIN<\/p>\n<p>              FND_PROGRAM.executable(&#8217;XXMZ_ERPSCHOOLS_EMPLOYEE&#8217; &#8212; executable<\/p>\n<p>                                                              , 'XXMZ Custom&#8217; &#8212; application<\/p>\n<p>                                                              , 'XXMZ_ERPSCHOOLS_EMPLOYEE&#8217; &#8212; short_name<\/p>\n<p>                                                              , 'Executable for ERPSCHOOLS Employee INFORMATION&#8217; &#8212; description<\/p>\n<p>                                                              , 'PL\/SQL Stored Procedure&#8217; &#8212; execution_method<\/p>\n<p>                                                              , 'XXMZ_ERPSCHOOLS_EMPLOYEE&#8217; &#8212; execution_file_name<\/p>\n<p>                                                              , &#8221; &#8212; subroutine_name<\/p>\n<p>                                                              , &#8221; &#8212; Execution File Path<\/p>\n<p>                                                              , 'US&#8217; &#8212; language_code<\/p>\n<p>                                                              , &#8221;);<\/p>\n<p>             COMMIT;<\/p>\n<p>         END;<br \/>\nQuery in the front-end to see whether your executable is created or not.<\/p>\n<h2>2)    Registering the Concurrent program from back end<\/h2>\n<p>Usually we create Concurrent program in the front-end, but this can be done from the database tier too.<br \/>\nBelow is the program to create a Concurrent program from back-end.<\/p>\n<p>            BEGIN<\/p>\n<p>                     FND_PROGRAM.register(&#8217;Concurrent program for ErpSchools Employee Information&#8217; &#8212; program<\/p>\n<p>                                                                , 'XXMZ Custom&#8217; &#8212; application<\/p>\n<p>                                                                , 'Y&#8217; &#8212; enabled<\/p>\n<p>                                                                , 'XXMZ_ERPSCHOOLS_EMPLOYEE&#8217; &#8212; short_name<\/p>\n<p>                                                                , 'ErpSchools Employee Information&#8217; &#8212; description<\/p>\n<p>                                                                , 'XXMZ_ERPSCHOOLS_EMPLOYEE&#8217; &#8212; executable_short_name<\/p>\n<p>                                                                , 'XXMZ Custom&#8217; &#8212; executable_application<\/p>\n<p>                                                                , &#8221; &#8212; execution_options<\/p>\n<p>                                                                , &#8221; &#8212; priority<\/p>\n<p>                                                                , 'Y&#8217; &#8212; save_output<\/p>\n<p>                                                                , 'Y&#8217; &#8212; print<\/p>\n<p>                                                                , &#8221; &#8212; cols<\/p>\n<p>                                                                , &#8221; &#8212; rows<\/p>\n<p>                                                                , &#8221; &#8212; style<\/p>\n<p>                                                                , 'N&#8217; &#8212; style_required<\/p>\n<p>                                                                , &#8221; &#8212; printer<\/p>\n<p>                                                                , &#8221; &#8212; request_type<\/p>\n<p>                                                                , &#8221; &#8212; request_type_application<\/p>\n<p>                                                                , 'Y&#8217; &#8212; use_in_srs<\/p>\n<p>                                                                , 'N&#8217; &#8212; allow_disabled_values<\/p>\n<p>                                                                , 'N&#8217; &#8212; run_alone<\/p>\n<p>                                                                , 'TEXT&#8217; \u00e2\u20ac\u201c output_type<\/p>\n<p>                                                                , 'N&#8217; &#8212; enable_trace<\/p>\n<p>                                                                , 'Y&#8217; &#8212; restart<\/p>\n<p>                                                                , 'Y&#8217; &#8212; nls_compliant<\/p>\n<p>                                                                , &#8221; &#8212; icon_name<\/p>\n<p>                                                                , 'US&#8217;); &#8212; language_code<\/p>\n<p>                        COMMIT;<\/p>\n<p>            END;<br \/>\nQuery in the front-end to see whether your Concurrent program is created or not.<\/p>\n<h2>3)    Attaching the concurrent program to the request group<\/h2>\n<p>Usually we Attach Concurrent program to the request group in the front-end, but this can be done from database tier too.<br \/>\nBelow is the program to Attach Concurrent program to the request group from back-end.<\/p>\n<pre>         BEGIN\r\n\r\n                        FND_PROGRAM.add_to_group('XXMZ_ERPSCHOOLS_EMPLOYEE' -- program_short_name\r\n\r\n                                                                             , 'XXMZ Custom' -- application\r\n\r\n                                                                             , 'xxmz Request Group' -- Report Group Name\r\n\r\n                                                                             , 'XXMZ'); -- Report Group Application\r\n\r\n                        COMMIT;\r\n\r\n              END;  <\/pre>\n<p>Query in the front-end to see whether your Concurrent program is Attached to Request Group or not.<\/p>\n<h2>4)    Submitting Concurrent Program from Back-end<\/h2>\n<p>We first need to initialize oracle applications session using<\/p>\n<p>                        fnd_global.apps_initialize(user_id,responsibility_id,application_responsibility_id) and then run fnd_request.submit_request<\/p>\n<p>                         DECLARE<\/p>\n<p>                               l_request_id NUMBER(30);<\/p>\n<p>                         begin<\/p>\n<p>                                  FND_GLOBAL.APPS_INITIALIZE (user_id =&gt; 1318, resp_id =&gt; 59966, resp_appl_id =&gt; 20064);<\/p>\n<p>                                  l_request_id:= FND_REQUEST.SUBMIT_REQUEST (&#8217;XXMZ&#8217; &#8211;Application Short name,<\/p>\n<p>'VENDOR_FORM&#8217;&#8211; Concurrent Program Short Name );<\/p>\n<p>                                  DBMS_OUTPUT.PUT_LINE(l_request_id);<\/p>\n<p>                                  commit;<\/p>\n<p>                         end;<\/p>\n<p>                  *****************************************************<\/p>\n<p>To get the resp_id and resp_appl_id use the below queries.<\/p>\n<p>                      &#8211;SELECT APPLICATION_ID, RESPONSIBILITY_ID<\/p>\n<p>                          FROM FND_RESPONSIBILITY_TL<\/p>\n<p>                          WHERE RESPONSIBILITY_NAME=&#8217;xxmz Custom&#8217;<\/p>\n<p>                       &#8211;SELECT USER_ID FROM FND_USER WHERE USER_NAME=&#8217;OPERATIONS&#8217;<\/p>\n<p>*****************************************************<br \/>\nOnce the concurrent program is submitted from back-end, status of the concurrent program can be checked using below query.<br \/>\nSELECT * FROM FND_CONCURRENT_REQUESTS WHERE   REQUEST_ID=2766602<span class=\"Apple-style-span\" style=\"border-collapse: separate; color: #000000; font-family: 'Trebuchet MS',Verdana,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px\"><\/span><span class=\"Apple-style-span\" style=\"font-size: medium\"><\/span><\/p>\n<p>\u0179r\u00f3d\u0142o<\/p>\n<p><a href=\"http:\/\/www.erpschools.com\/Apps\/oracle-applications\/scripts\/Sysadmin-and-AOL\/Concurrent-Program-Registration-Scripts\/index.aspx\">http:\/\/www.erpschools.com\/Apps\/oracle-applications\/scripts\/Sysadmin-and-AOL\/Concurrent-Program-Registration-Scripts\/index.aspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Concurrent Program Registration Scripts The scripts in this article can be used to: 1) Register the executable and Program 2) Attach Concurrent program to a Request Group 3) Submit Concurrent program<\/p>\n","protected":false},"author":20,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[40],"tags":[225,226],"_links":{"self":[{"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts\/316"}],"collection":[{"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=316"}],"version-history":[{"count":4,"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts\/316\/revisions"}],"predecessor-version":[{"id":1168,"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts\/316\/revisions\/1168"}],"wp:attachment":[{"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=316"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}