Thursday 15 July 2021

Oracle Webadi Tables?

BNE_INTEGRATORS_B à Integrator
BNE_LAYOUTS_B à Layout
BNE_LAYOUT_COLS à Layout Columns
BNE_MAPPINGS_B à Mapping
BNE_CONTENTS_B à Content
BNE_INTERFACES_B à Interface

Wednesday 14 July 2021

FNDLOAD Script for Webadi

Integrator
FNDLOAD apps/apps 0 Y DOWNLOAD $BNE_TOP/patch/115/import/bneintegrator.lct XXXX_AP_INV_INT_XINTG.ldt BNE_INTEGRATORS INTEGRATOR_ASN=SQLAP INTEGRATOR_CODE=XXXX_AP_INV_INT_XINTG 

FNDLOAD apps/apps 0 Y UPLOAD $BNE_TOP/patch/115/import/bneintegrator.lct XXXX_AP_INV_INT_XINTG.ldt 

Layout
FNDLOAD apps/apps 0 Y DOWNLOAD $BNE_TOP/patch/115/import/bnelay.lct XXXX_AR_INV_INT_LAYOUT.ldt BNE_LAYOUTS LAYOUT_ASN=SQLAP LAYOUT_CODE=XXXXAPINVINTERFACEINTEGRATOR 

FNDLOAD apps/apps 0 Y UPLOAD $BNE_TOP/patch/115/import/bnelay.lct XXXX_AP_INV_INT_LAYOUT.ldt 

Mapping
FNDLOAD apps/apps 0 Y DOWNLOAD $BNE_TOP/admin/import/bnemap.lct XXXX_APINV_IFACE_MAP.ldt BNE_MAPPINGS MAPPING_ASN="SQLAP" MAPPING_CODE="XXXX_APINV_IFACE_MAP"

FNDLOAD apps/apps 0 Y UPLOAD $BNE_TOP/patch/115/import/bnemap.lct XXXX_APINV_IFACE_MAP.ldt 

Content
FNDLOAD apps/apps 0 Y DOWNLOAD $BNE_TOP/patch/115/import/bnecont.lct XXXX_AP_INV_INT_CNT2.ldt BNE_CONTENTS CONTENT_ASN=SQLAP CONTENT_CODE=XXXX_AP_INV_INT_CNT2 

FNDLOAD apps/apps 0 Y UPLOAD $BNE_TOP/patch/115/import/bnecont.lct XXXX_AP_INV_INT_CNT2.ldt 

Standard Concurrent program to import Service Contracts from Order Management?

Run “Service Contracts Order Processing” Program to import the service contract from order management. 

Service Contract tables?

OKC_K_HEADERS_ALL_B
OKS_K_HEADERS_ALL_B
OKC_K_LINES_B
OKC_K_ITEMS
OKC_K_REL_OBJS
OKS_BILL_TRANSACTIONS
OKS_BILL_TXN_LINES
OKS_BILL_CONT_LINES
OKS_BILL_SUB_LINES
OKS_BILL_CONT_LINES
OKS_LEVEL_ELEMENTS
CSI_ITEM_INSTANCES

Query to findout Workflow Listeners Status

          SELECT   DISTINCT fcq.concurrent_queue_id,
                           fcq.concurrent_queue_name,
                           fcq.user_concurrent_queue_name,
                           fsc.component_status
         FROM     apps.fnd_concurrent_queues_vl fcq,
                  fnd_svc_components fsc
         WHERE    fsc.concurrent_queue_id = fcq.concurrent_queue_id
         AND      fcq.concurrent_queue_name IN ('WFALSNRSVC',
                                                'WFMLRSVC',
                                                'WFWSSVC')
         ORDER BY fcq.concurrent_queue_id;

Script to Activate and Deactivate Oracle EBS Workflow Listeners

CREATE OR REPLACE PACKAGE apps.workflow_listener_pkg
AS
   PROCEDURE MAIN(p_errbuf    OUT VARCHAR2,
                  p_retcode   OUT VARCHAR2);
END workflow_listener_pkg;


CREATE OR REPLACE PACKAGE BODY apps.workflow_listener_pkg
AS
   PROCEDURE MAIN(p_errbuf    OUT VARCHAR2,
                  p_retcode   OUT VARCHAR2)
   IS
      ln_spid   NUMBER;
  ln_user_id             NUMBER := fnd_profile.VALUE('USER_ID');
      ln_responsibility_id   apps.fnd_responsibility.responsibility_id%TYPE := fnd_profile.VALUE('RESP_ID');
      ln_resp_appl_id        apps.fnd_responsibility.application_id%TYPE := fnd_profile.VALUE('RESP_APPL_ID');
  
      CURSOR cur_wfsrv
      IS
         SELECT   DISTINCT fcq.concurrent_queue_id,
                           fcq.concurrent_queue_name,
                           fcq.user_concurrent_queue_name
         FROM     apps.fnd_concurrent_queues_vl fcq,
                  fnd_svc_components fsc
         WHERE    fsc.concurrent_queue_id = fcq.concurrent_queue_id
         AND      fcq.concurrent_queue_name IN ('WFALSNRSVC',
                                                'WFMLRSVC')
         AND      fsc.component_status = 'STOPPED'
         AND      fsc.component_id NOT IN (10040,
                                           10042)
         ORDER BY fcq.concurrent_queue_id;
   BEGIN
      -- WFMLRSVC : Workflow Mailer Service
  -- WFALSNRSVC : Workflow Agent Listener Service
      -- WFWSSVC : Workflow Document Web Services Service
      fnd_file.put_line(fnd_file.LOG, 'Workflow Listeners Program start');
  
  fnd_file.put_line(fnd_file.LOG, 'ln_user_id:' || ln_user_id);
      fnd_file.put_line(fnd_file.LOG, 'ln_responsibility_id:' || ln_responsibility_id);
      fnd_file.put_line(fnd_file.LOG, 'ln_resp_appl_id:' || ln_resp_appl_id);
      fnd_global.apps_initialize(ln_user_id, ln_responsibility_id, ln_resp_appl_id);
  
      FOR rec_wfsrv IN cur_wfsrv
      LOOP
         fnd_file.put_line(fnd_file.LOG, 'loop start');
         fnd_file.put_line(fnd_file.LOG, 'user_concurrent_queue_name:' || rec_wfsrv.user_concurrent_queue_name);
         fnd_file.put_line(fnd_file.LOG, 'concurrent_queue_name:' || rec_wfsrv.concurrent_queue_name);
         ln_spid   := fnd_request.submit_svc_ctl_request(command => 'ACTIVATE', service => rec_wfsrv.concurrent_queue_name, service_app => 'FND');
         fnd_file.put_line(fnd_file.LOG, 'ln_spid:' || ln_spid);

         IF ln_spid = 0 THEN
            fnd_file.put_line(fnd_file.LOG, 'IF ln_spid = 0:' || fnd_message.get);
         END IF;

         fnd_file.put_line(fnd_file.LOG, 'loop end');
      END LOOP;
      fnd_file.put_line(fnd_file.LOG, 'Workflow Listeners Program end');
   EXCEPTION
      WHEN OTHERS THEN
         fnd_file.put_line(fnd_file.LOG, 'In Main Exception :' || SQLCODE || ' - ' || SQLERRM);
         p_retcode   := 2;
         p_errbuf    := SQLCODE || ' - ' || SQLERRM;
   END MAIN;
END workflow_listener_pkg;
/

Note:
For Activate
spid   := fnd_request.submit_svc_ctl_request(command => 'ACTIVATE', service => l_cqname, service_app => 'FND');

For Deactivate
spid   := fnd_request.submit_svc_ctl_request(command => 'DEACTIVATE', service => l_cqname, service_app => 'FND');

For Abort
spid   := fnd_request.submit_svc_ctl_request(command => 'ABORT', service => l_cqname, service_app => 'FND');