File Date needs to be insterted into Table

We process/insert two CSV files from the file system into the DB that is executed from a CRON job(I think).
The CRON job calls SQLPLUS and calls the stored procedures to load the files. The SPs are using UTIL_FILE to open and read the file.
This works well but now I need to get the date the file was created and insert that as well.
Anyone know how I can get file date?

Hi,
Some simple method for fetching the creation date of your file from OS and insert it into oracle DB is :-
Method 1:
1. in your cron tab fist write a shell script ( is you know the name of your file ) like this
ls -l my_file.csv | cut -b52-63 > my_file.date
this will write the creation date of CSV file in to a text file.
2. Since you know the name of your file ( just file extention is changed ) You can read this file from you stored procedure thru UTL file package. Read the Date from that file an insert into your Db.
i.e. your unix shell script will contain a command that i have mentioned in step one, and the call of that procedure.
Method 2:
Another way is
create a shell script ( say a.sh ) like this
1) echo 'insert into x (x) values (' > a.sql
echo "'" >> a.sql
ls -l my_file.csv | cut -b52-63 >> a.sql
echo "'" >>a.sql
echo ');' >> a.sql
echo 'commit;' >>a.sql
sqlplus -s user/pwd@dbnm @a.sql
2) $ chmod 777 a.sh
3) $ sh a.sh
4) $ more a.sql
insert into x (x) values (
Jul 5 2002
commit;
--- this means just run step 1 and two, add entry in crontab for step 3.
this will work.
( i have written insert statement , like wise u can write your update statement )
Hope this will help you
Regards
Ripudaman

Similar Messages

  • How to Extract data from a flat file and how to upload it into table

    Hi
    i want to extract the data from a web page, that data i want to keep in text file.
    from the text file i want to read it and i want to upload into table
    can any one help me its very urgent

    here is my 20min try without debugging (needs a rs232 and loopback connector )
    use the probe and highlight the dataflow to see how it works.
    as always:  there are many ways to solve your problem
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'
    Attachments:
    read write file to RS232.vi ‏69 KB

  • Extract Data from XML and Load into table using SQL*Loader

    Hi All,
    We have a XML file (sample.xml) which contains credit card transaction information. We have a standard SQL*Loader control file which loads the data from a flat file and the control file code is written as position based method. Our requirement is to use this control file as per our requirement(i.e) load the data into the table from our XML file), But we need help in converting the XML to a flat file or Extract the data from the XML tags and pass the information to the control file and in turn it loads the table.
    Your suggestion is highly appreciated.
    Thanks in advance

    Hi,
    First of all go to PSA maintanance ( Where you will see PSA records ).
    Goto list---> Save-> File---> Spreadsheet (Choose Radio Button)
    > Give the proper file name where you want to download and then-----> Generate.
    You will get ur PSA data in Excel Format.
    Thanks
    Mayank

  • Fetching data from VO and put into table Region

    Hi All,
    I am using Jdev 9i and 11i application.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
          super.processRequest(pageContext, webBean);
    Number Variable= (Number)pageContext.getSessionValue("SessionValue");
    Number numValue = new Number (Variable);
    pageContext.writeDiagnostics(this, "In XXXXShoppingCO header "+ Variable, 1);
    pageContext.removeSessionValue("SessionValue");
    String sql ="SELECT REQUISITION_LINE_ID,REQUISITION_HEADER_ID, LINE_NUM, ITEM_DESCRIPTION, UNIT_MEAS_LOOKUP_CODE,UNIT_PRICE,QUANTITY,BASE_UNIT_PRICE FROM PO_REQUISITION_LINES_ALL  ORDER BY LINE_NUM ASC";
                  ViewObject VO;
                 //Get the AM. Here
                  OAApplicationModuleImpl AM= (OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
                 //Create the View Definition
                 OAViewDef viewDef  = AM.getOADBTransaction().createViewDef();
                 viewDef.setSql(sql);
                 viewDef.setExpertMode(true);
                 viewDef.setViewObjectClass("oracle.apps.fnd.framework.server.OAViewObjectImpl");
                 viewDef.setViewRowClass("oracle.apps.fnd.framework.server.OAViewRowImpl");
                 //Now since the View Definition is ready, we create the View Object
                  VO = (OAViewObject)AM.findViewObject("JDSUPoReqVO");
           if(VO==null){
                 VO = AM.createViewObject("JDSUPoReqVO",viewDef);
                 VO.setWhereClause(null);
                 VO.setWhereClause("REQUISITION_HEADER_ID = :1");
                 VO.setWhereClauseParams(null);
                 VO.setWhereClauseParam(0,numValue);
                 //AM.getOADBTransaction().putDialogMessage(new OAException("param value is "+VO.getWhereClauseParams()));
                 Object[] temp =VO.getWhereClauseParams();
      pageContext.putDialogMessage(new OAException("temp value"+ temp.length));
      for(int i=0; i<temp.length;i++)
        pageContext.putDialogMessage(new OAException("parameters are "+ temp[i].toString()));
    AM.getOADBTransaction().putDialogMessage(new OAException( " query is "+VO.getQuery()));
    AM.getOADBTransaction().putDialogMessage(new OAException( "Where Clause of the VO is "+ VO.getWhereClause()));  
    //ItemTableRN
                  //OATableBean localOATableBean =(OATableBean)webBean.findChildRecursive("ItemTableRN");
    OAMessageStyledTextBean LineNum = (OAMessageStyledTextBean)webBean.findChildRecursive("LineNum");  
                          LineNum.setViewUsageName("JDSUPoReqVO");
                          LineNum.setViewAttributeName("LINE_NUM"); 
                          //LineNum.setReadOnly(true); 
              OAMessageTextInputBean  itemDesc = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("ItemDescInput");
                           itemDesc.setViewUsageName("JDSUPoReqVO");
                           itemDesc.setViewAttributeName("ITEM_DESCRIPTION"); 
                         //itemDesc.setReadOnly(true); 
               OAMessageStyledTextBean SpecialInfo = (OAMessageStyledTextBean)webBean.findChildRecursive("InfoTemplateText");
                            SpecialInfo.setViewUsageName("JDSUPoReqVO");
                            SpecialInfo.setViewAttributeName("REQUISITION_HEADER_ID"); 
                          //SpecialInfo.setReadOnly(true);
               OAMessageLovInputBean Unit = (OAMessageLovInputBean)webBean.findChildRecursive("TranslatedUom");
                            Unit.setViewUsageName("JDSUPoReqVO");
                            Unit.setViewAttributeName("UNIT_MEAS_LOOKUP_CODE"); 
                          //Unit.setReadOnly(true); 
               OAMessageTextInputBean  Quantity = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("Quantity");
                            Quantity.setViewUsageName("JDSUPoReqVO");
                            Quantity.setViewAttributeName("QUANTITY"); 
                          //Quantity.setReadOnly(true);
               OAMessageTextInputBean  Price = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("TxnPrice");
                            Price.setViewUsageName("JDSUPoReqVO");
                            Price.setViewAttributeName("BASE_UNIT_PRICE"); 
                          //Price.setReadOnly(true);
               OAMessageTextInputBean  Amount = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("TxnAmount");
                             Amount.setViewUsageName("JDSUPoReqVO");
                             Amount.setViewAttributeName("UNIT_PRICE"); 
    when I use print values of VO into table's field then I am getting error:
    oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition ITEM_DESCRIPTION of type Attribute not found
      at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1223)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2958)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2755)
      at _oa__html._OA._jspService(_OA.java:101)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
      at org.apache.jserv.JServConnection.run(JServConnection.java:294)
      at java.lang.Thread.run(Thread.java:736)
    ## Detail 0 ##
    oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition ITEM_DESCRIPTION of type Attribute not found
      at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
      at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2958)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2755)
      at _oa__html._OA._jspService(_OA.java:101)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
      at org.apache.jserv.JServConnection.run(JServConnection.java:294)
      at java.lang.Thread.run(Thread.java:736)
    oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition ITEM_DESCRIPTION of type Attribute not found
      at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
      at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2958)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2755)
      at _oa__html._OA._jspService(_OA.java:101)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
      at org.apache.jserv.JServConnection.run(JServConnection.java:294)
      at java.lang.Thread.run(Thread.java:736)

    Hi All,
    I am using Jdev 9i and 11i application.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
          super.processRequest(pageContext, webBean);
    Number Variable= (Number)pageContext.getSessionValue("SessionValue");
    Number numValue = new Number (Variable);
    pageContext.writeDiagnostics(this, "In XXXXShoppingCO header "+ Variable, 1);
    pageContext.removeSessionValue("SessionValue");
    String sql ="SELECT REQUISITION_LINE_ID,REQUISITION_HEADER_ID, LINE_NUM, ITEM_DESCRIPTION, UNIT_MEAS_LOOKUP_CODE,UNIT_PRICE,QUANTITY,BASE_UNIT_PRICE FROM PO_REQUISITION_LINES_ALL  ORDER BY LINE_NUM ASC";
                  ViewObject VO;
                 //Get the AM. Here
                  OAApplicationModuleImpl AM= (OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
                 //Create the View Definition
                 OAViewDef viewDef  = AM.getOADBTransaction().createViewDef();
                 viewDef.setSql(sql);
                 viewDef.setExpertMode(true);
                 viewDef.setViewObjectClass("oracle.apps.fnd.framework.server.OAViewObjectImpl");
                 viewDef.setViewRowClass("oracle.apps.fnd.framework.server.OAViewRowImpl");
                 //Now since the View Definition is ready, we create the View Object
                  VO = (OAViewObject)AM.findViewObject("JDSUPoReqVO");
           if(VO==null){
                 VO = AM.createViewObject("JDSUPoReqVO",viewDef);
                 VO.setWhereClause(null);
                 VO.setWhereClause("REQUISITION_HEADER_ID = :1");
                 VO.setWhereClauseParams(null);
                 VO.setWhereClauseParam(0,numValue);
                 //AM.getOADBTransaction().putDialogMessage(new OAException("param value is "+VO.getWhereClauseParams()));
                 Object[] temp =VO.getWhereClauseParams();
      pageContext.putDialogMessage(new OAException("temp value"+ temp.length));
      for(int i=0; i<temp.length;i++)
        pageContext.putDialogMessage(new OAException("parameters are "+ temp[i].toString()));
    AM.getOADBTransaction().putDialogMessage(new OAException( " query is "+VO.getQuery()));
    AM.getOADBTransaction().putDialogMessage(new OAException( "Where Clause of the VO is "+ VO.getWhereClause()));  
    //ItemTableRN
                  //OATableBean localOATableBean =(OATableBean)webBean.findChildRecursive("ItemTableRN");
    OAMessageStyledTextBean LineNum = (OAMessageStyledTextBean)webBean.findChildRecursive("LineNum");  
                          LineNum.setViewUsageName("JDSUPoReqVO");
                          LineNum.setViewAttributeName("LINE_NUM"); 
                          //LineNum.setReadOnly(true); 
              OAMessageTextInputBean  itemDesc = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("ItemDescInput");
                           itemDesc.setViewUsageName("JDSUPoReqVO");
                           itemDesc.setViewAttributeName("ITEM_DESCRIPTION"); 
                         //itemDesc.setReadOnly(true); 
               OAMessageStyledTextBean SpecialInfo = (OAMessageStyledTextBean)webBean.findChildRecursive("InfoTemplateText");
                            SpecialInfo.setViewUsageName("JDSUPoReqVO");
                            SpecialInfo.setViewAttributeName("REQUISITION_HEADER_ID"); 
                          //SpecialInfo.setReadOnly(true);
               OAMessageLovInputBean Unit = (OAMessageLovInputBean)webBean.findChildRecursive("TranslatedUom");
                            Unit.setViewUsageName("JDSUPoReqVO");
                            Unit.setViewAttributeName("UNIT_MEAS_LOOKUP_CODE"); 
                          //Unit.setReadOnly(true); 
               OAMessageTextInputBean  Quantity = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("Quantity");
                            Quantity.setViewUsageName("JDSUPoReqVO");
                            Quantity.setViewAttributeName("QUANTITY"); 
                          //Quantity.setReadOnly(true);
               OAMessageTextInputBean  Price = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("TxnPrice");
                            Price.setViewUsageName("JDSUPoReqVO");
                            Price.setViewAttributeName("BASE_UNIT_PRICE"); 
                          //Price.setReadOnly(true);
               OAMessageTextInputBean  Amount = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("TxnAmount");
                             Amount.setViewUsageName("JDSUPoReqVO");
                             Amount.setViewAttributeName("UNIT_PRICE"); 
    when I use print values of VO into table's field then I am getting error:
    oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition ITEM_DESCRIPTION of type Attribute not found
      at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1223)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2958)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2755)
      at _oa__html._OA._jspService(_OA.java:101)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
      at org.apache.jserv.JServConnection.run(JServConnection.java:294)
      at java.lang.Thread.run(Thread.java:736)
    ## Detail 0 ##
    oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition ITEM_DESCRIPTION of type Attribute not found
      at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
      at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2958)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2755)
      at _oa__html._OA._jspService(_OA.java:101)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
      at org.apache.jserv.JServConnection.run(JServConnection.java:294)
      at java.lang.Thread.run(Thread.java:736)
    oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition ITEM_DESCRIPTION of type Attribute not found
      at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
      at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2958)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2755)
      at _oa__html._OA._jspService(_OA.java:101)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
      at org.apache.jserv.JServConnection.run(JServConnection.java:294)
      at java.lang.Thread.run(Thread.java:736)

  • Flat file data needs to be update in MM02 t-code with bdc

    Hi,
    I have a requirement that flat file data shoud be update in MM02 t-code in basic data view (Units of measure ) columns .
    I have no access in dev. for  mm02 t-code but mm03 available.
    Can somebody suggest how to approach this. I know through recording (SHDB) i will do.
    But can i put mm03 instead of mm02 at the time of recording?

    Hi,
    thanks,
    But i want to update  these 4 fields data from flat file.
    How to catch in the FM ?
    MARM-MATNR   MARM-MEINH   MARM-UMREZ   MARM-UMREN
    Material                    UoM               Numerator          Denominator

  • Optimize a data parser that converts CLOB into table

    I am importing complex array data from Cold Fusion into ORACLE using a stored procedure. What I've done is convert the data into a CLOB, pass it into ORACLE, then parse it into a temporary table using a pipelined function. Unfortunately the array is large (16k rows) and it's taking a while to run.
    What I'm looking is a better optimization for the data conversion. I've tried XML and the dbms_xmlstore but it was too slow. I am on 10g and don't have access to the log files or even the ability to trace anything. All I can do is look for better ways to do things and then try them.
    Any suggestions or help to improve things would be welcome.
    Warren Koch
    The function converts the array of object into a custom delimited CLOB ( ; betwen values, | between rows) that looks like this:
    prop1;prop2;prop3|prop1;prop2;prop3|prop1;prop2;prop3|prop1;prop2;prop3|
    Here is the code I created.
    CREATE OR REPLACE TYPE THE_IMAGE_TYPE AS OBJECT
    IMAGE_NAME VARCHAR2(100),
    IMAGE_SIZE INTEGER,
    IMAGE_LOC INTEGER
    CREATE OR REPLACE TYPE THE_IMAGE_TABLE AS TABLE OF THE_IMAGE_TYPE
    CREATE GLOBAL TEMPORARY TABLE IMAGE_IMPORT
    image_name VARCHAR2(25 BYTE),
    loc NUMBER(11),
    image_size NUMBER(11)
    ON COMMIT PRESERVE ROWS
    NOCACHE;
    FUNCTION convert_image_data(
         in_image_clob IN CLOB
         RETURN the_image_table PIPELINED
    AS
         image_clob CLOB := in_image_clob;
         image_delim_index PLS_INTEGER;
         image_index PLS_INTEGER := 1;
         row_string VARCHAR2(1000);
         out_rec THE_image_type;
    BEGIN
         out_rec := the_image_type(NULL, NULL, NULL);
         IF SUBSTR(in_image_clob, -1, 1) != '|'
         THEN
              image_clob := image_clob || '|';
         END IF;
         image_delim_index := INSTR(image_clob, '|', image_index);
         WHILE image_delim_index > 0
         LOOP
              row_string := SUBSTR(image_clob, image_index, image_delim_index - image_index);
              row_string := REPLACE(row_string || '::::', ':', ' :');
              out_rec.image_name := SUBSTR(TRIM(REGEXP_SUBSTR(row_string, '[^:]+', 1, 1)), 1, 25);
              out_rec.image_loc := make_number(REGEXP_SUBSTR(row_string, '[^:]+', 1, 2));
              out_rec.image_size := make_number(REGEXP_SUBSTR(row_string, '[^:]+', 1, 3));
              PIPE ROW(out_rec);
              image_index := image_delim_index + 1;
              image_delim_index := INSTR(image_clob, '|', image_index);
         END LOOP;
         RETURN;
    EXCEPTION
         WHEN OTHERS
         THEN
              RAISE;
    END;
    Used in my code like this:
    EXECUTE IMMEDIATE 'TRUNCATE TABLE image_import';
    FOR x IN (SELECT * FROM TABLE(convert_image_data(in_imagelist))
    WHERE image_name IS NOT NULL)
    LOOP
    INSERT INTO image_import (image_name, loc, image_size)
                   VALUES (x.image_name, x.image_loc, x.image_size);
    END LOOP;

    Is there any chance you can just use 1 SQL statement here? I gave it a shot based on the string you posted, not by trying to reverse engineer your code so it's possible i got it entirely wrong :)
    select
        regexp_substr(image_row, '[^;]+', 1, 1) as image_name,
        regexp_substr(image_row, '[^;]+', 1, 2) as image_size,
        regexp_substr(image_row, '[^;]+', 1, 3) as image_loc   
    from
       select
           regexp_substr(the_data, '[^|]+', 1, level) as image_row
       from
          select
             'prop1;prop2;prop3|prop4;prop5;prop6|propa;propb;propc|propd;prope;propf|' as the_data
          from dual
       connect by level <= length (regexp_replace(the_data, '[^|]+'))  + 1
    17  where image_row is not null;
    IMAGE_NAME                     IMAGE_SIZE                     IMAGE_LOC
    prop1                          prop2                          prop3
    prop4                          prop5                          prop6
    propa                          propb                          propc
    propd                          prope                          propf
    4 rows selected.
    Elapsed: 00:00:00.00

  • What can I do to speed up uploading a pdf file that needs to be exported into Word?

    I have been trying to upload a 1 page pdf file for exportation into Word for the last couple of days. Every time I try to upload it into Adobe ExportPDF, the file just shows that it is still uploading and it does this for several hours (isn't finished after 12 hours).
    I uploaded a much larger pdf document earlier this week (over 64 pages) for editing and it uploaded that book fairly quickly and converted it into Word without any problems.
    Any suggestions on what the problem might be or what I could do to speed things up? I only need to be able to edit a couple of words near the top of the page.

    How large is the file? The size in pages is not important, what matters is the size in megabytes and your broadband speed.

  • Data needed from emp and dept tables

    Wondering if somebody can querry the emp table and dept table that comes with some versions of oracle already built in.
    I need the data produced from these two querries
    select * from emp
    select * from dept

    If you look in ORACLE_HOME/sqlplus/demo you'll find demobld.sql which contains the script the build all the scott tables.

  • Reading  xml data from url and insert into table

    CREATE TABLE url_tab2
    URL_NAME VARCHAR2(100),
    URL SYS.URIType
    INSERT INTO url_tab2 VALUES
    (’This is a test URL’,
    sys.UriFactory.getUri(’http://www.domain.com/test.xml’)
    it is giving error as invalid character

    Check if your single quotes are the correct single quotes.
    The principle works as advertised in the XMLDB Developers Guide...
    C:\>sqlplus / as sysdba
    SQL*Plus: Release 11.1.0.7.0 - Production on Tue Nov 25 21:44:46 2008
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> create user OTN identified by OTN account unlock;
    User created.
    SQL> grant dba, xdbadmin to OTN;
    Grant succeeded.
    SQL> conn OTN/OTN
    Connected.
    SQL> CREATE TABLE uri_tab (docUrl SYS.URIType, docName VARCHAR2(200));
    Table created.
    SQL> -- Method SYS.URIFACTORY.getURI() with absolute URIs
    SQL> -- Insert an HTTPUri with absolute URL into SYS.URIType using URIFACTORY.
    SQL> -- The target is Oracle home page.
    SQL> INSERT INTO uri_tab VALUES
      2  (SYS.URIFACTORY.getURI('http://www.oracle.com'), 'AbsURL');
    1 row created.
    SQL> -- Insert an HTTPUri with relative URL using constructor SYS.HTTPURIType.
    SQL> -- Note the absence of prefix http://. The target is the same.
    SQL> INSERT INTO uri_tab VALUES (SYS.HTTPURIType('www.oracle.com'), 'RelURL');
    1 row created.
    SQL> -- Insert a DBUri that targets employee data from database table hr.employees.
    SQL>
    SQL> INSERT INTO uri_tab VALUES
      2  (SYS.URIFACTORY.getURI('/oradb/HR/EMPLOYEES/ROW[EMPLOYEE_ID=200]'), 'Emp200');
    1 row created.
    SQL> SELECT e.docUrl.getCLOB(), docName FROM uri_tab e;
    E.DOCURL.GETCLOB()
    DOCNAME
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
    ">
    <html>
    <head>
    AbsURL
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
    ">
    <html>
    E.DOCURL.GETCLOB()
    DOCNAME
    <head>
    RelURL
    <?xml version="1.0"?>
    <ROW>
      <EMPLOYEE_ID>200</EMPLOYEE_ID>
      <FIRST_NAME>Jenn
    Emp200
    SQL> set long 1000
    SQL> select HTTPURITYPE('www.oracle.com').getCLob() from dual;
    HTTPURITYPE('WWW.ORACLE.COM').GETCLOB()
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
    ">
    <html>
    <head>
    <title>Oracle 11g, Siebel, PeopleSoft |
    Oracle, The World's Largest Enterprise S
    oftware Company</title>
    <meta name="title" content="Enterprise Applications | D
    atabase | Fusion Middleware | Applicatio
    ns Unlimited | Business | Oracle, The Wo
    rld's Largest Enterprise Software CompanEdited by: Marco Gralike on Nov 25, 2008 10:13 PM

  • How can I load data into table with SQL*LOADER

    how can I load data into table with SQL*LOADER
    when column data length more than 255 bytes?
    when column exceed 255 ,data can not be insert into table by SQL*LOADER
    CREATE TABLE A (
    A VARCHAR2 ( 10 ) ,
    B VARCHAR2 ( 10 ) ,
    C VARCHAR2 ( 10 ) ,
    E VARCHAR2 ( 2000 ) );
    control file:
    load data
    append into table A
    fields terminated by X'09'
    (A , B , C , E )
    SQL*LOADER command:
    sqlldr test/test control=A_ctl.txt data=A.xls log=b.log
    datafile:
    column E is more than 255bytes
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)

    Check this out.
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch06.htm#1006961

  • Problem with reading data from screen and inserting in table

    hi ther,
    im new to abap-webdyn pro. can anyone suggest how to read data from screen and insert into table when press 'ADD' button.
    i done screen gui , table creation but problems with action. what the content of acton add.
    is ther any link that helps me or tut??
    thankx in advance!
    regards

    Hi,
    Create a context node for the screen fields for which you want to enter the values with cardinality 1.1.....
    Now in the layout of your view bind the screen input fields to that context node(attributes) to the value property of the input fields...
    Now in the action of ADD button....
    --> go the wizard and select the read node button and select the node which you have created it generates the auto code for you.....
    for example if the node is contains aone attribute like MATNR
    reading the node from wizard will generate the code as....
    DATA lo_nd_matnr TYPE REF TO if_wd_context_node.
      DATA lo_el_matnr TYPE REF TO if_wd_context_element.
      DATA ls_matnr TYPE wd_this->element_matnr.
      DATA lv_matnr TYPE wd_this->element_matnr-matnr.
    * navigate from <CONTEXT> to <MATNR> via lead selection
      lo_nd_matnr = wd_context->get_child_node( name = wd_this->wdctx_matnr ).
    * @TODO handle non existant child
    * IF lo_nd_matnr IS INITIAL.
    * ENDIF.
    * get element via lead selection
      lo_el_matnr = lo_nd_matnr->get_element( ).
    * @TODO handle not set lead selection
      IF lo_el_matnr IS INITIAL.
      ENDIF.
    * get single attribute
      lo_el_matnr->get_attribute(
        EXPORTING
          name =  `MATNR`
        IMPORTING
          value = lv_matnr ).
    here the variable lv_matnr will contain the entered value......
    now you can use this value for further process.
    Thanks,
    Shailaja Ainala.

  • Help needed badly Insert text data from xml files into tables

    Hi all, I have asked to do insertion of text from a xml file into tables upon receiving using pro*c. i've done quite an amount of research on xml parser in c but there wasn't much information for mi to use for implementation...
    Guys don't mind helping me to clarify few doubts of mine...
    1. Where can i get the oracle xml parser libs? Is it included when i installed oracle 8i?
    2. Is there any tutorials or help files for xml parser libs where i can read up?
    I need the xml parser to recognise the tags, followed by recognising the text after the tags.
    eg. xml format
    <studentID> 0012 </studentID>
    <student> john </student>
    <studentID> 0013 </studentID>
    <student> mary </student>
    text willl be inserted into tables like this:
    studentID | student
    0012 | john
    0013 | mary
    by the way i'm using oracle 8i on HP-UX. Thanks in advance.

    I can answer one of of your questions at least
    1. Where can i get the oracle xml parser libs? Is it included when i installed oracle 8i?You need the XML XDK. You can use http://www.oracle.com/technology/tech/xml/xdkhome.html as your starting point. I believe the 9i version works for 8i.
    I have no pro*c experience so I can't offer any other suggestions regarding how to do this in pro*c.

  • Bdc upload file data into internal table problem with gui_upload fm

    Hello experts,
    my coding is like this ..
    data : begin of itab occurs 0 .
    field1 like mara-matnr,
    field2......
    etc,
    end of itab.
    data: file1 type string.
    parameter :file like rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
    static = 'X'
    mask = space
    field_name = 'FILE'
    CHANGING
    file_name = file.
    START-OF-SELECTION.
    FILE1 = FILE . "HERE I AM PASSING INTO STRING
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = FILE1
    FILETYPE = 'ASC'
    has_field_separator = 'X'
    TABLES
    data_tab = itab. " here the data is not populating from the file , it is giving the error like speified table not found.
    HERE i am getting the message like "specified table name not recgonised" . the data is not populating into the itab from the file.
    file structure is same as the internal table.
    I stored the file as .txt( ie in notepad).
    my file is like this..
    10000 200 323 sunndarrr.......
    i had a problem with this bdc , i am getting like "specified table name not recgonised" in the fm gui_upload while debugging.
    when i am using the ws_upload it is working fine.
    please guide me where i have done the mistake.
    thank you so much for all the replies.

    Hi,
    Have a look on the following code.
    TABLES: kna1.
    DATA: BEGIN OF itab1 OCCURS 0,
          str(255),
          END OF itab1.
    DATA: itab2 TYPE kna1 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
      EXPORTING
        filename                = 'D:\ABAP EVE\ffile1.txt'
        filetype                = 'ASC'
      TABLES
        data_tab                = itab1
      EXCEPTIONS
        conversion_error        = 1
        file_open_error         = 2
        file_read_error         = 3
        invalid_type            = 4
        no_batch                = 5
        unknown_error           = 6
        invalid_table_width     = 7
        gui_refuse_filetransfer = 8
        customer_error          = 9
        no_authority            = 10
        OTHERS                  = 11.
    IF sy-subrc <> 0.
      WRITE:/ 'sorry'.
    ELSE.
      LOOP AT itab1.
        SPLIT itab1-str AT ',' INTO itab2-kunnr itab2-name1.
        APPEND itab2.
      ENDLOOP.
      IF sy-subrc = 0.
        LOOP AT itab2.
          WRITE:/ itab2-kunnr,itab2-name1.
          INSERT INTO kna1 VALUES itab2.
        ENDLOOP.
        IF sy-subrc = 0.
          WRITE:/ 'inserted'.
        ELSE.
          WRITE:/ 'not inserted'.
        ENDIF.
      ELSE.
        WRITE:/ 'fail'.
      ENDIF.
    ENDIF.
    Flat file:
    10001,Sadney
    10003,Yogesh
    20005,Madan
    1.U need to define internal table with one field of max size
    2.upload the flat file data into that internal table
    3.split that internal table data into another internal table(having fields)
    <REMOVED BY MODERATOR>
    thanks,
    Chandu
    Edited by: Alvaro Tejada Galindo on Apr 30, 2008 12:17 PM

  • Most efficient way to load XML file data into tables

    I have a complex XML file running into MBs. I want to load it's data into 7-8 tables.
    Which way will be better:
    1) Use SQL Loader to actually load directly into the 7-8 tables directly by modifying the control card.
    Is this really possible and feasible? I am not even sure about it
    2) Load data as XML Type in a table and register it. Then extract from there to load into various tables.
    Please help. I have to find the most efficient way of doing it.
    Regards,
    Sudhir

    Yes it is possible to use SQL*Loader to parse and load XML, but that is not what it was designed for and so is not recommended. You also don't need to register a schema, just to load/store/parse XML in the DB either.
    So where does that leave you?
    Some options
    {thread:id=410714} (see page 2)
    {thread:id=1090681}
    {thread:id=1070213}
    Those talk some about storage options and reading in XML from disk and parsing XML. They should also give you options to consider. Without knowing more about your requirements for the effort, it is difficult to give specific advice. Maybe your 7-8 tables don't exist and so using Object Relational Storage for the XML would be the best solution as you can query/update tables that Oracle creates based off the schema associated to the XML. Maybe an External Table definition works better for reading the XML into the system because this process will happen just once. Maybe using WebDAV makes more sense for loading XML to be parsed (I don't have much experience with this, just know it is possible from what I've read on the forums). Also, your version makes a difference as you have different options available depending upon the version of Oracle.
    Hope all that helps as a starter.
    Edited by: A_Non on Jul 8, 2010 4:31 PM
    A great example, see the answers by mdrake in {thread:id=1096784}

  • Import Excel File Data into oracle database table.

    HI,
    i want to insert data into a specific table from a excel file. please help me..
    for example
    emp.xls file's data need to be import in emp database table.
    thanks in advance...

    Hi,
    to all knowledgable person, this would be gald for u all that i have solved the problem.
    through this procedure..
    PROCEDURE IMPORT_FROM_EXCEL_PROC (as_FileName VARCHAR2, exe_name varchar2) IS
              appid PLS_INTEGER;
              convid PLS_INTEGER;
              docid PLS_INTEGER;
              conv_established BOOLEAN := FALSE;
              buffer VARCHAR2(100);      
              Emp_code VARCHAR2(100);
              Emp_name VARCHAR2(100);
              Emp_desig VARCHAR2(100);
              Emp_Salary VARCHAR2(100);
              ls_error VARCHAR2(1000);
              li_row integer;
              li_col integer;
              li_error_count integer;
              li_load_count integer;
    BEGIN
         --Start Excel
         --This line assumes that Excel is in the specified directory
              --     APPID := DDE.APP_BEGIN('D:\OFFICE11\EXCEL.EXE',DDE.APP_MODE_MINIMIZED);
              APPID := DDE.APP_BEGIN(exe_name,DDE.APP_MODE_MINIMIZED);
         --Establish a conversation with Excel
         --The following loop will not end until a conversation with Excel
         --has been established. Therefore, it can result in a endless loop,
         --so use with caution.
              WHILE NOT conv_established LOOP
              BEGIN
              convid := DDE.INITIATE('excel', 'system');
              conv_established := TRUE;
              EXCEPTION
              WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
              conv_established := FALSE;
              END;
              END LOOP;
         --Open Excel document
         --This assumes that you have an Excel spreadsheet named ddetest.xls in the root of c:
              DDE.EXECUTE(convid, '[Open("'||as_FileName||'")]', 10000);     
         --Initiate conversation with Excel document
              docid := DDE.INITIATE('excel',as_FileName);
         --Begin transfer from Excel to Forms
                   li_load_count := 0;
                   li_error_count := 0;
                   li_col := 1;
                   li_row := 2;
                   GO_BLOCK('IMPORT_XLS');          
                   DDE.REQUEST (docid, 'R' || TO_CHAR(li_row) || 'C' || TO_CHAR(li_col), buffer, DDE.CF_TEXT, 1000);          
                   WHILE length(buffer) > 2 LOOP           
                   WHILE li_col < 5 LOOP
                        buffer := substr(buffer, 1, instr(buffer, chr(10)) - 2);               
                   IF li_col = 1 THEN --Emp_code
                        Emp_code := buffer;     
                   ELSIF li_col = 2 THEN --Emp_name     
                        Emp_name := buffer;     
                   ELSIF li_col = 3 THEN --Emp_desig      
                        Emp_desig := buffer;     
                   ELSE --Emp_salary
                        Emp_salary := buffer;
                   END IF;
                   IF nvl(ls_error,'N') = 'N' THEN
                   li_col := li_col + 1;
                   DDE.REQUEST (docid, 'R' || TO_CHAR(li_row) || 'C' || TO_CHAR(li_col), buffer, DDE.CF_TEXT, 1000);
                   ELSE
                   li_col := 5;
                   END IF;               
                   END LOOP;
                   IF nvl(ls_error, 'N') = 'N' THEN
                   li_load_count := li_load_count + 1;
                   IF li_load_count = 1 THEN
                   FIRST_RECORD;
                   ELSE
                   NEXT_RECORD;
                   END IF;
                   :IMPORT_XLS.Emp_code := Emp_code;               
                   :IMPORT_XLS.Emp_name := Emp_name;          
                   :IMPORT_XLS.Emp_desig := Emp_desig;
                   :IMPORT_XLS.Emp_salary := Emp_salary;
                   ELSE
                   li_error_count := li_error_count + 1;
                   DDE.POKE(docid, 'R' || TO_CHAR(li_row) || 'C5', ls_error, DDE.CF_TEXT, 10000);
                   END IF;
                   ls_error := '';
                   Emp_code := '';
                   Emp_name := '';
                   Emp_desig := '';
                   Emp_salary := '';
                   li_col := 1;
                   li_row := li_row + 1;
                   DDE.REQUEST (docid, 'R' || TO_CHAR(li_row) || 'C' || TO_CHAR(li_col), buffer, DDE.CF_TEXT, 1000);                
                   END LOOP;               
                   IF li_error_count > 0 THEN
                        DDE.EXECUTE(convid, '[[save]]', 10000);
                        Message(TO_CHAR(li_load_count) || ' Record(s) Loaded. ' ||
                        TO_CHAR(li_error_count) || ' Invalid Record(s). See error in excel file.');
                        ELSE
                        Message(TO_CHAR(li_load_count) || ' Record(s) Successfully Loaded.');
                   END IF;                
                   --End transfer to Excel
                   DDE.TERMINATE(docid);
                   DDE.TERMINATE(convid);
                   DDE.APP_END(appid);                          
                   --Handle exceptions
                   EXCEPTION
                   WHEN DDE.DDE_APP_FAILURE THEN
                   MESSAGE('WINDOWS APPLICATION CANNOT START.');
                   WHEN DDE.DDE_PARAM_ERR THEN
                   MESSAGE('A NULL VALUE WAS PASSED TO DDE');
                   WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
                   MESSAGE('DDE CANNOT ESTABLISH A CONVERSATION');
                   WHEN DDE.DMLERR_NOTPROCESSED THEN
                   MESSAGE('A TRANSACTION FAILED');
    END;

Maybe you are looking for

  • Use different JRE versions in Oracle Discoverer 10g(10.1.2.0)

    Hello. We have a Oracle Forms application which also uses Discoverer Plus and Reports. Problem is we have some user clients who uses XP/IE 6.0 while otheres has Vista IE 8.0. Based on here http://www.oracle.com/technetwork/middleware/ias/downloads/as

  • I am unable to download iPhoto to my macbook air

    help

  • Regarding Absence Quotas - SAP Time Management

    1. I want to delete absence quota info type (2006)  but iam unable to delete that .. I deleted absence infotype (2001)              Planned working time I changed  absence infotype (2006) I changed Time constraint from Z to 2 still i couldnt able to

  • Problem in initialization delta load

    Hi All, I am facing a problem while doing an initialization delta from one ODS obj to another. Error says "data is not been updated in PSA table" The ODS object I am trying to load is getting data from 3 ods below ODS obj, out of 3ODS's 2 were succes

  • ITUNES Windows problems with more than 2 speakers

    I can play any music in Winamp or WMP and hear it in my quadraphonic system speakers. However, when I play them through Itunes, I can hear the music only in the front speakers. I have a Soundblaster Live sound card with the most updated drivers, and