0% found this document useful (0 votes)
347 views

Call PLSQL From BIP Through A Procedure Call: Solution Details

This document provides steps to call a PL/SQL procedure from Oracle BI Publisher through a custom process, including creating a custom BIP process, setting the SQL query type to procedure call, and providing a PL/SQL block to insert a new record into the strategies and work items tables if no open records exist, returning a success message of 1.

Uploaded by

manikdarshan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
347 views

Call PLSQL From BIP Through A Procedure Call: Solution Details

This document provides steps to call a PL/SQL procedure from Oracle BI Publisher through a custom process, including creating a custom BIP process, setting the SQL query type to procedure call, and providing a PL/SQL block to insert a new record into the strategies and work items tables if no open records exist, returning a success message of 1.

Uploaded by

manikdarshan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Call PLSQL From BIP through a procedure call

Solution Details
1. Creation of custom BIP process:
Below are the steps to create a custom BIP process –

a. Log into Oracle Fusion BI Publisher Enterprise using the xmlpserver URL for user with BI
Administrator Role
b. In the BI Publisher Enterprise Home Page click on ‘Data Model’ Tab from the left hand pane.

c. Within Data Model page, select on Properties  Data Sets and click on Add button in the main
work page to select the option ‘SQL Query’

d. Provide the details as given below. Note that the Type of SQL should be set as ‘Procedure Call’
e. Provide the following PLSQL block in the SQL query section.

declare
TYPE refcursor IS REF CURSOR;
xdo_cursor refcursor;
msg varchar2(100);
l_cnt number;
v_STRATEGY_ID number;
v_WORK_ITEM_ID number;
v_rowid1 VARCHAR2(24);
v_rowid2 VARCHAR2(24);

BEGIN
msg:=0;
begin
select count(1) into l_cnt from iex_strategy_work_items wkitem,iex_strategies str
where str.strategy_id=wkitem.strategy_id
And str.status_code NOT in ('CLOSED','CANCELLED')
AND wkitem.status_code in ('OPEN','PRE-WAIT');
if l_cnt = 0 then
SELECT S_ROW_ID_SEQ.nextval INTO v_STRATEGY_ID FROM dual;
iex_strategies_pkg.insert_row(x_rowid => v_rowid1,
x_strategy_id => v_strategy_id,
x_status_code => 'OPEN',
x_strategy_template_id => NULL,
x_delinquency_id => NULL,
x_object_type => NULL,
x_object_id => NULL,
x_cust_account_id => NULL,
x_party_id => NULL,
x_score_value => NULL,
x_next_work_item_id => NULL,
x_user_work_item_yn => NULL,
x_last_update_date => sysdate,
x_last_updated_by => '-1',
x_last_update_login => '-1',
x_creation_date => sysdate,
x_created_by => '-1',
x_object_version_number => 1,
x_request_id => NULL,
x_program_application_id => NULL,
x_program_id => NULL,
x_program_update_date => NULL,
x_checklist_yn => NULL,
x_checklist_strategy_id => NULL,
x_strategy_level => NULL,
x_jtf_object_type => NULL,
x_jtf_object_id => NULL,
x_customer_site_use_id => NULL,
x_org_id => NULL,
x_stry_assign_matrix_id => NULL);
SELECT S_ROW_ID_SEQ.nextval INTO v_WORK_ITEM_ID FROM dual;

IEX_STRATEGY_WORK_ITEMS_PKG.Insert_Row(
x_rowid =>v_rowid2
,x_WORK_ITEM_ID => v_WORK_ITEM_ID
,x_STRATEGY_ID => v_STRATEGY_ID
,x_RESOURCE_ID => null
,x_STATUS_CODE => 'OPEN'
,x_LAST_UPDATED_BY => '-1'
,x_LAST_UPDATE_LOGIN => '-1'
,x_CREATION_DATE => SYSDATE
,x_CREATED_BY => '-1'
,x_PROGRAM_ID => null
,x_OBJECT_VERSION_NUMBER => 1
,x_REQUEST_ID => null
,x_LAST_UPDATE_DATE => SYSDATE
,x_WORK_ITEM_TEMPLATE_ID => -1
,x_PROGRAM_APPLICATION_ID => null
,x_PROGRAM_UPDATE_DATE => null
,x_EXECUTE_START => null
,x_EXECUTE_END => null
,x_SCHEDULE_START => null
,x_SCHEDULE_END => null
,x_STRATEGY_TEMP_ID => -1
,x_WORK_ITEM_ORDER => null
,x_ESCALATED_YN => null
,x_PRE_EXECUTION_WAIT => null
,x_PRE_EXECUTION_TIME_UOM => null
,x_POST_EXECUTION_WAIT => null
,x_EXECUTION_TIME_UOM => null
,x_XDO_TEMP_ID => null
,x_optional_yn => null
,x_optional_wait_time => null
,x_optional_wait_time_uom => null
,x_notify_yn => null
,x_escalate_yn => null
,x_escalate_wait_time => null
,x_escalate_wait_time_uom => null
,x_custom_workflow_type => null
,X_TEMPLATE_NAME => null
,x_payment_schedule_id => null
);
COMMIT;
end if;
msg:=1;
exception
when others then msg:=SQLERRM;
end;
OPEN :xdo_cursor FOR select msg from dual;
end;
Click on (1)View Data button then (2) View button and then verify the result as 1 for success

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy