DECLARE
n_audit_id NUMBER;
V_txt varchar2(2000):= null;
v_ionc VARCHAR2(10) := null;
BEGIN
SELECT audit_id
INTO n_audit_id
FROM q_queues
WHERE queue_id = (SELECT queue_id
FROM q_items
WHERE item_id = TO_NUMBER (:p71_item_id));
:P71_AUDIT_ID := n_audit_id;
select ionc into :P71_IONC from ta_audits where audit_id = :P71_audit_id;
begin
select IONC_CODE into v_ionc from TA_IONCS where item_id = :P71_item_id;
exception
when others then
v_ionc := NULL;
end;
HTP.p ('<table style="width: 90%" align="center"><tr style="vertical-align: top"><td>
<table class="info">
<tr><th colspan="2">Data Elements</th></tr>');
FOR r_c1 IN ( SELECT e.data_element, e.position, e.display_pos,
CASE e.field_id
WHEN 'E1' THEN qd.E1 WHEN 'E2' THEN qd.E2 WHEN 'E3' THEN qd.E3 WHEN 'E4' THEN qd.E4
WHEN 'E5' THEN qd.E5 WHEN 'E6' THEN qd.E6 WHEN 'E7' THEN qd.E7 WHEN 'E8' THEN qd.E8
WHEN 'E9' THEN qd.E9
WHEN 'E10' THEN qd.E10
when 'E11' then qd.E11
when 'E12' then qd.E12
when 'E13' Then qd.E13
when 'E14' then qd.e14
when 'E15' Then qd.E15
END element_value ,e.EDITABLE_FLAG ,E.DATA_TYPE
FROM ta_data_elements e, (SELECT qd.E1, qd.E2, qd.E3, qd.E4,
qd.E5, qd.E6, qd.E7, qd.E8, qd.E9, qd.E10, qd.E11, qd.E12, qd.E13, qd.E14, qd.E15
FROM q_item_details_ta qd
WHERE qd.item_id = TO_NUMBER (:p71_item_id)) qd
WHERE audit_id = n_audit_id
AND NVL (display_pos,0)>0
ORDER BY display_pos )
LOOP
IF r_c1.display_pos > 0 THEN
HTP.p ( '
<tr><td style="font-weight: bold; width:150px ">'
r_c1.data_element
'</td><td>'
(case
when r_c1.EDITABLE_FLAG = 'Y' and r_c1.DATA_TYPE != 'D' then
APEX_ITEM.text (50,r_c1.element_value)
when r_c1.EDITABLE_FLAG ='N' then
r_c1.element_value
when r_c1.EDITABLE_FLAG ='Y' and r_c1.DATA_TYPE = 'D' and :P71_AUDIT_ID = 17 then
APEX_ITEM.DATE_POPUP(50,null,pkg_audit.convert_date(r_c1.element_value),'MM/DD/YYYY HH:MI:SS AM')
when r_c1.EDITABLE_FLAG ='Y' and r_c1.DATA_TYPE = 'D' then
APEX_ITEM.DATE_POPUP(50,null,pkg_audit.convert_date(r_c1.element_value),'MM/DD/YYYY')
else
r_c1.element_value
end)
'</td></tr>');
END IF;
dbms_output.put_line(v_txt);
END LOOP;
htp.p('
</table>
</td>
</table>');
end;
Objective of this blog is to share my oracle knowledge with the people who are working in oracle.
Labels
Accrual
(1)
Advanced Pricing
(1)
Alert in OAF
(1)
Alter Session in PLSQL
(3)
AME
(1)
AP
(8)
APEX
(6)
API
(2)
AR
(5)
AR Receipts
(1)
ASCP
(1)
Auto Invoice
(1)
BOM
(6)
Bulk Operations
(1)
Conversion Util PKG
(1)
Cost Management
(4)
Costing
(4)
CST
(1)
Customer
(1)
DBA
(1)
DFF
(1)
Discoverer
(6)
FND
(3)
FNDLOADER
(1)
Forms
(3)
General issues
(1)
GL
(6)
HCM
(1)
Hints
(1)
HRMS
(10)
Indexes
(1)
Install Base Conversion
(1)
Interview Questions
(2)
Inventory
(3)
Inverntory
(11)
iProcurement
(4)
Javascript
(1)
MOAC
(1)
OAF
(9)
OBIEE
(1)
Oracle Alerts
(2)
Oracle DB
(4)
Oracle DBA
(1)
Oracle EBS
(1)
Oracle Installation
(1)
Oracle Reports
(4)
Order Management
(7)
Payables
(14)
Payments
(2)
PLSQL
(45)
PLSQL Tunning
(6)
PO
(11)
Queries
(1)
Receivables
(7)
Service Contracts
(1)
Service Requests
(2)
SESSION
(1)
Shell Scripts in Oracle apps
(1)
SLA
(2)
SQL
(31)
SQL LOADER
(4)
SQl TUNNING
(4)
Supplier
(1)
System Administrator
(46)
TCA
(5)
Unix
(4)
UTL_FILE
(1)
WIP
(4)
WORKFLOW
(4)
XLA
(3)
XML/BI Publisher
(11)
No comments:
Post a Comment