Procedure creation error..help required .

Hai
I have created the procedure like this.
The work of this procedure is to update the
progress and calculate the percentage of completion.
I have marked the problem part down.
The problem is ..
there can be n number of planfields in a single SP.
and each planfield can contain n number of index and each index can contain n number of ids.
I need to check for a particular SP, whether all indexes and ids are completed.
if completed, i am talking a value of completion for other table.
After checking thru the loop..
I am calculating the completion percent.
Here the first cursor return the SP
and for that SP i need to open a cursor for index count.
Can anyone suggest me how to solve this problem.
CREATE OR REPLACE PROCEDURE "P_PROGRESS" (lDate IN DATE) IS
P_SCOPE varchar2(12);
PR_SCOPE VARCHAR2(12);
P_VALUE NUMBER(12);
TC_VALUE NUMBER(12);
TR_VALUE NUMBER(12);
P3_VALUE NUMBER(12);
FQA_VALUE NUMBER(12);
P1_VALUE NUMBER(12);
P2_VALUE NUMBER(12);
counter number(10);
FQ_VALUE VARCHAR2(12);
F_VALUE VARCHAR2(12);
DU_DATE DATE;
SP VARCHAR2(20);
pr_counter number(12);
dsm_counter number(12);
pre_value number(12);
P_H_VALUE NUMBER(12);
P_O_VALUE NUMBER(12);
P_SPNO NUMBER(10);
CURSOR CUR_SPNO IS
SELECT DISTINCT SPNO FROM V_PRODUCTION_INFO;
/*Problem part*/
CURSOR CUR_OBJ(P_SNO NUMBER) IS
SELECT DISTINCT SPNO,PLANFIELD,PLANINDEX FROM V_PRODUCTION_INFO WHERE SPNO = P_SNO;
BEGIN
OPEN CUR_SPNO;
SELECT COUNT(1) INTO COUNTER FROM PRODUCTION_STATUS WHERE
TO_CHAR(PRODN_DATE,'DD-MON-YYYY') = ldate;
IF COUNTER > 0 THEN
DELETE FROM PRODUCTION_STATUS WHERE PRODN_DATE = ldate;
END IF;
P_H_VALUE :=0;
P1_VALUE := 0;
P2_VALUE := 0;
P_O_VALUE := 0;
LOOP
FETCH CUR_SPNO INTO SP;
EXIT WHEN CUR_SPNO%NOTFOUND;
Problem Part
FOR P_SPNO IN CUR_OBJ(SP)
LOOP
SELECT DISTINCT STATUS into pre_counter FROM BEWAG_WORKALLOCATION WHERE SPEISEGEB_NR=CUR_OBJ.SPNO AND PF_PLANFELDNUMMER =CUR_OBJ.PLANFIELD AND PLANFELDINDEX = CUR_OBJ.PLANINDEX AND STATUS = 'CLOSED' AND ITEM_CODE = '355' AND UNIT = 'PI' ORDER BY STATUS;
IF STATUS = 'CLOSED' THEN
SELECT SCOPE INTO P1_VALUE FROM V_PRE_PRODUCTION_SCOPE WHERE STAGE ='PREHV';
END IF;
P_H_VALUE := P_H_VALUE + P1_VALUE;
SELECT COUNT(DISTINCT WORKAREA) into pre_counter FROM BEWAG_WORKALLOCATION WHERE SPEISEGEB_NR=CUR_OBJ.SPNO AND PF_PLANFELDNUMMER =CUR_OBJ.PLANFIELD AND PLANFELDINDEX = CUR_OBJ.PLANINDEX AND STATUS = 'CLOSED' AND ITEM_CODE = '365' AND UNIT='OBJ';
select count(distinct o.objectid) into dsm_counter from pfidx c,comp_2300 o where planfeldnummer = cur_sp.planfield
and planfeldindex = CUR_OBJ.PLANINDEX and not (c.xro_koo * 10000 < o.xlow or c.xlu_koo * 10000 > o.xhigh or c.yro_koo * 10000 < o.ylow or c.ylu_koo * 10000 > o.yhigh) order by o.objectid;
if pre_counter = dsm_counter then
     SELECT DISTINCT STATUS into pre_counter FROM BEWAG_WORKALLOCATION WHERE SPEISEGEB_NR=CUR_OBJ.SPNO AND PF_PLANFELDNUMMER =CUR_OBJ.PLANFIELD AND PLANFELDINDEX = CUR_OBJ.PLANINDEX AND STATUS = 'CLOSED' AND ITEM_CODE = '355' AND UNIT = 'PI' ORDER BY STATUS;
     IF STATUS = 'CLOSED' THEN
     SELECT SCOPE INTO P2_VALUE FROM V_PRE_PRODUCTION_SCOPE WHERE STAGE ='PREOV';
     END IF;
     P_O_VALUE := P_O_VALUE + P2_VALUE;
end if;
END LOOP;
CLOSE CUR_OBJ;
P_VALUE := P_H_VALUE + P_O_VALUE;
Problem Part ends here
SELECT MAX(SCOPE) INTO P_SCOPE FROM V_PRODUCTION_SCOPE WHERE SPNO = SP AND PROCESS ='Phase II';
IF P_SCOPE IS NOT NULL and P_SCOPE <> 'null' AND P_SCOPE <> '0' THEN
SELECT NVL(ROUND(NVL(P_VALUE/P_SCOPE) / P_SCOPE*100,2),0) INTO P_VALUE FROM DUAL;
END IF;
SELECT MAX(SCOPE) INTO P_SCOPE FROM V_PRODUCTION_SCOPE WHERE SPNO = SP AND PROCESS ='Phase II';
IF P_SCOPE IS NOT NULL and P_SCOPE <> 'null' AND P_SCOPE <> '0' THEN
PR_SCOPE := P_SCOPE;
SELECT NVL(ROUND((NVL(SUM(ACHIEVED),0) / P_SCOPE) * 100,2),0) INTO TC_VALUE FROM V_PRODUCTION_INFO WHERE SPNO = SP AND STAGE = 'Template Creation' AND TO_CHAR(ACT_DATE,'DD-MON-YYYY') <= ldate;
SELECT NVL(ROUND((NVL(SUM(ACHIEVED),0) / P_SCOPE) * 100,2),0) INTO TR_VALUE FROM
V_PRODUCTION_INFO WHERE SPNO = SP AND STAGE = 'Trasse' AND TO_CHAR(ACT_DATE,'DD-MON-YYYY') <= ldate;
ELSE
PR_SCOPE := '0';
TC_VALUE := 0;
TR_VALUE := 0;
END IF;
SELECT MAX(SCOPE) INTO P_SCOPE FROM V_PRODUCTION_SCOPE WHERE SPNO = SP AND PROCESS ='Phase III';
IF P_SCOPE IS NOT NULL and P_SCOPE <> 'null' AND P_SCOPE <> '0' THEN
SELECT NVL(ROUND((NVL(SUM(ACHIEVED),0) / P_SCOPE) * 100,2),0) INTO P3_VALUE FROM V_PRODUCTION_INFO WHERE SPNO = SP AND
STAGE = 'Phase III' AND TO_CHAR(ACT_DATE,'DD-MON-YYYY') <= ldate;
ELSE
P3_VALUE := 0;
END IF;
SELECT COUNT(DISTINCT PLANFIELD) INTO FQ_VALUE FROM BEWAG_MASTER WHERE SPNO = SP;
IF FQ_VALUE IS NOT NULL AND FQ_VALUE <> 'null' AND FQ_VALUE <> '0' THEN
SELECT COUNT(DISTINCT PLANFIELD) INTO F_VALUE FROM FQA_ACCEPTANCE WHERE SPNUMBER = SP;
FQA_VALUE := ROUND((F_VALUE / FQ_VALUE) * 100,2);
ELSE
FQA_VALUE := 0;
END IF;
IF SP <> 'null' THEN
SELECT MAX(PLANNED_DATE) INTO DU_DATE FROM SP_COMPLETION_DATE WHERE SPNUMBER = SP;
IF DU_DATE IS NULL THEN
DU_DATE := '';
END IF;
END IF;
INSERT INTO PRODUCTION_STATUS(PRODN_DATE,SPNUMBER,PRODN_SCOPE,PREPRODN_STATUS,TEMPPRODN_STATUS,TRASSEPRODN_STATUS,PIIIPRODN_STATUS,FQAPRODN_STATUS,DUE_DATE) VALUES(ldate,SP,PR_SCOPE,P_VALUE,TC_VALUE,TR_VALUE,P3_VALUE,FQA_VALUE,DU_DATE);
COMMIT;
END LOOP;
CLOSE CUR_SPNO;
END P_Y_PROGRESS;

With all due respect, you're having a laugh if you think we're going to wade through your spaghetti code and not very well explained business requirement. We do this for fun. Having said that, maximum respect to anyone who does have the patience to figure it out.
In the meanwhile, I offer you this possible solution, which being pure SQL is I think easy to understand and doesn't need commenting (unlike some code I could mention).
Cheers, APC
CREATE TABLE x1 (plan_no number, plan_field number, plan_index number
                  , index_id number, status VARCHAR2(10))
INSERT INTO x1 values (1, 1, 1, 1, 'OPEN')
INSERT INTO x1 values (1, 1, 1, 2, 'OPEN')
INSERT INTO x1 values (1, 1, 1, 3, 'OPEN')
INSERT INTO x1 values (1, 1, 1, 4, 'OPEN')
INSERT INTO x1 values (1, 1, 1, 5, 'OPEN')
INSERT INTO x1 values (1, 1, 1, 6, 'OPEN')
INSERT INTO x1 values (1, 1, 2, 1, 'OPEN')
INSERT INTO x1 values (1, 1, 2, 2, 'CLOSED')
INSERT INTO x1 values (1, 1, 2, 3, 'CLOSED')
INSERT INTO x1 values (1, 1, 2, 4, 'CLOSED')
INSERT INTO x1 values (1, 1, 2, 5, 'CLOSED')
INSERT INTO x1 values (1, 3, 1, 1, 'CLOSED')
INSERT INTO x1 values (1, 3, 1, 2, 'CLOSED')
INSERT INTO x1 values (1, 4, 1, 1, 'OPEN')
INSERT INTO x1 values (1, 4, 1, 2, 'CLOSED')
INSERT INTO x1 values (1, 4, 2, 1, 'OPEN')
INSERT INTO x1 values (1, 4, 2, 2, 'CLOSED')
INSERT INTO x1 values (1, 4, 2, 3, 'OPEN')
INSERT INTO x1 values (1, 4, 2, 4, 'CLOSED')
SELECT plan_no, plan_field, plan_index, 100 * (tot_cl/tot_idx) as pct_closed FROM (
SELECT plan_no, plan_field, plan_index, count(*) AS tot_idx, sum(decode(status, 'CLOSED', 1, 0)) AS tot_cl
FROM   x1
GROUP BY plan_no, plan_field, plan_index )
   PLAN_NO PLAN_FIELD PLAN_INDEX PCT_CLOSED
         1          1          1          0
         1          1          2         80
         1          3          1        100
         1          4          1         50
         1          4          2         50
5 rows selected.

Similar Messages

  • Pricing Error (help required)

    Is there any routine which includes the tax value in R100 as well ,currently  the problem is that the 100% Discount condition is only including the net price
    And in the pricing procedure i m using two prices one price of tax calculation and the other is consumer price first i calculate the tax from base price then i deduct the tax from the consumer price this calculation is working fine through standard routines.
    Only problem is that when i enter NRAB and R100 at end it only includes Net Value which is calculated through Formual using condition type NTPS
    Kindly Help Required ASAP

    Hi ABAPAR,
    I m not getting the exact picture of what U desired, from your pricing procedure.
    As you r using multiple free goods condition type...anyway.
    If you wanted to make the calculated tax "amount + "as a basis for the calculation of particular condition type.you can use the functionality of subtotal.
    That mean go and assign one subtotal no. to subtotal column in your pricing procedur to all condition type to which you wanted to make as a basis for furthur calculation.(this settings allow the total of all values in one subtotal).
    And finally U can assign this subtotal no.to the "alt.cal.B.value "of pricing procedure for the calculation of particular condition type.
    If you r using any std condion type that come up with certain routine like NRAB or somthing...possibly that will not allow u to do this settings. so in this case clear your free goods requirement or use any new condition type. i.e . Z creation.
    consult your SD consultant.
    karnesh

  • Utl_http error help required

    Hi,
    Thanks for help,
    I create the following procedure for this purpose and i received the following errors:
    declare
         txt  Varchar2(4000);
          request   utl_http.req;
         response  utl_http.resp;
    BEGIN
         utl_http.set_proxy('','');
          request := utl_http.begin_request('http://localhost:7778/reports/rwservlet?report=f:\oracle\TIS13.rdf&desformat=pdf&destype=cache&userid=wh1/wh1@dwh');
         --utl_http.set_header(request, 'User-Agent', 'Mozilla/4.0');
            response := utl_http.get_response(request);
         LOOP
         utl_http.read_line(response, txt, TRUE);
         dbms_output.put_line(txt);
         END LOOP;
          utl_http.end_response(response);
    EXCEPTION
         WHEN utl_http.end_of_body THEN
              utl_http.end_response(response);
    WHEN OTHERS THEN
           -- Consider logging the error and then re-raise
           RAISE;
    end;ERROT AT line1:
    ORA-29273: HTTP request failed
    ORA-06512" at "SYS.UTL_HTTP",line 1231
    ORA-29276: transfer timout
    ORA-06512: at line 20
    Any solution would be hightly appriciated
    Regards

    it would be easier for you to use the OOTB Reports integration with Portal:
    - http://download.oracle.com/docs/cd/B14099_19/bi.1012/b14048/pbr_portal.htm#i1008279
    Cheers,
    Mick

  • Crystal report 10 error - Help required

    I am using crystal report 10.0.0.533 - Crystal report developer edition.
    All of my reports are working fine without any issue, except one report.
    It throws the below error message:
    Crystal Reports ActiveX Designer error '80047cbd'
    *You are attempting to use functionality that falls under the Crystal Decisions Report Creation API license. This system does not have a valid license, or the evaluation copy of the license has expired. Please contact Crystal Decisions to obtain a Report Creation API license.*
    /egads/Reports/EventDataRep.asp, line 68
    At line number 68 we have below code:
    Tables.Add "", , Session("oRecRep"), , "p2smon.dll"
    This report was earlier used for Crystal 8.5. However Crystal 10 no longer uses p2smon.dll.
    Alternative dll in Crystal report 10 is crdb_ado.dll, I replaced it in the code, however still it is not working.
    Could anyone please help me with this issue?

    Even after replacing with crdb_cdo.dll...I am getting same error..
    Below is the code:
    Set oConn = Server.CreateObject("ADODB.Connection")
    Set oRec = Server.CreateObject("ADODB.Recordset")
    Set oRecRep = Server.CreateObject("ADODB.Recordset")
    oConn.Open strEGadsUIDConn
    strSQL = "SELECT CRYSTAL_XML_STRING, CRYSTAL_QUERY_STRING FROM TEMP_CRYSTAL_REPORT WHERE USER_ID = '" & strUserId & "' "
    Set oRec = oConn.Execute(strSQL)
    If Not oRec.EOF Then
         strXMLString = oRec("CRYSTAL_XML_STRING")
         strSQLQuery = oRec("CRYSTAL_QUERY_STRING")
    End If     
    strSQLQuery = Replace(strSQLQuery, "%", "'", 1)
    Set Session("oRecRep") = oConn.Execute(strSQLQuery)
    If Not Session("oRecRep").EOF Then
         Session("oRecRep").MoveFirst
    End If     
    ' CREATE THE APPLICATION OBJECT                                                                    
    If Not IsObject (session("oApp")) Then                             
         Set session("oApp") = Server.CreateObject("CrystalRuntime.Application.10")
    'Set session("oApp") = Server.CreateObject("Crystal.CRPE.Application")
    End If                                                               
    Path = Request.ServerVariables("PATH_TRANSLATED")                    
    While (Right(Path, 1) <> "\" And Len(Path) <> 0)                     
    iLen = Len(Path) - 1                                                 
    Path = Left(Path, iLen)                                              
    Wend                                                                               
    'This "While/Wend" loop is used to determine the physical path (eg: C:\) to the
    'Crystal Report file by translating the URL virtual path (eg: http://Domain/Dir)                                                                       
    'OPEN THE REPORT (but destroy any previous one first)                                                    
    If IsObject(session("oRpt")) then
         Set session("oRpt") = nothing
    End if
    'Set session("oRpt") = session("oApp").NewReport
    reportname = "rptEventDataTemplate.rpt"
    Set session("oRpt") = session("oApp").OpenReport(path & reportname, 1)
    'Set oRptOptions = Session("oRpt").Options
    session("oRpt").MorePrintEngineErrorMessages = 0
    session("oRpt").DiscardSavedData
    'session("oRpt").MorePrintEngineErrorMessages = False
    session("oRpt").EnableParameterPrompting = 0
    session("oRpt").PaperOrientation = 2
    Set Database = session("oRpt").Database
    'Instantiate the Database Collection
    Set Tables = Database.Tables
    'Instantiate the Tables Collection
    Tables.Add "", , Session("oRecRep"), , "crdb_cdo.dll"
    Set FirstTable = Tables.Item(1)
    Set Fields = FirstTable.Fields
    'Set Group Name
    GroupField = "{ado.UNIT_NAME}"
    For i = 1 to Fields.Count
         result = strcomp(Fields.Item(cint(i)).Name,cstr(GroupField))
         If cint(result) = 0 then
              Set GroupFieldIs = Fields.Item(cint(i))
         end if
    next
    Select Case cstr(SortDirection)
         Case "Ascending"  intsortdirection = 0
         Case "Descending" intsortdirection = 1
         Case "Original Order" intsortdirection = 2

  • Java.util.zip.ZipException: invalid entry size error --  help required

    Hi all
    I am sure this error would have been posted many number of times, but I would really appreciate if someone could help me with my problem. I am working on reading data from a .zip file, which in it has ~5GB data. All I am performing is a read operation through the piece of code specified below. This code worked well for .zip files handling till ~2.5GB
    FileInputStream fis = new FileInputStream(filename);
    BufferedInputStream bis = new BufferedInputStream(fis);
    ZipInputStream zis = new ZipInputStream(bis);
    StreamTokenizer tok = new StreamTokenizer( zis );
    ZipEntry entry;
    while((entry = zis.getNextEntry()) != null)
    \\read from the zip file through the streamTokenizer
    I just print what I read through the program, on the console.
    But the error I get is
    java.util.zip.ZipException: invalid entry size (expected 4294967295 but got 2117536490 bytes)
    at java.util.zip.ZipInputStream.readEnd(Unknown Source)
    at java.util.zip.ZipInputStream.read(Unknown Source)
    at java.util.zip.InflaterInputStream.read(Unknown Source)
    at java.io.StreamTokenizer.read(Unknown Source)
    at java.io.StreamTokenizer.nextToken(Unknown Source)
    at ZipFileStreams.getMessages(ZipFileStreams.java:677)
    at ZipFileStreams.main(ZipFileStreams.java:814)
    Could anybody give me hints as to what am I missing and where am i going wrong. Any help would be appreciated.
    Thanks

    Hi,
    I get the same exception while reading a ZIP file. The size if the ZIP file is just 82KB but I am reading it over FTP not sure if it makes any difference. I am using JDK 1.4.2_05. Here is the code I am trying to execute.
    public class TestFTP {
    public static void main( String[] argv ) throws Exception {
    String inboundPath = "/transfer/inbound/";
    FTPClient ftp = new FTPClient();
    ftp.connect("123");
    ftp.login( "123", "123" );
    ftp.changeWorkingDirectory(inboundPath);
    FTPFile[] zipFiles = ftp.listFiles("*.zip");
    TelnetClient telnetClient;
    for(int i=0;i<zipFiles.length;i++){   
    System.out.println(zipFiles.getName());
    ZipInputStream zis = new ZipInputStream(ftp.retrieveFileStream(zipFiles[i].getName()));
    for (ZipEntry entry = zis.getNextEntry(); entry != null; entry = zis.getNextEntry()){           
    System.out.println(entry.getName());
    The error message is
    java.util.zip.ZipException: invalid entry size (expected 10291 but got 10233 bytes)
         at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:367)
         at java.util.zip.ZipInputStream.read(ZipInputStream.java:141)
         at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:91)
         at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:69)
         at test.TestFTP.main(TestFTP.java:41)
    Exception in thread "main"
    Please let me know if you were able to fix the problem.
    Thanks

  • HotSpot Virtual Machine Error, Internal Error Help Required.

    We are getting the below error from past five months on the production application. Application gets killed when it encounters this error.
    # HotSpot Virtual Machine Error, Internal Error
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Error ID: 47454E45524154452F4F502D41500E4350500842 01
    # Problematic Thread: prio=5 tid=0x134ba40 nid=0x38d runnable
    Can any body help me in this regard what may be the reasons for this and how to avoid this?

    Update your JDK to 1.4.1_03 , see bug 4799414 .
    http://developer.java.sun.com/developer/bugParade/bugs/4799414.html

  • ORA-00600 Error Help required

    I am getting Error ORA-00600 for a procedure which tries get
    a CLOB as output paramater. It is a simple stored proc which is
    just querying to get this data.
    However it fails at times giving ORA-00600 error which we have
    no clue why it's happening.
    There is sufficient space in the server and also we have
    restarted the database several times.
    Any pointers to why is this happening.
    Sunil

    Cause:     This is a catchall internal error message for Oracle
    program exceptions. It indicates that a process has met a low-
    level, unexpected condition.
    Various causes of this message include:
    time-outs
         file corruption
         failed data checks in memory
         hardware, memory, or I/O errors
         incorrectly restored files
    The first argument is the internal message number. Other
    arguments are various numbers, names, and character strings. The
    numbers may change meanings between different versions of the
    Oracle Server.
    Action:     Report this error to customer support after gathering
    the following information:
    -events that led up to the error
         -the operations that were attempted that led to the
    error
    -the conditions of the operating system and database at
    the time of the error
         -any unusual circumstances that occurred before
    receiving theORA-00600 message
         contents of any trace files generated by the error
         the relevant portions of the Alert file
    Copyright (C) 1995, Oracle Corporation

  • Data Object cannot be opened / accessed error - help required

    I am running a CR 2008 and have a report set against a SQL view linked via a ODBC link. The view however has been updated and now includes an extra field, which I need to add into my report.
    When I use the Set Database Location to update the link I get an error message advising "Data Object cannot be opened/accessed". I click OK to this and then get a further error "Unknown Database Connector Error".
    Also, when I go to refresh the report I get this error "The database table "..." cannot be found. Proceed to remove this table from the report?" - if I click no the report refreshes correctly anyway, so it must be able to connect.
    I have also tried refreshing the fields in field explorer too, but the extra field doesnt appear.
    Any help would be gratefully received.

    I can connect to the view via a new blank report and the missing field appears. However when I go to verify database it says the database cannot be found. It asks me if I want to remove it from the report, I select No then it tells me the database is uptodate.
    Via the set database location it gives me the error in the initial post.
    I think I have a workaround in that if I add a new database table to the same sql view the extra field is in there - so I will manually have to go though the report and change each formula, running total, group, and record selection from the original to the new table, then remove the old table.
    Frustrating but it does appear to work.

  • Child to Parent Node Creation, Mapping Help required

    Hi Guys,
    I need some suggestions on the following mapping problem, kindly suggest some solution if possible:
    I have a sender structure as:
    ParentNode
    ..........RecordSet  (0 to 1)
    ................ SValue1  (0 to 1)
    ................ SValue2  (0 to 1)
    .................SValue3  (0 to 1)
    For the receiver Structure I have following:
    ParentNode
    ..........RSet  (0 to unbounded)
    ............. RValue  (0 to 1)
    ..............RField    (0 to 1)
    Now my mapping conditions requires for every SValue1, SValue2, SValue3 source fields, I should generate at receiver side a new RSet and the value of SValue1/SValue2/SValue3 field(s) should be Provided into RValue, and RField should have the respective field name.
    I am trying this with PI Graphical mapping, is there any better solution for it?

    Hi,
    As source structure occurence is 0..1 in this case duplicate the target structure and use create if function with source as SValue1 ...so that for each of Svalues...a corresponding target node will get generated...
    With graphical mapping you should be able to do this...else need to go for UDF...
    HTH
    Rajesh

  • Using FileOutputStream for File Creation. Help Required!!

    Folks,
    I am using the FileOutputStream to create a file.For this I am
    saying:
    FileOutputStream fout2 = new FileOutputStream("Name.txt");
    This creates the File in the Current directory of the IDE(JBuilder 5).
    I want to create ths File in the a logs directory,taking the
    relative path.
    So I want the File to be created as ./logs/Filename.txt??
    How do I set the relative path in the FileOutputStream ??
    Can anyone please respond?

    Yes, "." does not coincide with the classes directory, especially when starting the application from an IDE.
    Take a look at the system properties for some directories:
    System.getProperties().list(System.out);
    System.putProperty("user.dir", "...");For your means I would abuse the ClassLoader, and specify a full path, and start to patch a file name from it:
    java.net.URL u = this.getClass().getResource(".../x.gif");

  • Help required in Weblogic 6 - Creation & Configuration of Web Application

    Forum Home > Enterprise JavaBeans[tm]
    Topic: Help required in Weblogic 6 - Creation & Configuration of Web Application
    Duke Dollars
    2 Duke Dollars assigned to this topic. Reward the best responses to your question
    using the icons below, or transfer additional Duke Dollars to this topic.
    Welcome moinshariff!
    Watching this topic.
    Previous Topic Next Topic
    This topic has 1 reply on 1 page (Most recent message: Jan 23, 2002 1:05 AM)
    Author: moinshariff Jan 22, 2002 4:55 AM
    Hi,
    I am using Weblogic 6. I have created a new Web
    Application called Web (I have not used the DefaultWebApp_myserver).
    And I have the following settings:
    Name : Web
    URI : Web
    and Path : C:\Web
    and placed my JSP files under c:\Web\
    I am able to access the first page, but after that I am not able to access the
    second page.
    I get "Error 404--Not Found" on the browser. Basically the class file is not getting
    created under /Web-inf/_tmp_war_myserver_myserver_Web/jsp_servlet/ folder .
    I tried a work around for this. I copied all my files under one more folder called
    web and placed this under C:\Web
    The it works. Now I have 2 copied off all the files, 1 copy under c:\web and another
    copy under c:\web\web\.
    If I have the files under DefaultWebApp_myserver and have the setting as
    Name: DefaultWebApp_myserver
    URI: DefaultWebApp_myserver
    Path: .\config\mydomain\applications
    everything works fine.
    Can any one please let me know if there is any configuration which has to be done
    so that I do not duplicate the code in 2 directories
    Thanks in advance.
    Regards,
    Moin

    Forum Home > Enterprise JavaBeans[tm]
    Topic: Help required in Weblogic 6 - Creation & Configuration of Web Application
    Duke Dollars
    2 Duke Dollars assigned to this topic. Reward the best responses to your question
    using the icons below, or transfer additional Duke Dollars to this topic.
    Welcome moinshariff!
    Watching this topic.
    Previous Topic Next Topic
    This topic has 1 reply on 1 page (Most recent message: Jan 23, 2002 1:05 AM)
    Author: moinshariff Jan 22, 2002 4:55 AM
    Hi,
    I am using Weblogic 6. I have created a new Web
    Application called Web (I have not used the DefaultWebApp_myserver).
    And I have the following settings:
    Name : Web
    URI : Web
    and Path : C:\Web
    and placed my JSP files under c:\Web\
    I am able to access the first page, but after that I am not able to access the
    second page.
    I get "Error 404--Not Found" on the browser. Basically the class file is not getting
    created under /Web-inf/_tmp_war_myserver_myserver_Web/jsp_servlet/ folder .
    I tried a work around for this. I copied all my files under one more folder called
    web and placed this under C:\Web
    The it works. Now I have 2 copied off all the files, 1 copy under c:\web and another
    copy under c:\web\web\.
    If I have the files under DefaultWebApp_myserver and have the setting as
    Name: DefaultWebApp_myserver
    URI: DefaultWebApp_myserver
    Path: .\config\mydomain\applications
    everything works fine.
    Can any one please let me know if there is any configuration which has to be done
    so that I do not duplicate the code in 2 directories
    Thanks in advance.
    Regards,
    Moin

  • Download Helper, even with paid converter upgrade, gives "Invalid Capture File" errors and will not record audio, with "File Creation Error - Unable to rename/copy audio file" Error.

    Download Helper Screen Capture worked to capture video if the default "no audio" option is active. But, no audio. The "speakers" or "microphone" audio options are confusing....the audio to be captured is from the video, so what do you choose? With either "speakers" or "microphone" selected, the captured file has poor audio and no video. Re-capture efforts (speakers) get "Invalid capture file error" and "File Creation error- Unable to rename/copy audio file"
    The paid upgrade of "Converter" doesn't work.
    Instructive documentation - not very good.
    Suggestions - Need time delay between initiation of "Record" and starting the video to be recorded.
    Could use timer tracking of the record process.
    Are there operating system limitations? (Have Windows XP Pro)

    That is an issue for the developer of that Download Helper.

  • I am unable to sync my ipad..i get error message " required file cannot be found" can someone help?

    I am unable to sync my ipad..i get error message " required file cannot be found" Can you help me?

    Some things to try in this order:
    1) Make sure you designated the correct folders for music, etc.
    2) Press and Hold the Home and Power buttons on the iPad until the Apple Logo appears, about 10 seconds.
    3) Make sure all antivirus and firewalls are off.
    4) Delete and reinstall itunes. (Back up the itunes folder first.)
    Hope this helps...

  • Child creation Error on vms HELP

    Hi,
    Iam trying to execute a file from withing a java program on VMS This is my code
    public class BAMBOE {
      public static void main(String[] args) { 
        BamboeRunner boe = new BamboeRunner();
        boe.start();
    import java.io.*;
    public class BamboeRunner extends Thread implements Runnable { 
      public void run() {
        try {
          Process process = Runtime.getRuntime().exec("@SIMPEL");
          process.waitFor();
          return ;
        catch (Exception e) {
          e.printStackTrace();
          return ;
    }But I keep getting the following error:
    java.io.IOException: Child creation error: error 100052
    VMS error code: error 100052
            at java.lang.UNIXProcess.<init>(Compiled Code)
            at java.lang.Runtime.exec(Compiled Code)
            at java.lang.Runtime.exec(Compiled Code)
            at BamboeRunner.run(Compiled Code)Anybody that can help me fix this problem please??

    I've managed to get somewhere with this...
    I've got it to work by having the system command I want to run in a com file and specifying the full path to that file in the exec method without the '@'...
    e.g.
    Process proc = Runtime.getRuntime.exec("ppoi_dev:[user.dba_ppoi.matt.proc]proc.com");
    where the file
    ppoi_dev:[user.dba_ppoi.matt.proc]proc.com
    contains
    $ dir
    When I run this I can get the output from the dir command by reading from the InputStream of the Process object.
    Have fun.

  • Service Contracts Billing Schedule Creation Error

    Hi,
    I have a requirement of creating service contracts from back-end for which I am using the oks_contracts_pub.create_contract_header, create_service_line, and create_bill_schedule. I am creating my contracts with active status and renewal type of EVN (Header level), FUL(Line Level). My contract is of type subscription. The contract header and line are creating fine but the Bill schedule API is throwing an UNEXPECTED ERROR. The billing schedules need to be created based on accounting rule which can be quarterly or monthly. I have included the bill schedule code (hard coded values) for review. Any help is greatly appreciated.
    Also the version I am working on is R12
    ________________________________________________CODE___________________________________________________________________
    CREATE OR REPLACE PROCEDURE BILLING_SCHEDULE AS
    l_strm_level_tbl OKS_BILL_SCH.STREAMLVL_TBL;
    v_bill_qtrs NUMBER := 0;
    v_bill_mths NUMBER := 0;
    v_bill_days NUMBER := 0;
    v_net_amount NUMBER := 468;
    v_acct_rule_name VARCHAR2(50) := 'QUARTERLY';
    v_amt_per_day NUMBER;
    x_error_locator VARCHAR2(2000);
    v_start_date DATE := '04-MAY-2010';
    v_end_date DATE := '25-MAY-2010';
    x_return_status VARCHAr2(3);
    x_msg_count NUMBER;
    x_msg_data VARCHAR2(2000);
    v_billing_sequence NUMBER;
    x_chr_id NUMBER := 17000;
    x_line_id NUMBER := 223248604345353294444923586786456728480;
    g_day_uom VARCHAR2(10) := 'DAY';
    g_month_uom VARCHAR2(10) := 'MTH';
    g_quarter_uom VARCHAR2(10) := 'QTR';
    v_amt NUMBER;
    v_invoicing_rule_id NUMBER := -2;
    BEGIN
    --Create Billing Schedule based on accounting rule
    okc_context.set_okc_org_context;
    MO_GLOBAL.INIT('OKS');
    MO_GLOBAL.SET_POLICY_CONTEXT('S', 83);
    v_bill_qtrs := 0;
    v_bill_days := 0;
    v_bill_mths := 0;
    SELECT NVL(v_net_amount, 0)/(v_end_date - v_start_date)
    INTO v_amt_per_day
    FROM dual;
    dbms_output.put_line('Calculated amt per day ' || v_amt_per_day);
    IF v_acct_rule_name LIKE '%QUARTERLY%' THEN
    --Quarterly billing schedule
    SELECT FLOOR(MONTHS_BETWEEN( v_end_date,
    v_start_date)/3),
    v_end_date - ADD_MONTHS(v_start_date, (FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date)/3)*3))
    INTO v_bill_qtrs,
    v_bill_days
    FROM dual;
    dbms_output.put_line('Calculated the qtrs and days');
    IF v_bill_qtrs > 0 THEN
    SELECT (ADD_MONTHS(v_start_date, (FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date)/3)*3)) - v_start_date)*v_amt_per_day
    INTO v_amt
    FROM dual;
    dbms_output.put_line('Calculated qtr amt');
    SELECT NVL(MAX(sequence_no), 0) + 1
    INTO v_billing_sequence
    FROM oks_stream_levels_b
    WHERE dnz_chr_id = x_chr_id
    AND cle_id = x_line_id;
    --Populating the stream line variables
    l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
    l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
    -- l_strm_level_tbl(v_billing_sequence).id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).uom_code := g_quarter_uom;
    l_strm_level_tbl(v_billing_sequence).uom_per_period := 1;
    l_strm_level_tbl(v_billing_sequence).level_periods := v_bill_qtrs;
    l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
    l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
    l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
    l_strm_level_tbl(v_billing_sequence).amount := v_amt/v_bill_qtrs;
    l_strm_level_tbl(v_billing_sequence).level_amount := v_amt/v_bill_qtrs;
    l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
    l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
    dbms_output.put_line('Before calling the Bill Sch API for QTR');
    OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
    p_strm_level_tbl=>l_strm_level_tbl,
    p_invoice_rule_id=>v_invoicing_rule_id,
    x_return_status=>x_return_status);
    dbms_output.put_line('After calling the Bill Sch API for QTR');
    IF x_return_status <> 'S' THEN
    x_msg_count := 1;
    dbms_output.put_line('Quarterly schedule creation error ' || x_msg_data);
    ---DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
    -- RETURN;
    END IF;
    END IF;
    IF v_bill_days > 0 THEN
    SELECT NVL(MAX(sequence_no), 0) + 1
    INTO v_billing_sequence
    FROM oks_stream_levels_b
    WHERE dnz_chr_id = x_chr_id
    AND cle_id = x_line_id;
    dbms_output.put_line('sequence '||v_billing_sequence);
    --Populating the stream line variables
    l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
    l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
    --l_strm_level_tbl(v_billing_sequence).id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).uom_code := g_day_uom;
    l_strm_level_tbl(v_billing_sequence).uom_per_period := v_bill_days;
    l_strm_level_tbl(v_billing_sequence).level_periods := 1;
    l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
    l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
    l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
    l_strm_level_tbl(v_billing_sequence).amount := v_net_amount;--v_amt_per_day*v_bill_days;
    l_strm_level_tbl(v_billing_sequence).level_amount := v_net_amount;--v_amt_per_day*v_bill_days;
    l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
    l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
    dbms_output.put_line('Before calling the Bill Sch API for QTR days');
    OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
    p_strm_level_tbl=>l_strm_level_tbl,
    p_invoice_rule_id=>v_invoicing_rule_id,
    x_return_status=>x_return_status);
    dbms_output.put_line('After calling the Bill Sch API for QTR days ' || v_bill_days || ' ' || x_return_status);
    IF x_return_status <> 'S' THEN
    x_msg_count := 1;
    dbms_output.put_line('Day schedule, for quarterly accounting rule, creation error ' || x_msg_data);
    --DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
    --RETURN;
    END IF;
    END IF;
    ELSE
    --Monthly billing schedule
    SELECT FLOOR(MONTHS_BETWEEN( v_end_date,
    v_start_date)),
    v_end_date - ADD_MONTHS(v_start_date, FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date)))
    INTO v_bill_mths,
    v_bill_days
    FROM dual;
    dbms_output.put_line('Calculated the mths and days');
    IF v_bill_mths > 0 THEN
    SELECT (ADD_MONTHS(v_start_date,FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date))) - v_start_date)*v_amt_per_day
    INTO v_amt
    FROM dual;
    dbms_output.put_line('Calculated the mths amt');
    SELECT NVL(MAX(sequence_no), 0) + 1
    INTO v_billing_sequence
    FROM oks_stream_levels_b
    WHERE dnz_chr_id = x_chr_id
    AND cle_id = x_line_id;
    --Populating the stream line variables
    l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
    l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
    --l_strm_level_tbl(v_billing_sequence).id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).uom_code := g_month_uom;
    l_strm_level_tbl(v_billing_sequence).uom_per_period := 1;
    l_strm_level_tbl(v_billing_sequence).level_periods := v_bill_mths;
    l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
    l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
    l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
    l_strm_level_tbl(v_billing_sequence).amount := v_amt/v_bill_mths;
    l_strm_level_tbl(v_billing_sequence).level_amount := v_amt/v_bill_mths;
    l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
    l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
    dbms_output.put_line('Before calling the Bill Sch API for MTHS');
    OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
    p_strm_level_tbl=>l_strm_level_tbl,
    p_invoice_rule_id=>v_invoicing_rule_id,
    x_return_status=>x_return_status);
    dbms_output.put_line('After calling the Bill Sch API for MTHS');
    IF x_return_status <> 'S' THEN
    x_msg_count := 1;
    dbms_output.put_line('Monthly schedule creation error ' || x_msg_data);
    --DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
    --RETURN;
    END IF;
    END IF;
    IF v_bill_days > 0 THEN
    SELECT NVL(MAX(sequence_no), 0) + 1
    INTO v_billing_sequence
    FROM oks_stream_levels_b
    WHERE dnz_chr_id = x_chr_id
    AND cle_id = x_line_id;
    --Populating the stream line variables
    l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
    l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
    --l_strm_level_tbl(v_billing_sequence).id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).uom_code := g_day_uom;
    l_strm_level_tbl(v_billing_sequence).uom_per_period := v_bill_days;
    l_strm_level_tbl(v_billing_sequence).level_periods := 1;
    l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
    l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
    l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
    l_strm_level_tbl(v_billing_sequence).amount := v_amt_per_day*v_bill_days;
    l_strm_level_tbl(v_billing_sequence).level_amount := v_amt_per_day*v_bill_days;
    l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
    l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
    dbms_output.put_line('Before calling the Bill Sch API for MTH days');
    OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
    p_strm_level_tbl=>l_strm_level_tbl,
    p_invoice_rule_id=>v_invoicing_rule_id,
    x_return_status=>x_return_status);
    dbms_output.put_line('After calling the Bill Sch API for MTH days');
    IF x_return_status <> 'S' THEN
    x_msg_count := 1;
    dbms_output.put_line('Day schedule, for monthly accounting rule, creation error ' || x_msg_data);
    --DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
    --RETURN;
    END IF;
    END IF;
    END IF;
    COMMIT;
    EXCEPTION
    when others then
    dbms_output.put_line('Error ' || sqlerrm);
    END;
    Thanks,
    Yash.

    Hi There,
    I have a similar requirement to create rental service contracts and create billing schedules.
    Can you please pass on your functional docs so that i can refer to them.
    Thanks,
    Raidu

Maybe you are looking for

  • Just restore a backup on a new apple imac and get error message 43 when trying to update creative cloud ... is there something to do to suppress the old imac and identify the new one ??

    I just move to a new imac following a crash. Is there something to do to suppress any trace from the old one in order to be able to install creative cloud on the new one ? I got an error when trying to update CC. Flo

  • AQ Adapter correlation

    Hi, Is there any parameter that gets automatically set at the BPEL process instance level when the process is activated by a AQ partnerlink (such as conversation ID , Instance ID) ? Is it possible to declaratively indicate one of the parameters to be

  • Mouse-over pic A to make pop up pic B ...

    Hi there! Could need a quick solution for this, cause my (too) limited HTML knowledge doesn't help a bit ... I have a permanent picture A which, while mouse-over, should make picture B pop up. A mouse-over at picture B area (which is again invisible

  • Oracle Classgenerator error..help!

    Hi ! I am using classgen version 1.0.1.0.0 and xmlparser version 2.0.0.1.0.... everythings in the CLASSPATH... I could compile the SampleMain.java in the classgen/samples directory . But when i run it with any dtd or the provided widl.dtd i get the f

  • Flows of sap

    hi every plz send me all these modules  (inter link , linked tables if possible all linked fields, standard reports )and each module flows modules are listed below MM, SD, QM, PP, PM, FICO  if it usefull reward 10 points and i am waiting for u r repl