XML Function pipe delimiter function error

Hi SQL gurus,
Thank you for any assistance. I was given the below query to use for taking a column that contains values and delimited with "|". below is a sample of the data in that column, the error, and the function with the query:
XML parsing: line 1, character 199, illegal name character
Item - Shim Stock | Type - Sheet | Material - Polyester | Thickness (In.) - 0.0005" | Thickness (mm) - 0.013mm | Thickness Tolerance - +/-0.000025" | Size - 5 x 20" | Width Tolerance - +/-0.0625" | Length Tolerance - +/-0.0625" | Moisture Absorption - 0.08% | Compress To - 1.00% | Color - Silver | Tensile Strength (PSI) - 30,000 psi | Temp. Range (F) - -90 to 300 Degrees | Meets/Exceeds - LP-377 | Package Quantity - 5
CREATE FUNCTION [dbo].[split](
@delimited NVARCHAR(MAX),
@delimiter NCHAR(1)
) RETURNS @t TABLE (id INT IDENTITY(1,1), val NVARCHAR(MAX))
AS
BEGIN
DECLARE @xml XML
SET @xml = N'<t>' + REPLACE(@delimited,@delimiter,'</t><t>') + '</t>'
INSERT INTO @t(val)
SELECT r.value('.','varchar(MAX)') as item
FROM @xml.nodes('/t') as records(r)
RETURN
END
SELECT
ItemNo, 2ItemNo,NameItem , SV.val, sv.id
from #TableWithData v
cross apply dbo.split(v.ColumnwithValues,'|') sv
Edwin Lopera

To get you moving, here is another example of a splitter that works with the examples you supplier:http://andrewtuerk.wordpress.com/2012/08/10/cross-apply-yes-you-can-use-a-table-valued-function-without-a-cursor/

Similar Messages

  • External Parser - XML to Pipe Delimited - Sql Loader BETTER DBMS_XMLSTORE

    Hi All,
    If I have got data in GIGs in a complex format.
    Can Using an External Java based XML Parser to convert XML to Pipe Delimited FIle and then Using SQL Loader
    BE BETTER THAN
    Using XSL to convert to Oracle <ROWSET> <ROW> Format and using DBMS_XMLSTORE to load data into tables.
    In terms of:
    Performace
    Scalability
    Exception Handling
    Regards....

    Go to the {forum:id=34} forum and look at the second page of the XML DB FAQ Thread (stickied to the top of the posts). While it doesn't compare using external tools to parse XML and load via SQL*Loader, it does talk about better ways to load large amounts of XML into the DB. This is also a good thread on the subject too from that forum, {thread:id=1096784}

  • XML Column from table extract to Pipe Delimited Text File

    Hi,
    I have an XML column with large data in a Table ( Source SQL server Database).
    I was asked to   extract    XML column to .txt file using SSIS.
    Is it possible to extract xml column with huge data to text file ?
    when I tried,  select XML column from Table in source , I noticed  that Property of column is taken as [DT_NTEXT] . I Converted it to DT_TEXT as Ansi donot support DT_NTEXT.
    Execution method was success but it failed due to trucation. so wondering is there a way to get XML column extracted to Pipe delimited text file?
    Is it advisable to do this ? or IS It Valid to export XML in Pipe Delimited File ?
    Please Kindly advice
    thanks
    kodi

    Are you looking at shredding data within XML nodes and then importing it to text file or are you looking at exporting XML value as is? Also is SSIS a necessity?
    If not, You can simply use T-SQL for this along with bcp for this. just use a query like
    EXEC xp_cmdshell 'bcp "SELECT CAST(XMLColumn AS varchar(max)) AS Column FROM table" queryout <full file path> -c -S <ServerName> -T -t |'
    provided you use trusted connection (windows authentication)
    see
    http://visakhm.blogspot.in/2013/10/bcp-out-custom-format-data-to-flat-file.html
    If you want to shred the data use Xpath functions in the query as below
    http://visakhm.blogspot.in/2012/10/shred-data-as-well-as-metadata-from-xml.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Error in xml to html transform function in 11g(Help needed urgent)

    We are migrating from 9g to 11g.Code given below is working fine with 9g but giving following error while converting xml to html.
    Error:Exception occurred in XML_TO_HTML :ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00609: Function call with invalid number of arguments in 'position (//USER)'.
    Code :<?xml version='1.0'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="/">
    <HTML>
    <BODY>
    <!--begin header-->
    <xsl:for-each select="AMAP_REMMIT_EMP/HEADERS/HEADER">
    <TABLE border="0" cellpadding="0" cellspacing="0" style="padding:1px" width="100%" height="95" bgcolor="#EAEAEA"><font size="6" face="Arial">amdocs </font>
    <TR >
    <TD width="50%" align="left" ><b/><font size="2" face="Verdana" /> <xsl:value-of select="VENDOR_NAME"/></TD>
    <TD width="50%" align="left"><b/><font size="2" face="Verdana" />Date: <xsl:value-of select="RUN_DATE"/>
    </TD>
    </TR>
    <TR >
    <TD width="50%" align="left" ><b/><font size="2" face="Verdana" /> <xsl:value-of select="ADDRESS"/></TD>
    <TD width="50%" align="left"><b/><font size="2" face="Verdana" /> <xsl:value-of select="TAX_ID"/>
    </TD>
    </TR>
    <TR >
    <TD width="50%" align="left" ><b/><font size="2" face="Verdana" /> <xsl:value-of select="CITY"/> <xsl:value-of select="ZIP"/></TD>
    <TD width="50%" align="left"><b/><font size="2" face="Verdana" />Vendor Number: <xsl:value-of select="OSEK_MURSHE"/>
    </TD>
    </TR>
    <TR >
    <TD width="50%" align="left" ><b/><font size="2" face="Verdana" /> </TD>
    <TD width="50%" align="left"><b/><font size="2" face="Verdana" />Fax Number: <xsl:value-of select="FAX"/>
    </TD>
    </TR>
    </TABLE>
    </xsl:for-each>
    <!--end header-->
    <!--begin lines-->
    <p dir="ltr" align="center">
    <span style="font-family: Arial; text-decoration: underline; font-weight: 700">
    Subject: Remittance Advice</span></p>
    <table border="1" cellspacing="1" width="100%" bgcolor="#C0C0C0">
    <tr>
    <th width="20%"><font face="Arial"><b>Invoice Date</b></font></th>
    <th width="20%"><font face="Arial"><b>Invoice Number</b></font></th>
    <th width="40%"><font face="Arial"><b>Description</b></font></th>
    <th width="20%"><font face="Arial"><b><xsl:value-of select="AMAP_REMMIT_EMP/HEADERS/HEADER/CURRENCY"/> Amount</b></font></th>
    </tr>
    <xsl:for-each select="AMAP_REMMIT_EMP/MERGE_LINE/LINES/LINE">
    <tr>
    <td width="20%" >
    <xsl:attribute name="bgcolor">
    <xsl:if test="position() mod 2 = 0">#DDDDDD</xsl:if>
    <xsl:if test="position() mod 2 = 1">#FFFFCC</xsl:if>
    </xsl:attribute>
    <xsl:value-of select="INVOICE_DATE"/></td>
    <td width="20%" >
    <xsl:attribute name="bgcolor">
    <xsl:if test="position() mod 2 = 0">#DDDDDD</xsl:if>
    <xsl:if test="position() mod 2 = 1">#FFFFCC</xsl:if>
    </xsl:attribute>
    <xsl:value-of select="INVOICE_NUM"/></td>
    <td width="40%" >
    <xsl:attribute name="bgcolor">
    <xsl:if test="position() mod 2 = 0">#DDDDDD</xsl:if>
    <xsl:if test="position() mod 2 = 1">#FFFFCC</xsl:if>
    </xsl:attribute>
    <xsl:value-of select="DESCRIPTION"/></td>
    <td width="20%" >
    <xsl:attribute name="bgcolor">
    <xsl:if test="position() mod 2 = 0">#DDDDDD</xsl:if>
    <xsl:if test="position() mod 2 = 1">#FFFFCC</xsl:if>
    </xsl:attribute>
    <xsl:value-of select="AMOUNT"/></td>
    </tr>
    </xsl:for-each>
    <tr>
    <td width="80%" bgcolor="#FFFFFF" colspan="3" align="right">
    <b>Total Payment:</b></td>
    <td width="20%" bgcolor="#FFFFFF"><xsl:value-of select="//TOTAL"/></td>
    </tr>
    </table>
    <p dir="ltr" align="left"><span style="font-family: Arial"><font size="2">In accordance with your instructions, this amount will be transferred to your <xsl:if test="AMAP_REMMIT_EMP/MERGE_LINE/SITES/SITE/INCLUDE_BANK_DETAILES='Y'">
    account number <xsl:value-of select="AMAP_REMMIT_EMP/MERGE_LINE/LINES/LINE/ACCOUNT"/> in bank
    <xsl:value-of select="AMAP_REMMIT_EMP/MERGE_LINE/LINES/LINE/BANK"/> , branch <xsl:value-of select="AMAP_REMMIT_EMP/MERGE_LINE/LINES/LINE/BRANCH"/>
    on the date of <xsl:value-of select="AMAP_REMMIT_EMP/MERGE_LINE/LINES/LINE/CHECK_DATE"/>.
    </xsl:if>
    <xsl:if test="AMAP_REMMIT_EMP/MERGE_LINE/SITES/SITE/INCLUDE_BANK_DETAILES!='Y'">
    account on the date of <xsl:value-of select="AMAP_REMMIT_EMP/MERGE_LINE/LINES/LINE/CHECK_DATE"/>.
    </xsl:if>
    <xsl:if test="AMAP_REMMIT_EMP/MERGE_LINE/CREDITNOTES/CREDITNOTE/CREDITNOTE>'0'">
    <p>The payment will be credited in two days from the payment date in your account.</p>
    </xsl:if>
    <p>In case this date is not a valid value date in the bank system, the money will be transferred in the next valid value date.</p>
    <xsl:value-of select="AMAP_REMMIT_EMP/MERGE_LINE/NOTES/NOTE/DESCRIPTION"/>
    </font></span></p>
    <TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" height="50">
    <TR >
    <TD width="60%" ></TD>
    <TD width="40%" align="left"><b/><font size="2" face="Verdana" />Yours sincerely,</TD>
    </TR>
    <TR >
    <TD width="60%" ></TD>
    <TD width="40%" align="left"><b/><font size="2" face="Verdana" /> <xsl:value-of select="AMAP_REMMIT_EMP/MERGE_LINE/LINES/LINE/COMPANY_NAME"/></TD>
    </TR>
    <!--end lines-->
    <!--end trailer-->
    </TABLE>
    <table cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-width: 1; padding: 0" bordercolor="#111111" width="100%">
    <tr>
    <td width="34%">Alert No:<xsl:value-of select="AMAP_REMMIT_EMP/HEADERS/HEADER/ALERT_ID"/></td>
    <td width="33%">Environment: <xsl:value-of select="AMAP_REMMIT_EMP/HEADERS/HEADER/DB_NAME"/></td>
    <td width="33%">Date:<xsl:value-of select="AMAP_REMMIT_EMP/HEADERS/HEADER/MAIL_DATE"/></td>
    </tr>
    </table>
    <!--end trailer-->
    </BODY>
    </HTML>
    </xsl:template>
    </xsl:stylesheet>
    Thanks in advance.

    #1. We need to see the code that is being used to invoke the stylesheet.
    #2. We need to see the document that is being transformed...
    It's most likely a bug in 9g which has been fixed in 11g...

  • Error in pipe row function.

    Hi,
    I wrote the below function,if i select the functions,it returns below error
    create or replace
    FUNCTION FUN_CHR_SEP(P_FLAG IN VARCHAR2)
    RETURN COLS_VAL PIPELINED
    AS
    cursor C_CHR_SEP is
    select text from
    (SELECT SUBSTR(
    txt,
    INSTR(',' || txt,',',1,LEVEL),
    INSTR(txt || ',',',',1,LEVEL) - INSTR(',' || txt,',',1,LEVEL)
    ) TEXT
    from (select P_FLAG TXT from DUAL) T
    connect by level <= length(TXT)-length(replace(TXT,',')) + 1);
    BEGIN
    for REC in C_CHR_SEP LOOP
    PIPE ROW (CHR_COLS_VAL(REC.text));
    END LOOP;
    END;
    select * from table(cast(FUN_CHR_SEP('A,C,V,B') as COLS_VAL));
    Error:
    ORA-06503: PL/SQL: Function returned without value
    ORA-06512: at "SHIPLUS.FUN_CHR_SEP", line 18
    Note : CHR_COLS_VAL and COLS_VAL are Type.
    Regards,
    Fame

    This is the forum for SQL Developer (Not for general SQL/PLSQL questions), you should ask your question in the SQL and PL/SQL forum.
    Having said that, your function has no return statement.

  • Pipe lined function error

    Hi can someone tell me whats wrong in the below function code? Its compilation error
    table and Type structure are below for creating the same function.
    SQL> desc tt
    Name                                      Null?    Type
    NO                                                 NUMBER
    NAME                                               VARCHAR2(20)
    SQL> select * from tt;
            NO NAME
            30 WSS
            40 SYS
            10 WSS
            20 SYS
    create or replace type tt_typ as object
    (no number,
    name varchar2(20));
    create or replace type rec_tt_type as table of tt_typ;
    Type created.
    create or replace function fn1 return rec_tt_type  pipelined as
    table_tt  tt%rowtype;
    var_tt tt%rowtype;
    cursor c1 is select * from tt;
    begin
    open c1;
      loop
      fetch c1 into table_tt;
       execute immediate ' select no, name from tt where no = :1'  into var_tt using table_tt.no;
      pipe row(var_tt);
    end loop;
    return;
    end;
    sho err;
    Errors for FUNCTION FN1:
    LINE/COL ERROR
    23/3     PL/SQL: Statement ignored
    23/12    PLS-00382: expression is of wrong type
    SQL>

    SQL> create table tt
    as
       select 30 no, 'WSS' name from dual
       union all
       select 40 no, 'SYS' name from dual
       union all
       select 10 no, 'WSS' name from dual
       union all
       select 20 no, 'SYS' name from dual
    Table created.
    SQL> create or replace type tt_typ as object
       (no number, name varchar2 (20));
    Type created.
    SQL> create or replace type rec_tt_type as table of tt_typ;
    Type created.
    SQL> create or replace function fn1
       return rec_tt_type
       pipelined
    as
       cursor c1
       is
          select * from tt;
       table_tt   c1%rowtype;
       var_tt     c1%rowtype;
    begin
       open c1;
       loop
          fetch c1 into table_tt;
          exit when c1%notfound;
          execute immediate ' select no, name from tt where no = :1 '
             into var_tt
             using table_tt.no;
          pipe row (tt_typ (var_tt.no, var_tt.name));
       end loop;
       return;
    end fn1;
    Function created.
    SQL> select * from table (fn1)
            NO NAME               
            30 WSS                
            40 SYS                
            10 WSS                
            20 SYS                
    4 rows selected.

  • How to load 2 xml galleries in single function loop.

    how to load 2 xml galleries in single function loop.
    my function is--------
    var myGalleryXML = new XML();
    myGalleryXML.ignoreWhite = true;
    myGalleryXML.load("gallery.xml");
    function callThumbs()
        _root.createEmptyMovieClip("wall",_root.getNextHighestDepth());
        wall._x = _root.gallery_x;
        wall._y = _root.gallery_y;
        wall.addEventListener(MouseEvent.CLICK);
        var clipLoader = new MovieClipLoader();
        var preloader = new Object();
        clipLoader.addListener(preloader);
            for (i =0; i <6; i++)
            thumbURL = myImages[i].attributes.thumb_url;
            myThumb_mc = wall.createEmptyMovieClip(i, wall.getNextHighestDepth());
            myThumb_mc._x = _root.thumb_height * i;
            myThumb_mc._x = _root.thumb_position = -3100 + (i-j) * 765;
       clipLoader.loadClip("shop/" + thumbURL,myThumb_mc);  // i want to load this  by xml gallery "gallery1.xml"
    preloader.onLoadStart = function(target)
                target.createTextField("my_txt",target.getNextHighestDepth(),0,0,10,10);
                target.my_txt.selectable = false;
            preloader.onLoadProgress = function(target, loadedBytes, totalBytes)
                target.my_txt.text = Math.floor((loadedBytes / totalBytes) * 100);
            preloader.onLoadComplete = function(target)
                new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
                target.my_txt.removeTextField();
                target.onRelease = function()
                    callFullImage(this._name);
                target.onRollOver = function()
                    this._alpha = 100;
                target.onRollOut = function()
                    this._alpha = 100;
        for (i = 0; i < 6; i++)
            thumbURL = myImages[i].attributes.thumb_url;
            myThumb_mc = wall.createEmptyMovieClip(i, wall.getNextHighestDepth());
            myThumb_mc._x = _root.thumb_height * i;
            myThumb_mc._x = _root.thumb_position = -7210 + (i-j) * 765;
            myThumb_mc._y = _root.thumb_position = 180;
            clipLoader.loadClip("banner/" + thumbURL,myThumb_mc);  // i want to load this  by xml gallery "gallery2.xml"
            preloader.onLoadStart = function(target)
                target.createTextField("my_txt",target.getNextHighestDepth(),0,0,10,10);
                target.my_txt.selectable = false;
            preloader.onLoadProgress = function(target, loadedBytes, totalBytes)
                target.my_txt.text = Math.floor((loadedBytes / totalBytes) * 100);
            preloader.onLoadComplete = function(target)
                new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
                target.my_txt.removeTextField();
                target.onRelease = function()
                    callFullImage(this._name);
                target.onRollOver = function()
                    this._alpha = 100;
                target.onRollOut = function()
                    this._alpha = 100;

    combine the two xml files into one if you want to create one gallery.
    if you want two different galleries that display at different times, remove the movieclip wall after you're done with gallery1 and execute myGalleryXML.load("gallery2.xml");

  • Warning: Function created with compilation errors. ???

    I created a function with a warning:
    Warning: Function created with compilation errors.
    I'd like to know more detailed information about this warning, how to find them?
    If only with this warning, I don't know how to correct the definition of the function.
    BTW, because it is a warning, I just try to run the sql stmt which will call this function:
    SQL> select strdiff(ename, 'FOR') from emp;
    select strdiff(ename, 'FOR') from emp
    ERROR at line 1:
    ORA-06575: Package or function STRDIFF is in an invalid state.
    /* strdiff is the name of function */
    Thanks in advance!

    Hi,
    I think that your posting may be more suited to the PL/SQL forum.
    after the function is created with errors you should try the command:
    show err
    or
    show errors
    this should at least give you some idea of what is wrong.
    regards Michael

  • Converting an XML file to a DAT pipe delimited file

    Hi 
    I'm trying to create an SSIS Package which converts an XML file into a dat file which is pipe delimited.
    I want the package to be generic so that once that minimal modification is needed when using for different files.
    I've so far had no luck with this and need some help/assistance.
    All help fully appreciated.
    Thank you 
    Umar Javed

    The XML file can vary from fixed to variable.
    for Fixed, i've done the same thing as you've suggested and parametrized the flat file connection manager.
    For The XML source is there any way we can parametrize the location of the XML or XSD files?
    For Variable, unfortunately due to restrictions we can not create an intermediate table and then export.
    is there any other way?
    Thanks
    Umar Javed
    XSD path can be made dynamic as below
    http://picnicerror.net/development/sql-server/define-xsd-file-for-ssis-xml-source-using-expression-2012-04-21/
    For variable you can even add them to configurations and then pass them from a file using xml configuration option.
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • GetComStat​() function does not detect errors.

    I am implementing a full duplex RS-232 communication channel where I poll for input data by using the GetInQLen() function. Once I have data I first check for errors by calling the GetComStat() function. This function never seems to return an error code even when I send data with the wrong parity, baud rate, etc.

    Hello,
    This worked fine for me when I tried it. Although you do not say, I assume you are using CVI. Here's a good way to test it out in CVI 7.0: CVI comes with a serial example in the samples\rs232 directory called "serial.cws". This is a good place to start for using serial functions. I performed the following test: hook up a null-modem cable between my 2 onboard COM ports, starting the example program on COM1 and configuring the port to 9600 8N1, XON/XOFF is Off, RTS/CTS is off. Then I opened Hyperterminal on COM2 setting 9600 8E1, No flow control. I typed a single character into hyperterminal and then switched back to the example and clicked on "Get COM Status" and got a parity error. I performed various other mismatches including baud rate and the C
    OM Status function performed properly.
    If you could run this test and let me know how it goes, that would be helpful. Alternately, this might illuminate the best way to use the COM Status function. Please let me know what version of CVI you are running when you reply.
    Thanks,
    Scott B.
    Applications Engineer
    National Instruments

  • IF i'm on a call and try to use the internet function, I get an error message.  Is this normal?

    IF i'm on a call and try to use the internet function, I get an error message.  Is this normal?

    Depending on your carrier, with AT&T there shouldn't be a problem.
    If you with Verizon, you will need to be on Wifi, to do that.

  • Passing a Spry XML Dataset to a function

    I am very much a noob at this.  How would I pass my XML dataset to a function so that the function would check a "date" field in the XML file and color the corresponding date cell in a YUI calendar?  I have looked through the YUI Forums, but couldn't find any good examples.  I am making a calendar of events that uses a calendar to filter the events in my XML file.  I want the calendar to highlight the dates that have an event scheduled, so the users get a visual pointer to when events are scheduled.  Here is my code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryDataExtensions.js" type="text/javascript"></script>
    <script src="yui/2.6.0/build/yahoo-dom-event/yahoo-dom-event.js" type="text/javascript"></script>
    <script src="yui/2.6.0/build/calendar/calendar-min.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryDOMUtils.js" language="javascript" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var dsMDEvents = new Spry.Data.XMLDataSet("schedule.xml", "events/event", {sortOnLoad: "date", sortOrderOnLoad: "ascending"});
    var dsEvents = new Spry.Data.XMLDataSet("schedule.xml", "events/event", {sortOnLoad: "date", sortOrderOnLoad: "ascending"}  );
    dsEvents.setColumnType("date", "date");
    dsEvents.setColumnType("@id", "number");var thisDate = new Date();
    var todaysDate = mydateFormat(thisDate);
    function pad(v)
      return (v<10?"0"+v:v);
    function mydateFormat(inDate)
      var myData = inDate;
      var gToday = new Date(myData);
      var tToday = pad(gToday.getMonth()+1).toString() + "/" + pad(gToday.getDate()).toString() + "/" + gToday.getFullYear().toString();
      return (tToday);
    }//-->
    </script>
    <link href="yui/2.6.0/build/fonts/fonts-min.css" rel="stylesheet" type="text/css" />
    <link href="yui/2.6.0/build/calendar/assets/skins/sam/calendar.css" rel="stylesheet" type="text/css" /><link href="SpryAssets/SpryMasterDetail.css" rel="stylesheet" type="text/css" />
    </head><body>
    <div id="Schedule">
      <div id="calendarDiv"></div>
      <script type="text/javascript">
    // BeginWebWidget YUI_Calendar: yuicalendar1
      YAHOO.namespace("calendar");  (function() {
        var cn = document.body.className.toString();
        if (cn.indexOf('yui-skin-sam') == -1) {
          document.body.className += " yui-skin-sam";
      YAHOO.calendar.init = function() {
    YAHOO.calendar.cal1 = new YAHOO.widget.CalendarGroup("cal1", "CalendarDiv", {PAGES:3});    // The following event subscribers demonstrate how to handle
        // YUI Calendar events, specifically when a date cell is
        // selected and when it is unselected.
        // See: http://developer.yahoo.com/yui/calendar/ for more
        // information on the YUI Calendar's configurations and
        // events.
        // The YUI Calendar API cheatsheet can be found at:
        // http://yuiblog.com/assets/pdf/cheatsheets/calendar.pdf
        //--- begin event subscribers ---//
        YAHOO.calendar.cal1.selectEvent.subscribe(selectHandler, YAHOO.calendar.cal1, true);
        YAHOO.calendar.cal1.deselectEvent.subscribe(deselectHandler, YAHOO.calendar.cal1, true);
        //--- end event subscribers ---//
    function dateHighlightRenderer(workingDate, cell) {
       var isHighlighted = false;
       var date = workingDate.getMonth()+1 + "/" + workingDate.getDate() + "/" + workingDate.getFullYear();
       /*if (rows["date"].search(date) != -1) {
      isHighlighted = true;
       if (date) {
      isHighlighted = true;
       if (isHighlighted) {
      YAHOO.util.Dom.addClass(cell, this.Style.CSS_CELL_HIGHLIGHT4);
    //YAHOO.calendar.cal1.addRenderer("11/14/2009, 11/1/2009, 11/29/2009, 11/30/2009", YAHOO.calendar.cal1.renderCellStyleHighlight1);
    for (var i = 1; i <= 7; i++) {
       // Attach to the Weekday, instead of individual dates/ranges, to improve performance.
       YAHOO.calendar.cal1.addWeekdayRenderer(i, dateHighlightRenderer);
    YAHOO.calendar.cal1.render();
    var todayFilterFunc = function(dsMDEvents, row, rowNumber)
       if (row["date"] >= todaysDate)
       return row; // Return the row to keep it in the data set.
    return null; // Return null to remove the row from the data set.
    dsMDEvents.filter(todayFilterFunc);
    }  function selectHandler(event, data) {
      // The JavaScript function subscribed to yuicalendar1.  It is called when
      // a date cell is selected.
      // alert(event) will show an event type of "Select".
      // alert(data) will show the selected date as [year, month, date]. 
      var formattedDate = pad(data[0][0][1]) + "/" + pad(data[0][0][2]) + "/" + data[0][0][0];
      var dateFilterFunc = function(dsMDEvents, row, rowNumber)
    if (row["date"].search(formattedDate) != -1)
       return row; // Return the row to keep it in the data set.
    return null; // Return null to remove the row from the data set.
      dsMDEvents.filter(dateFilterFunc); // Filter the rows in the data set.
      };  function deselectHandler(event, data) {
      // The JavaScript function subscribed to yuicalendar1.  It is called when
      // a selected date cell is unselected.
      };      // Create the YUI Calendar when the HTML document is usable.
      YAHOO.util.Event.onDOMReady(YAHOO.calendar.init);
    // EndWebWidget YUI_Calendar: yuicalendar1
      </script>
    <div class="MasterDetail">
      <div spry:region="dsMDEvents" class="MasterContainer">
        <div class="MasterColumn" spry:repeat="dsMDEvents" spry:setrow="dsMDEvents" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">{date}<br />
          {name}<br />
          {starttime} - {endtime}</div>
      </div>
      <div spry:detailregion="dsMDEvents" class="DetailContainer">
        <h2 class="DetailColumn">{name}</h2>
        <p class="DetailColumn"><strong>Date:</strong> {date}<br />
        <strong>Time:</strong> {starttime} - {endtime}</p>
        <p class="DetailColumn"><strong>Where:</strong> {location}<br />
        <strong>Type:</strong> {type}</p>
        <p class="DetailColumn"><strong>Contact:</strong> {contact}</p>
      </div>
      <br style="clear:both" />
    </div>
    </div>
    </body>
    </html>
    and here is a snipet of my xml file:
    <?xml version="1.0" encoding="utf-8"?>
    <events>
    <event id="1">
      <name>Dreamweaver CS4 Intermediate</name>
      <date>10/15/2009</date>
      <starttime>8:00 am</starttime>
      <endtime>5:00 pm</endtime>
      <location>Room 1</location>
      <type>Training</type>
      <contact>Contact 1</contact>
    </event>
    <event id="2">
      <name>InDesign CS4 Advanced</name>
      <date>11/14/2009</date>
      <starttime>8:00 am</starttime>
      <endtime>5:00 pm</endtime>
      <location>Room 2</location>
      <type>Training</type>
      <contact>Contact 1</contact>
    </event>
    <event id="3">
      <name>Flex CS4 Data Services</name>
      <date>10/15/2009</date>
      <starttime>1:00 pm</starttime>
      <endtime>5:00 pm</endtime>
      <location>Room 2</location>
      <type>Meeting</type>
      <contact>Contact 2</contact>
    </event>
    <event id="4">
      <name>Another Dreamweaver CS4 Intermediate</name>
      <date>11/30/2009</date>
      <starttime>8:00 am</starttime>
      <endtime>5:00 pm</endtime>
      <location>Room 1</location>
      <type>Training</type>
      <contact>Contact 1</contact>
    </event>
    <event id="5">
      <name>Another InDesign CS4 Advanced</name>
      <date>11/29/2009</date>
      <starttime>8:00 am</starttime>
      <endtime>5:00 pm</endtime>
      <location>Room 2</location>
      <type>Training</type>
      <contact>Contact 3</contact>
    </event>
    <event id="6">
      <name>Another Flex CS4 Data Services</name>
      <date>11/01/2009</date>
      <starttime>1:00 pm</starttime>
      <endtime>5:00 pm</endtime>
      <location>Room 2</location>
      <type>Meeting</type>
      <contact>Contact 2</contact>
    </event>
    <event id="7">
      <name>More Training</name>
      <date>11/02/2009</date>
      <starttime>8:00 am</starttime>
      <endtime>10:00 am</endtime>
      <location>Room 3</location>
      <type>Training</type>
      <contact>Contact 4</contact>
    </event>
    <event id="8">
      <name>Another Training</name>
      <date>10/25/2009</date>
      <starttime>9:00 am</starttime>
      <endtime>11:00 am</endtime>
      <location>Room 3</location>
      <type>Training</type>
      <contact>Contact 4</contact>
    </event>
    <event id="9">
      <name>Some More Training</name>
      <date>12/02/2009</date>
      <starttime>1:00 pm</starttime>
      <endtime>3:00 pm</endtime>
      <location>Room 3</location>
      <type>Training</type>
      <contact>Contact 4</contact>
    </event>
    </events>
    The function "dateHighlightRenderer" is where I am running into the problem.  How do I code this so that "dateHighlightRenderer" can read the "date" field in my XML file?

    I have tried the getData() function for this.  However, I am not sure if I am using it right:
    var d = dsMDEvents.getData();
    for (var i = 0; i < d.length(); i++) {
       var day = d[i]["date"];
       YAHOO.calendar.cal1.addRenderer(day, dateHighlightRenderer);
    When I run this for loop, my calendar will not appear on the page.  Any suggestions?

  • Javax.xml.ws.soap.SOAPFaultException: InvalidSecurity : error in processing the WS-Security security header error while invoking FinancialUtilService using HTTP proxy client

    I am trying to invoke FinancialUtilService using HTTP proxy client. I am getting below error while i am trying to invoke this service. Using FusionServiceTester i am able to invoke service and upload file to UCM. Using oracle.ucm.fa_client_11.1.1.jar also i am able to upload file to UCM without any issue. But using HTTP proxy client i am facing below error. Can anyone please help me. PFA code i am using to invoke this service.
    javax.xml.ws.soap.SOAPFaultException: InvalidSecurity : error in processing the WS-Security security header
      at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:197)
      at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:122)
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:125)
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
      at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:135)
      at $Proxy43.uploadFileToUcm(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at weblogic.wsee.jaxws.spi.ClientInstance$ClientInstanceInvocationHandler.invoke(ClientInstance.java:363)
      at $Proxy44.uploadFileToUcm(Unknown Source)
      at com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.FinancialUtilServiceSoapHttpPortClient.invokeUpload(FinancialUtilServiceSoapHttpPortClient.java:299)
      at com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.FinancialUtilServiceSoapHttpPortClient.main(FinancialUtilServiceSoapHttpPortClient.java:273)
    Process exited with exit code 0.
    Message was edited by: Oliver Steinmeier
    Removed attachment

    Hi Jani,
    Thanks for your reply.
    I am new to webservices and we are trying to do a POC on invoking FinancialUtilService using HTTP proxy client. I am following steps mentioned in attached pdf section "Invoking FinancialUtil Service using Web Service Proxy Client". I have imported certificate using below command. 
         keytool -import -trustcacerts -file D:\Retek\Certificate.cer -alias client -keystore D:\Retek\default-keystore.jks -storepass welcome1
    Invoking
        SecurityPolicyFeature[] securityFeature =
        new SecurityPolicyFeature[] { new
        SecurityPolicyFeature("oracle/wss11_saml_token_with_message_protection_client_policy")};
        financialUtilService_Service = new FinancialUtilService_Service();
        FinancialUtilService financialUtilService= financialUtilService_Service.getFinancialUtilServiceSoapHttpPort(securityFeature);
        // Get the request context to set the outgoing addressing properties
        WSBindingProvider wsbp = (WSBindingProvider)financialUtilService;
        WSEndpointReference replyTo =
          new WSEndpointReference("https://efops-rel91-patchtest-external-fin.us.oracle.com/finFunShared/FinancialUtilService", WS_ADDR_VER);
        String uuid = "uuid:" + UUID.randomUUID();
        wsbp.setOutboundHeaders( new StringHeader(WS_ADDR_VER.messageIDTag, uuid), replyTo.createHeader(WS_ADDR_VER.replyToTag));
        wsbp.getRequestContext().put(WSBindingProvider.USERNAME_PROPERTY, "fin_user1");
        wsbp.getRequestContext().put(WSBindingProvider.PASSWORD_PROPERTY,  "Welcome1");
        wsbp.getRequestContext().put(ClientConstants.WSSEC_RECIPIENT_KEY_ALIAS,"service");
        wsbp.getRequestContext().put(ClientConstants.WSSEC_KEYSTORE_LOCATION, "D:/Retek/default-keystore.jks");
        wsbp.getRequestContext().put(ClientConstants.WSSEC_KEYSTORE_PASSWORD, "welcome1" );
        wsbp.getRequestContext().put(ClientConstants.WSSEC_KEYSTORE_TYPE, "JKS" );
        wsbp.getRequestContext().put(ClientConstants.WSSEC_SIG_KEY_ALIAS, "client" );
        wsbp.getRequestContext().put(ClientConstants.WSSEC_SIG_KEY_PASSWORD, "password" );
        wsbp.getRequestContext().put(ClientConstants.WSSEC_ENC_KEY_ALIAS, "client" );
        wsbp.getRequestContext().put(ClientConstants.WSSEC_ENC_KEY_PASSWORD, "password" );
    SEVERE: WSM-00057 The certificate, client, is not retrieved.
    SEVERE: WSM-00137 The encryption certificate, client, is not retrieved due to exception oracle.wsm.security.SecurityException: WSM-00057 : The certificate, client, is not retrieved..
    SEVERE: WSM-00161 Client encryption public certificate is not configured for Async web service client
    SEVERE: WSM-00005 Error in sending the request.
    SEVERE: WSM-07607 Failure in execution of assertion {http://schemas.oracle.com/ws/2006/01/securitypolicy}wss11-saml-with-certificates executor class oracle.wsm.security.policy.scenario.executor.Wss11SamlWithCertsScenarioExecutor.
    SEVERE: WSM-07602 Failure in WS-Policy Execution due to exception.
    SEVERE: WSM-07501 Failure in Oracle WSM Agent processRequest, category=security, function=agent.function.client, application=null, composite=null, modelObj=FinancialUtilService, policy=oracle/wss11_saml_token_with_message_protection_client_policy, policyVersion=null, assertionName={http://schemas.oracle.com/ws/2006/01/securitypolicy}wss11-saml-with-certificates.
    oracle.wsm.common.sdk.WSMException: WSM-00161 : Client encryption public certificate is not configured for Async web service client
      at oracle.wsm.security.policy.scenario.executor.Wss11SamlWithCertsScenarioExecutor.sendRequest(Wss11SamlWithCertsScenarioExecutor.java:173)
      at oracle.wsm.security.policy.scenario.executor.SecurityScenarioExecutor.execute(SecurityScenarioExecutor.java:545)
      at oracle.wsm.policyengine.impl.runtime.AssertionExecutor.execute(AssertionExecutor.java:41)
      at oracle.wsm.policyengine.impl.runtime.WSPolicyRuntimeExecutor.executeSimpleAssertion(WSPolicyRuntimeExecutor.java:608)
      at oracle.wsm.policyengine.impl.runtime.WSPolicyRuntimeExecutor.executeAndAssertion(WSPolicyRuntimeExecutor.java:335)
      at oracle.wsm.policyengine.impl.runtime.WSPolicyRuntimeExecutor.execute(WSPolicyRuntimeExecutor.java:282)
      at oracle.wsm.policyengine.impl.PolicyExecutionEngine.execute(PolicyExecutionEngine.java:102)
      at oracle.wsm.agent.WSMAgent.processCommon(WSMAgent.java:915)
      at oracle.wsm.agent.WSMAgent.processRequest(WSMAgent.java:436)
      at oracle.wsm.agent.handler.WSMEngineInvoker.handleRequest(WSMEngineInvoker.java:393)
      at oracle.wsm.agent.handler.wls.WSMAgentHook.handleRequest(WSMAgentHook.java:239)
      at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$JAXRPCTube.processRequest(TubeFactory.java:220)
      at weblogic.wsee.jaxws.tubeline.FlowControlTube.processRequest(FlowControlTube.java:98)
      at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:604)
      at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:563)
      at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:548)
      at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:445)
      at com.sun.xml.ws.client.Stub.process(Stub.java:259)
      at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:152)
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:115)
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
      at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:135)
      at $Proxy43.uploadFileToUcm(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at weblogic.wsee.jaxws.spi.ClientInstance$ClientInstanceInvocationHandler.invoke(ClientInstance.java:363)
      at $Proxy44.uploadFileToUcm(Unknown Source)
      at com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.FinancialUtilServiceSoapHttpPortClient.invokeUpload(FinancialUtilServiceSoapHttpPortClient.java:111)
      at com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.FinancialUtilServiceSoapHttpPortClient.main(FinancialUtilServiceSoapHttpPortClient.java:86)
    Caused by: oracle.wsm.security.SecurityException: WSM-00161 : Client encryption public certificate is not configured for Async web service client
      at oracle.wsm.security.policy.scenario.processor.Wss11X509TokenProcessor.insertClientEncCertToWSAddressingHeader(Wss11X509TokenProcessor.java:979)
      at oracle.wsm.security.policy.scenario.processor.Wss11X509TokenProcessor.build(Wss11X509TokenProcessor.java:206)
      at oracle.wsm.security.policy.scenario.executor.Wss11SamlWithCertsScenarioExecutor.sendRequest(Wss11SamlWithCertsScenarioExecutor.java:164)
      ... 30 more
    Caused by: oracle.wsm.security.SecurityException: WSM-00057 : The certificate, client, is not retrieved.
      at oracle.wsm.security.jps.WsmKeyStore.getJavaCertificate(WsmKeyStore.java:534)
      at oracle.wsm.security.jps.WsmKeyStore.getCryptCert(WsmKeyStore.java:570)
      at oracle.wsm.security.policy.scenario.processor.Wss11X509TokenProcessor.insertClientEncCertToWSAddressingHeader(Wss11X509TokenProcessor.java:977)
      ... 32 more
    SEVERE: WSMAgentHook: An Exception is thrown: WSM-00161 : Client encryption public certificate is not configured for Async web service client
    File upload failed
    javax.xml.ws.WebServiceException: javax.xml.rpc.JAXRPCException: oracle.wsm.common.sdk.WSMException: WSM-00161 : Client encryption public certificate is not configured for Async web service client
      at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$JAXRPCTube.processRequest(TubeFactory.java:231)
      at weblogic.wsee.jaxws.tubeline.FlowControlTube.processRequest(FlowControlTube.java:98)
      at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:604)
      at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:563)
      at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:548)
      at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:445)
      at com.sun.xml.ws.client.Stub.process(Stub.java:259)
      at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:152)
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:115)
      at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
      at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:135)
      at $Proxy43.uploadFileToUcm(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at weblogic.wsee.jaxws.spi.ClientInstance$ClientInstanceInvocationHandler.invoke(ClientInstance.java:363)
      at $Proxy44.uploadFileToUcm(Unknown Source)
      at com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.FinancialUtilServiceSoapHttpPortClient.invokeUpload(FinancialUtilServiceSoapHttpPortClient.java:111)
      at com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.FinancialUtilServiceSoapHttpPortClient.main(FinancialUtilServiceSoapHttpPortClient.java:86)
    Caused by: javax.xml.rpc.JAXRPCException: oracle.wsm.common.sdk.WSMException: WSM-00161 : Client encryption public certificate is not configured for Async web service client
      at oracle.wsm.agent.handler.wls.WSMAgentHook.handleException(WSMAgentHook.java:395)
      at oracle.wsm.agent.handler.wls.WSMAgentHook.handleRequest(WSMAgentHook.java:248)
      at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$JAXRPCTube.processRequest(TubeFactory.java:220)
      ... 19 more

  • XML Report Publisher program is erroring out

    Hi All,
    I've customized the AR Customer Statements.
    I've created a data definition as "ARXSGP" and uploded the sample_output.xml of Statement Generation Program to it. Also I've created a Data template as "ARXSGPO" and attached the data definition "ARXSGP" to it and uploaded the customized rtf file "XXHCC_CLE_F_ARCUSBALSL.rtf" and set the default output type to PDF.
    As I donot wish to call the XML Report Publisher program manually every time when I Print the Statements through Print Documents-->Statements.
    So I've done the below customization in ARXSGP.rdf file ie; Print Statements Report which is an Oracle Report.
    I've added the below code in After Report trigger.
    =======================================
    FUNCTION AfterReport
    RETURN BOOLEAN
    IS
    BEGIN
    Below code added for Customer Statement Case Study
    DECLARE
    l_req_id NUMBER := 0;
    L_XML_LAYOUT BOOLEAN := TRUE;
    BEGIN
    L_XML_LAYOUT := FND_REQUEST.ADD_LAYOUT (TEMPLATE_APPL_NAME => 'AR', TEMPLATE_CODE => 'ARXSGP', TEMPLATE_LANGUAGE => 'en', TEMPLATE_TERRITORY => 'US', OUTPUT_FORMAT => 'PDF');
    IF L_XML_LAYOUT THEN
    srw.message(20001, 'Template is picked ');
    srw.message(20002,'Concurrent request Id : '||:p_conc_request_id);
    l_req_id := FND_REQUEST.SUBMIT_REQUEST('XDO',
    'XDOREPPB',
    NULL,
    NULL,
    FALSE,
    :p_conc_request_id,
    222, -- Receivables
    'ARXSGPO', -- Statement Generate
    'en-US', -- English
    'N',
    'RTF',
    'PDF');
    IF l_req_id > 0 THEN
    COMMIT;
    ELSE
    srw.message(20004, 'Failed to submit request');
    END IF;
    ELSE -- Not L_XML_LAYOUT
    srw.message(20005, 'Template is not picked ');
    END IF;
    END;
    --------------------Code Ends----------------------------
    SRW.USER_EXIT('FND SRWEXIT');
    RETURN (TRUE);
    END;
    ==============================================
    After Printing the Statements through Print Documents-->Statements
    Statement Generation Program is being called and later XML Report Publisher program is also being invoked.
    But the XML Report Publisher Program is erroring out with below error.
    XML Publisher: Version : 12.0.0
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XDOREPPB module: XML Report Publisher
    Current system time is 03-SEP-2012 17:42:18
    Oracle XML Publisher 5.6.3
    java.lang.NumberFormatException: For input string: "ARXSGPO"
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
         at java.lang.Integer.parseInt(Integer.java:447)
         at java.lang.Integer.parseInt(Integer.java:497)
         at oracle.apps.xdo.oa.cp.JCP4XMLPublisher.runProgram(JCP4XMLPublisher.java:215)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Executing request completion options...
    Output file size:
    0
    ------------- 1) PUBLISH -------------
    Disabling requested Output Post Processing. Nothing to process. The output of the request is zero byte.
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 03-SEP-2012 17:42:22
    Please help out with a solution.
    Thanks,
    Tech D

    for r12 add one row for parameter "Dummy for Data Security" from desc of XDOREPPB
    follow works for me
    SQL> set serveroutput on
    SQL>
    SQL> declare
      2    v_request_id   number;
      3  begin
      4 
      5   begin fnd_global.apps_initialize(0, 20419, 0); end;
      6   v_request_id := FND_REQUEST.SUBMIT_REQUEST('XDO',
      7                                              'XDOREPPB',
      8                                              NULL,
      9                                              NULL,
    10                                              FALSE,
    11                                              'N', -- Dummy for Data Security
    12                                              9888637, -- Request
    13                                              0, -- Template Application
    14                                              'XXAND10_1', -- Template
    15                                              'en-US', -- Template Locale
    16                                              'N', -- Debug Flag
    17                                              'RTF', -- Template Type
    18                                              'RTF' -- Output Format
    19                                              );
    20 
    21    dbms_output.put_line(v_request_id);
    22    if v_request_id > 0 then
    23      dbms_output.put_line('successfully submitted.');
    24      commit;
    25    else
    26      dbms_output.put_line('not submitted.');
    27      rollback;
    28    end if;
    29 
    30  end;
    31  /
    9888651
    successfully submitted.
    PL/SQL procedure successfully completed
    SQL> 'Y' for "Dummy for Data Security" also works for me
    SQL> declare
      2    v_request_id   number;
      3  begin
      4 
      5   begin fnd_global.apps_initialize(0, 20419, 0); end;
      6   v_request_id := FND_REQUEST.SUBMIT_REQUEST('XDO',
      7                                              'XDOREPPB',
      8                                              NULL,
      9                                              NULL,
    10                                              FALSE,
    11                                              'Y', -- Dummy for Data Security
    12                                              9888637, -- Request
    13                                              0, -- Template Application
    14                                              'XXAND10_1', -- Template
    15                                              'en-US', -- Template Locale
    16                                              'N', -- Debug Flag
    17                                              'RTF', -- Template Type
    18                                              'RTF' -- Output Format
    19                                              );
    20 
    21    dbms_output.put_line(v_request_id);
    22    if v_request_id > 0 then
    23      dbms_output.put_line('successfully submitted.');
    24      commit;
    25    else
    26      dbms_output.put_line('not submitted.');
    27      rollback;
    28    end if;
    29 
    30  end;
    31  /
    9888652
    successfully submitted.
    PL/SQL procedure successfully completed
    SQL>

  • Help needed in extracting pipe delimited fields in a CLOB data type

    hi
    i Had a table with clob field as shown below.
    CREATE TABLE TRANSACTION_INFO
      TRASACTION_ID  CLOB,
      LOG_ID  NUMBER
    Insert into TRANSACTION_INFO
       (TRASACTION_ID, LOG_ID)
    Values
       ('354502002020910|000000610214609663||09/27/09 08:02:37|RNEW|DC25|MOTOROLA|8802939198', 123);
    Insert into TRANSACTION_INFO
       (TRASACTION_ID, LOG_ID)
    Values
       ('354599892020910|000000610214609663||09/27/10 08:12:47|SOLD|DC23||8802939198', 456);
    COMMIT;As you can see Clob field is a pipe delimited data.Now i am able to extract the first two fields using the below querry.But it may be the right solution as
    substring function fails if there is missing character in any on the fields.
    Also when there is a null value in any of the fields,how can i be able to get as null value ? Basically i want to get the values in a delimited manner.
    how can we do this ?
    Select Substr (TRASACTION_ID, 1, Instr (TRASACTION_ID, '|')-1) field1,
            Substr (TRASACTION_ID, 17, Instr (TRASACTION_ID, '|')+2) field2              
      From TRANSACTION_INFO;
    output should be like as shown
       FIELD1          FIELD2          FEILD3                 FEILD4
    354502002020910     000000610214609663                  09/27/09 08:02:37
    354599892020910     000000610214609663                  09/27/10 08:12:47Thanks
    Rede

    hi Michael
    Thanks for the solution and its my bad not mention that there is a possibility of having a null value at the start of the record also which RPLACE function no longer works for this case.
    For example
    with transaction_info (trasaction_id, log_id)
         as (
    select '354502002020910|000000610214609663||09/27/09 08:02:37|RNEW|DC25|MOTOROLA|8802939198', 123 from dual union all
    select '354599892020910|000000610214609663||09/27/10 08:12:47|SOLD|DC23||8802939198', 456 from dual union all
    select '|000000610214609663||09/27/10 08:12:47|SOLD|DC23||8802939198', 456 from dual
    select trim(regexp_substr (trasaction_id, '[^|]+', 1, 1)) f1,
           trim(regexp_substr (trasaction_id, '[^|]+', 1, 2)) f2,
           trim(regexp_substr (trasaction_id, '[^|]+', 1, 3)) f3,
           trim(regexp_substr (trasaction_id, '[^|]+', 1, 4)) f4,
           trim(regexp_substr (trasaction_id, '[^|]+', 1, 5)) f5
      from (select replace (trasaction_id, '||', '| |') trasaction_id from transaction_info)
    F1                   F2                   F3                   F4                   F5                 
    354502002020910      000000610214609663                        09/27/09 08:02:37    RNEW               
    354599892020910      000000610214609663                        09/27/10 08:12:47    SOLD  
    000000610214609663                        09/27/10 08:12:47    SOLD Now the last record is wrongly created....

Maybe you are looking for