DBA Data[Home] [Help]

PACKAGE BODY: APPS.PO_CUSTOM_XMLGEN_PKG

Source


1 PACKAGE BODY PO_CUSTOM_XMLGEN_PKG AS
2 /* $Header: PO_CUSTOM_XMLGEN_PKG.plb 120.1.12020000.2 2013/02/11 13:22:53 vegajula noship $ */
3 
4 --========================================================================
5 -- PROCEDURE : generate_xml_fragment       PUBLIC
6 -- PARAMETERS: p_document_id         document id
7 --           : p_revision_num        revision num of the document
8 --           : p_document_type       document type of the document
9 --           : p_document_subtype    document subtype of the document
10 --           : x_custom_xml          output of xml
11 -- COMMENT   : Custom hook to generate XML fragment for document,
12 --             called by PO Output for Communication
13 -- PRE-COND  : NONE
14 -- EXCEPTIONS: NONE
15 -- EXAMPLE CODES: Here is an example of how to program custom code.
16 /**
17 PROCEDURE generate_xml_fragment
18 (p_document_id IN NUMBER
19 , p_revision_num IN NUMBER
20 , p_document_type IN VARCHAR2
21 , p_document_subtype IN VARCHAR2
22 , x_custom_xml OUT NOCOPY CLOB)
23 IS
24   --1). Declare context
25   context DBMS_XMLGEN.ctxHandle;
26 BEGIN
27 
28   --2). Init context with custom query sql statement
29   context := dbms_xmlgen.newContext('select 1,2,3 from dual');
30 
31   --3). Set XML tag of the XML fragment for the result set
32   dbms_xmlgen.setRowsetTag(context,'CUSTOM_RESULT');
33 
34   --4). Set XML tag for each row of the result set
35   dbms_xmlgen.setRowTag(context,NULL);
36 
37   dbms_xmlgen.setConvertSpecialChars (context, TRUE);
38 
39   --5). Call dbms_xmlgen to get XML and assign it to output CLOB
40   x_custom_xml := dbms_xmlgen.getXML(context,DBMS_XMLGEN.NONE);
41 
42   dbms_xmlgen.closeContext(context);
43 EXCEPTION
44   WHEN OTHERS THEN
45   --6). Capture any exceptions and handle them properly
46     NULL;
47 END;
48 */
49 --========================================================================
50 PROCEDURE generate_xml_fragment
51 (p_document_id IN NUMBER
52 , p_revision_num IN NUMBER
53 , p_document_type IN VARCHAR2
54 , p_document_subtype IN VARCHAR2
55 , x_custom_xml OUT NOCOPY CLOB)
56 IS
57 BEGIN
58   -- Custom Function
59   NULL;
60 END;
61 
62 END PO_CUSTOM_XMLGEN_PKG;