PO Final Close not releasing funds

In 11.5.9; if we final close a PO using standard "po_actions.close_po" procedure, the PO used to get Finally Closed and corresponding Funds get released.
However, the same does not work in 11.5.10.
I would be glad if anyone can help me in this regard. Please note that we are using encumbrance feature; hence it is a very critical issue.
Thanks,
M. Geethanath
[email protected]

Final close will close once for all, you cannot make any transaction. If it's closed then you can make the transactions.
Srini C

Similar Messages

  • PO when Finally Closed not releasing funds

    In 11.5.9; if we final close a PO using standard "po_actions.close_po" procedure, the PO used to get Finally Closed and corresponding Funds get released.
    However, the same does not work in 11.5.10.
    I would be glad if anyone can help me in this regard. Please note that we are using encumbrance feature; hence it is a very critical issue.
    Thanks,
    M. Geethanath
    [email protected]

    In 11.5.10 PO Final Close process works well only when we invoke PO_ACTIONS.CLOSE_PO procedure by passing PO Header-ID, Line-ID and Line Location-ID.
    It is because of below code:
    PO_DOCUMENT_FUNDS_PVT.do_final_close(
    x_return_status => l_return_status
    , p_doc_type => p_doctyp
    , p_doc_subtype => p_docsubtyp
    , p_doc_level => PO_DOCUMENT_FUNDS_PVT.g_doc_level_SHIPMENT
    , p_doc_level_id => p_shipid
    , p_use_enc_gt_flag => PO_DOCUMENT_FUNDS_PVT.g_parameter_NO
    , p_use_gl_date => PO_DOCUMENT_FUNDS_PVT.g_parameter_NO
    , p_override_date => p_action_date
    , p_invoice_id => p_origin_doc_id
    , x_po_return_code => l_return_code
    , x_online_report_id => l_online_report_id
    If the above call was to decide on Document Level based on the values held by below variables, it would have been more appropriate.
    p_docid (PO Header ID)
    p_lineid (PO Line-ID)
    p_shipid (PO Line Location-ID)
    Example:
    IF p_shipid IS NOT NULL THEN
    PO_DOCUMENT_FUNDS_PVT.do_final_close(
    x_return_status => l_return_status
    , p_doc_type => p_doctyp
    , p_doc_subtype => p_docsubtyp
    , p_doc_level => PO_DOCUMENT_FUNDS_PVT.g_doc_level_SHIPMENT
    , p_doc_level_id => p_shipid
    , p_use_enc_gt_flag => PO_DOCUMENT_FUNDS_PVT.g_parameter_NO
    , p_use_gl_date => PO_DOCUMENT_FUNDS_PVT.g_parameter_NO
    , p_override_date => p_action_date
    , p_invoice_id => p_origin_doc_id
    , x_po_return_code => l_return_code
    , x_online_report_id => l_online_report_id
    ELSIF p_lineid IS NOT NULL THEN
    PO_DOCUMENT_FUNDS_PVT.do_final_close(
    x_return_status => l_return_status
    , p_doc_type => p_doctyp
    , p_doc_subtype => p_docsubtyp
    , p_doc_level => PO_DOCUMENT_FUNDS_PVT.g_doc_level_LINE
    , p_doc_level_id => p_lineid
    , p_use_enc_gt_flag => PO_DOCUMENT_FUNDS_PVT.g_parameter_NO
    , p_use_gl_date => PO_DOCUMENT_FUNDS_PVT.g_parameter_NO
    , p_override_date => p_action_date
    , p_invoice_id => p_origin_doc_id
    , x_po_return_code => l_return_code
    , x_online_report_id => l_online_report_id
    ELSIF p_docid IS NOT NULL THEN
    PO_DOCUMENT_FUNDS_PVT.do_final_close(
    x_return_status => l_return_status
    , p_doc_type => p_doctyp
    , p_doc_subtype => p_docsubtyp
    , p_doc_level => PO_DOCUMENT_FUNDS_PVT.g_doc_level_HEADER
    , p_doc_level_id => p_docid
    , p_use_enc_gt_flag => PO_DOCUMENT_FUNDS_PVT.g_parameter_NO
    , p_use_gl_date => PO_DOCUMENT_FUNDS_PVT.g_parameter_NO
    , p_override_date => p_action_date
    , p_invoice_id => p_origin_doc_id
    , x_po_return_code => l_return_code
    , x_online_report_id => l_online_report_id
    END IF;
    Anyways, it is not categorized as a Public API; so, no comments…
    Please find below sample procedure that can be re-used.
    PROCEDURE fclose_po (
    p_po_header_id NUMBER,
    p_po_line_id NUMBER DEFAULT NULL,
    p_reason VARCHAR2,
    p_close_date DATE
    IS
    CURSOR c_shipments
    IS
    SELECT po_header_id, po_line_id, line_location_id
    FROM po_line_locations_all
    WHERE po_header_id = p_po_header_id
    AND po_line_id = NVL (p_po_line_id, po_line_id);
    BEGIN
    FOR c1 IN c_shipments
    LOOP
    IF (NOT (po_actions.close_po (p_docid => p_po_header_id,
    p_doctyp => 'PO',
    p_docsubtyp => 'STANDARD',
    p_lineid => c1.po_line_id,
    p_shipid => c1.line_location_id,
    p_action => 'FINALLY CLOSE',
    p_reason => p_reason,
    p_calling_mode => 'PO',
    p_conc_flag => 'N',
    p_return_code => v_return_code,
    p_auto_close => 'N',
    p_action_date => p_close_date,
    p_origin_doc_id => NULL
    THEN
    l_status := 'ERROR';
    ELSE
    l_status := 'SUCCESS';
    END IF;
    END LOOP;
    END fclose_po;

  • PO when Finally Closed does not release funds

    In 11.5.9; if we final close a PO using standard "po_actions.close_po" procedure, the PO used to get Finally Closed and corresponding Funds get released.
    However, the same does not work in 11.5.10.
    I would be glad if anyone can help me in this regard. Please note that we are using encumbrance feature; hence it is a very critical issue.
    Thanks,
    M. Geethanath
    [email protected]

    In 11.5.9; if we final close a PO using standard "po_actions.close_po" procedure, the PO used to get Finally Closed and corresponding Funds get released.
    However, the same does not work in 11.5.10.
    I would be glad if anyone can help me in this regard. Please note that we are using encumbrance feature; hence it is a very critical issue.
    Thanks,
    M. Geethanath
    [email protected]

  • Final Invoice not releasing purchase order commitments

    Hi Experts,
    We recently upgraded from 4.6C to ECC6 and have had reports of commitments not longer being released when the Final Invoice is flagged on Service purchase orders.  This is causing many issues since they can no longer flag the last service entry as "Final" because the invoice has already paid.
    Out User's have become dependent on this process so please help.  I have looked in OSS but cannot find anything referring to this issue.
    Any help is greatly appreciated.
    Thank you in advance,
    Stella Cook
    Tesoro Companies Inc.

    Hi Kiran,
    I think that there is some user exit getting called in place where you have issues. Ideally the final invoice should never check the order as the order can be in teco during invoicing.
    I suggest you to debug it using your ABAPer as the signs are of some code inconsistency. The results are different when you directly click the final invoice and click after once seeing the account assignment,
    Regards
    Vivek Singh

  • Any Oracle API to Finally Close, Freeze, Unfreeze and Hold POs or Releases.

    I know there is PO_ACTIONS.CLOSE_PO API which allow us to close the PO. We need to Finally Close, Freeze, Unfreeze and HOLD Pos/Releases.
    Does anyone know the Oracle API which can do this jobs.
    Thanks in Advance.

    PO_CLOSE API alowed me to finally close the PO.
    Here is the script if anybody interested,
    v_result := PO_ACTIONS.CLOSE_PO(
    P_DOCID => v_header_id,
    P_DOCTYP => 'PO',
    P_DOCSUBTYP => 'STANDARD',
    P_LINEID => NULL,
    P_SHIPID => NULL,
    --P_ACTION => 'CLOSE',
    P_ACTION => 'FINALLY CLOSE',
    P_REASON => 'ONP FINALLY CLOSE Request : ' || to_char(v_request_id),
    P_CALLING_MODE => 'PO',
    P_CONC_FLAG => 'N',
    P_RETURN_CODE => v_return_code,
    P_AUTO_CLOSE => 'N',
    P_ACTION_DATE => sysdate,
    P_ORIGIN_DOC_ID => NULL );
    I am going to update the tables directly for HOLD/Freeze and Unfreeze action.

  • When I close CAcroPDDoc, Why acrobat.exe NOT release resource?

    Hi everybody.
    I use CAcroPDDoc to open many PDFs, and read its page number.
    Everytime I got the page number, I was close the CAcroPDDoc.
    But acrobat.exe did not release resource. At last error happened!
    What can I do?
    CODE:
    long CWorker::GetPagenum(CString strPDF)
    long lNum;
    CAcroPDDoc *pPDdoc=new CAcroPDDoc;
    pPDdoc->CreateDispatch("AcroExch.PDDoc");
    pPDdoc->Open((_bstr_t)strPDF);
    lNum=pPDdoc->GetNumPages();
    pPDdoc->Close();
    delete pPDdoc;
    return lNum;

    Acrobat will release the document usually about 30 seconds after you ask it to...

  • Unable to finally close blanket purchase agreement

    Hello,
    I am unable to final close the blanket agreement due to error: "Open releases exist against the purchase document." I checked and all the releases status are closed, the amount billed matched amount received. Does anyone know how to fix this? I researched on METALINK and it doesn't help much.
    Thanks.

    Hi,
    I understand, the current system functionality does not support the feature that you are looking for:
    The following ER's have been filed for this issue:
    Bug 5065862: PDOI DOES NOT UPDATE PRICE BREAKS ON BLANKET WITH EFFECTIVE DATES
    Bug 5246003: ALLOW PDOI TO UPDATE PRICE BREAKS ON BLANKET PURHCASE AGREEMENT
    Bug 7285119: UPDATING BPA THROUGH PDOI, NEED TO BE ABLE TO UPDATE PRICE BREAK INFO
    Bug 7219129: DATAFIX:UPDATING BPA THROUGH PDOI, NEED TO BE ABLE TO UPDATE PRICE BREAK INFO
    Regards,
    Paarthy

  • Crystal Report Viewer Not Releasing Oracle Database Connections

    I have a very simple vb.net 3.5 web application that uses the Crystal Report viewer 2008 to open a report. My requirements are as follows:
    1. Reports are built by another company and provided to us and used in a web environment
    2. All reports contain parameter fields
    3. The web application must be generic enough that a report can be added to a list and the user simply selects the report and provides database login information. The Crystal report viewer with handle the request for parameter values and prompt the user for their values.
    4. All reports connect to an Oracle 10g server.
    The above requirements have been meet and we have an extremely simple web application that runs the reports. It is working very well other than the crystal report viewer is not releasing the database connections. This is bad because the credentials are on a per user basis and that same user must login to a different oracle application simultaneously. They are being denied access because the credentials are already in use. We do not have control nor influence over the policies in use on the Oracle server. Ideally we would like to control the Crystal Report viewer so that it closes connections after use.
    The web application code is:
    Private Sub viewReports_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
    If Not IsPostBack Then
    ConfigureCrystalReport()
    End If
    End Sub
    Private Sub ConfigureCrystalReport()
    'Load the Crystal Report viewer with a report.
    Try
    Dim reportPath As String = Server.MapPath(Session("reportname"))
    crViewer.ReportSource = reportPath
    Catch ex As Exception
    Response.Write(Server.MapPath(Session("reportname")) & "
    " & ex.Message.ToString & "
    " & ex.StackTrace.ToString)
    End Try
    End Sub
    Can anyone shed some light on this topic? Thank you

    Hello, Timothy;
    By default, having the report in session will hold it open for 20 minutes.
    If you create the report as a ReportDocument object you can take it out of session and release it more efficiently. That will release the connection.
        Private Sub ConfigureCrystalReports()
            If (Session("hierarchicalGroupingReport") Is Nothing) Then
                hierarchicalGroupingReport = New ReportDocument()
                hierarchicalGroupingReport.Load(Server.MapPath("Hierarchical Grouping.rpt"))
                Session("hierarchicalGroupingReport") = hierarchicalGroupingReport
            Else
                hierarchicalGroupingReport = CType(Session("hierarchicalGroupingReport"), ReportDocument)
            End If
            myCrystalReportViewer.ReportSource = hierarchicalGroupingReport
        End Sub
    In the Form Unload of the Viewer:
                'Take the report out of session
                Session("hierarchicalGroupingReport")  = Nothing
                Session.Contents.Remove("hierarchicalGroupingReport")
                'Clean up the ReportDocument object
                hierarchicalGroupingReport.Close
                hierarchicalGroupingReport.Dispose()
                hierarchicalGroupingReport = Nothing
                GC.Collect()
    Elaine

  • Sending an email from Lotus Notes release 5.0.4a

    I need to write java code for sending an email from Lotus Notes release 5.0.4a.
    Initially, I tried using Lotus Domino Toolkit for java, but the current release, "Lotus Domino ToolKit for Java/Corba release 5.0.8" is not compatible with the notes client/server we are using(5.0.4a).
    Now, I am trying to use "Lotus Domino Toolkit 2.1" which supports notes version 5.0.3 and higher, but I couldnot find out how to use it to send email.
    Is there are other way in which we can connect to Lotus Notes for sending email. I cannot use SMTP as the Lotus Notes administrator is afraid of security issues so there is no possibility that I can connect to Domino server using java mail API by enabling SMTP on the Domino server.
    I would be thankful if somebody can help me to do this.

    First off - This is very "off topic"
    The Domino SMTP server is not hard to lock down. Any Notes Admin worth his/her salt should know how to do it. Try to persuade them to run the SMTP stuff using name and password authentication only, or restrict access to an IP address range. This is all easy stuff.
    Otherwise DIIOP/CORBA is one way to go. If your toolkit jar files don't work with the server then try using the ones on the server. Look in %noteshome%\data\domino\java for the ncso.jar file.
    This works for me on an AS/400 java VM to WinNT/Linux Domino servers of various versions.
    How to create an email using this method is again not difficult. All you really need is a blank database template. You have to create a document with certain fields in it (all documented) and then save it. That's all there is to it.
    Word of warning DIIOP is not very rapid and careless coding can create problems. Ensure that once you have finished a session you make sure you close it else you will have continual connection problems.
    Try searching around the domino/notes groups on how to actually do this.
    SH

  • Problem with file descriptors not released by JMF

    Hi,
    I have a problem with file descriptors not released by JMF. My application opens a video file, creates a DataSource and a DataProcessor and the video frames generated are transmitted using the RTP protocol. Once video transmission ends up, if we stop and close the DataProcessor associated to the DataSource, the file descriptor identifying the video file is not released (checkable through /proc/pid/fd). If we repeat this processing once and again, the process reaches the maximum number of file descriptors allowed by the operating system.
    The same problem has been reproduced with JMF-2.1.1e-Linux in several environments:
    - Red Hat 7.3, Fedora Core 4
    - jdk1.5.0_04, j2re1.4.2, j2sdk1.4.2, Blackdown Java
    This is part of the source code:
    // video.avi with tracks audio(PCMU) and video(H263)
    String url="video.avi";
    if ((ml = new MediaLocator(url)) == null) {
    Logger.log(ambito,refTrazas+"Cannot build media locator from: " + url);
    try {
    // Create a DataSource given the media locator.
    Logger.log(ambito,refTrazas+"Creating JMF data source");
    try
    ds = Manager.createDataSource(ml);
    catch (Exception e) {
    Logger.log(ambito,refTrazas+"Cannot create DataSource from: " + ml);
    return 1;
    p = Manager.createProcessor(ds);
    } catch (Exception e) {
    Logger.log(ambito,refTrazas+"Failed to create a processor from the given url: " + e);
    return 1;
    } // end try-catch
    p.addControllerListener(this);
    Logger.log(ambito,refTrazas+"Configure Processor.");
    // Put the Processor into configured state.
    p.configure();
    if (!waitForState(p.Configured))
    Logger.log(ambito,refTrazas+"Failed to configure the processor.");
    p.close();
    p=null;
    return 1;
    Logger.log(ambito,refTrazas+"Configured Processor OK.");
    // So I can use it as a player.
    p.setContentDescriptor(new FileTypeDescriptor(FileTypeDescriptor.RAW_RTP));
    // videoTrack: track control for the video track
    DrawFrame draw= new DrawFrame(this);
    // Instantiate and set the frame access codec to the data flow path.
    try {
    Codec codec[] = {
    draw,
    new com.sun.media.codec.video.colorspace.JavaRGBToYUV(),
    new com.ibm.media.codec.video.h263.NativeEncoder()};
    videoTrack.setCodecChain(codec);
    } catch (UnsupportedPlugInException e) {
    Logger.log(ambito,refTrazas+"The processor does not support effects.");
    } // end try-catch CodecChain creation
    p.realize();
    if (!waitForState(p.Realized))
    Logger.log(ambito,refTrazas+"Failed to realize the processor.");
    return 1;
    Logger.log(ambito,refTrazas+"realized processor OK.");
    /* After realize processor: THESE LINES OF SOURCE CODE DOES NOT RELEASE ITS FILE DESCRIPTOR !!!!!
    p.stop();
    p.deallocate();
    p.close();
    return 0;
    // It continues up to the end of the transmission, properly drawing each video frame and transmit them
    Logger.log(ambito,refTrazas+" Create Transmit.");
    try {
    int result = createTransmitter();
    } catch (Exception e) {
    Logger.log(ambito,refTrazas+"Error Create Transmitter.");
    return 1;
    } // end try-catch transmitter
    Logger.log(ambito,refTrazas+"Start Procesor.");
    // Start the processor.
    p.start();
    return 0;
    } // end of main code
    * stop when event "EndOfMediaEvent"
    public int stop () {
    try {   
    /* THIS PIECE OF CODE AND VARIATIONS HAVE BEEN TESTED
    AND THE FILE DESCRIPTOR IS NEVER RELEASED */
    p.stop();
    p.deallocate();
    p.close();
    p= null;
    for (int i = 0; i < rtpMgrs.length; i++)
    if (rtpMgrs==null) continue;
    Logger.log(ambito, refTrazas + "removeTargets;");
    rtpMgrs[i].removeTargets( "Session ended.");
    rtpMgrs[i].dispose();
    rtpMgrs[i]=null;
    } catch (Exception e) {
    Logger.log(ambito,refTrazas+"Error Stoping:"+e);
    return 1;
    return 0;
    } // end of stop()
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt) {
    Logger.log(ambito,refTrazas+"\nControllerEvent."+evt.toString());
    if (evt instanceof ConfigureCompleteEvent ||
    evt instanceof RealizeCompleteEvent ||
    evt instanceof PrefetchCompleteEvent) {
    synchronized (waitSync) {
    stateTransitionOK = true;
    waitSync.notifyAll();
    } else if (evt instanceof ResourceUnavailableEvent) {
    synchronized (waitSync) {
    stateTransitionOK = false;
    waitSync.notifyAll();
    } else if (evt instanceof EndOfMediaEvent) {
    Logger.log(ambito,refTrazas+"\nEvento EndOfMediaEvent.");
    this.stop();
    else if (evt instanceof ControllerClosedEvent)
    Logger.log(ambito,refTrazas+"\nEvent ControllerClosedEvent");
    close = true;
    waitSync.notifyAll();
    else if (evt instanceof StopByRequestEvent)
    Logger.log(ambito,refTrazas+"\nEvent StopByRequestEvent");
    stop =true;
    waitSync.notifyAll();
    Many thanks.

    Its a bug on H263, if you test it without h263 track or with other video codec, the release will be ok.
    You can try to use a not-Sun h263 codec like the one from fobs or jffmpeg projects.

  • XML,CLOB  AND MEMORY : CONSUMED BUT NOT RELEASED !!!

    Hi,
    I'm working with XMLGEN Package and XSLT Processor to produce XML Document on Oracle 8.1.7.3 server, I use 9i XML and Java packages.
    I'm facing the following BIG MEMORY problem :
    Environment : I must generate an XML parsed with an XSL document of 80Mo (nearly 22 000 rows),
    as XMLGEN is on DOM parsing method, I extract my XML by 500 Rows and I loop until 22 000 rows. I use DBMS_JOB with jobs who read and execute export each minute.
    The algorithme is :
    keeprow=22000
    while keeprow>0
    Create 3 clob (DBMS_LOB Package) : one for XSL Sheet, one for XML and one for result
    GetXML (XMLGEN Package)
    Transform in XSL (XSL Processor)
    Write to disk (UTL_FILE Package)
    Free the 3 Clob ((DBMS_LOB Package))
    keeprow =keeprow-500
    loop
    The problem : The process start at 250Mo ot total memory and END at 1000 Mo of used memory and NEVER RELEASE 1 ko of memory.
    So often I get a JavaOutOfMemoryError (I've allocated 1Go Ram to my JAVA process).
    Any help will be very very appreciated !
    My derived problem is 22 000 rows is not enough I've some export of 200 000 rows to do (And I cannot allocate 10 Go of RAM !!!)
    Following My PL/SQL Code.
    Regards
    Fred
         PROCEDURE DO_EXPORT_XML(
                   P_JOB_ID JOB_PARAMETRE.JOB_ID%TYPE,
                   P_JOB_ID_ORDRE JOB_PARAMETRE.JOB_ID_ORDRE%TYPE,
                   P_CLE_UP UPLOADREQ_TEMP.ID%TYPE,
                   P_LOAD_OR_DELOAD VARCHAR2)
              IS
              L_FILE_NAME JOB_PARAMETRE.JOB_FILE_NAME_DEST%TYPE;
              L_REP_NAME JOB_PARAMETRE.JOB_REP_NAME_DEST%TYPE;
              L_FILE_STYLESHEET JOB_PARAMETRE.JOB_STYLESHEET%TYPE;
              L_VERSION_PDM JOB_PARAMETRE.JOB_VPDM%TYPE;
              P_SELECT varchar2(4000):='';
              P_CURSOR varchar2(4000):='';
         l_filehandler_out UTL_FILE.FILE_TYPE;
              --Variable pour le traitement par lot de 500
              L_NBROW_TODO_ATONCE number := 500;
              L_NBROW_MIN number := 1;
              L_NBROW_MAX number := -1;
              L_NBROWKEEPTODO number := -1;
              xslString CLOB := null;
              res number default -1;
              xmlString CLOB := null;
              li_ret number := 0;
              li_faitle number := 0;
              amount integer:= 255;
              li_loop integer := 0;
              charString varchar2(255);
              ls_deload varchar2(255) default '';
              ls_SQL varchar2(4000) default '';
              ls_temp_file varchar2(255) default '';
              text_file_dir varchar2(32) := 'e:\temporarydir';
              l_par xmlparser.parser;
         l_xml xmldom.domdocument;
         l_pro xslprocessor.processor;
         l_xsl xslprocessor.stylesheet;
              docfragnode xmldom.DOMNode;
              docfrag xmldom.DOMDocumentFragment;
              l_parsedclob clob := null;
              l_amount binary_integer := 32767;
              l_ligne varchar2(32767);
              l_offset number default 1;
              l_pos number default null;
              l_pos2 number default null;
              l_lobsize number default null;
              l_memsize number default 1073741824; --1024 Mo
              l_mempipo number default 0;
              type rc is ref cursor;
              l_cursor rc;
              cursor TEMPLATE is select UNSPSC,1 as NB from UPLOADREQ_TEMP where 1=2;
              c1rec TEMPLATE%rowtype;          
              BEGIN
              l_mempipo:=setmaxmemorysize(l_memsize);
              dbms_lob.createtemporary(l_parsedclob, true, dbms_lob.session);
              dbms_lob.createtemporary(xmlstring, true, dbms_lob.session);
              --return the good select
              GET_SELECT_TO_EXPORT_XML(P_JOB_ID , P_JOB_ID_ORDRE , P_CLE_UP , P_SELECT,P_CURSOR, P_LOAD_OR_DELOAD);
                        SELECT JOB_FILE_NAME_DEST,JOB_REP_NAME_DEST,JOB_STYLESHEET
                        INTO L_FILE_NAME,L_REP_NAME,L_FILE_STYLESHEET
                        FROM JOB_PARAMETRE
                        WHERE JOB_ID =P_JOB_ID AND JOB_ID_ORDRE=P_JOB_ID_ORDRE;
                        l_filehandler_out := UTL_FILE.FOPEN(text_file_dir, L_FILE_NAME, 'w',l_amount);
                        --Return XSL Sheet in a clob : cause of memory consumed  but not released
                   xslString := METACAT.load_a_file( 1,L_FILE_STYLESHEET);     
                        open l_cursor for P_CURSOR;
    LOOP
                   fetch l_cursor into c1rec;
                   exit when l_cursor%notfound;
                             L_NBROW_MIN := 1;
                             L_NBROW_MAX := 0;
                             L_NBROWKEEPTODO:=c1rec.NB;
                             LOOP
                             begin
                                  if(L_NBROWKEEPTODO > L_NBROW_TODO_ATONCE) THEN
                                       begin
                                       L_NBROW_MAX:= L_NBROW_TODO_ATONCE + L_NBROW_MAX;
                                       L_NBROWKEEPTODO:= L_NBROWKEEPTODO - L_NBROW_TODO_ATONCE;
                                       end;
                                  else
                                       begin
                                       L_NBROW_MAX:= L_NBROW_MAX + L_NBROWKEEPTODO;
                                       L_NBROWKEEPTODO:=0;
                                       end;
                                  end if;
                                  --on ouvre le fichier de risultats
                                  ls_SQL:= P_SELECT || ' AND ( ROWNUM BETWEEN ' || L_NBROW_MIN || ' AND ' || L_NBROW_MAX || ' ) and UNSPSC=''' || c1rec.UNSPSC || '''';
                                  ls_temp_file := c1rec.UNSPSC || '_' || L_FILE_NAME;
                                  L_NBROW_MIN:=L_NBROW_TODO_ATONCE + L_NBROW_MIN;
                                  --CAT_AUTOLOAD.JOB_ADD_TRACE (P_JOB_ID,'UPLOAD REQUISITE : Export donnies REQUETE ' || to_char(li_loop), ls_SQL,'',0,0);
                                  xmlgen.resetOptions;
                                  xmlgen.setErrorTag('ERROR_RESULT');
                                  xmlgen.setRowIdAttrName('NAH');
                                  xmlgen.setRowIdColumn('NAH');
                                  xmlgen.setEncodingTag('ISO-8859-1');
                                  xmlgen.useNullAttributeIndicator(false);
                                  if(xmlString is not null) then
                                       dbms_lob.open(xmlString,dbms_lob.lob_readwrite);
                                       l_lobsize:= dbms_lob.Getlength(xmlString);
                                       if(l_lobsize>0) then
                                       dbms_lob.erase(xmlString,l_lobsize,1);
                                       end if;
                                       dbms_lob.close(xmlString);
                                  dbms_lob.freetemporary(xmlString);
                                       dbms_lob.createtemporary(xmlstring, true, dbms_lob.session);
                                  end if;
    --Return XML in a clob : cause of memory consumed  but not released
                                  xmlString := xmlgen.getXML(ls_SQL,0);
                                  l_par := xmlparser.newparser;
                                  xmlparser.parseclob(l_par, xslString);
                                  l_xsl := xslprocessor.newstylesheet(xmlparser.getdocument(l_par),null);
                                  xmlparser.parseclob(l_par, xmlString);
                                  l_xml := xmlparser.getdocument(l_par);
                                  l_pro := xslprocessor.newprocessor;
                                       xslprocessor.showWarnings(l_pro, true);
                                       xslprocessor.setErrorLog(l_pro, text_file_dir || substr(ls_temp_file,0,length(ls_temp_file)-4) || '_logerreur.XML');
                                       if(l_parsedclob is not null) then
                                                 dbms_lob.open(l_parsedclob,dbms_lob.lob_readwrite);
                                                 l_lobsize:= dbms_lob.Getlength(l_parsedclob);
                                                 if(l_lobsize>0) then
                                                 dbms_lob.erase(l_parsedclob,l_lobsize,1);
                                                 end if;
                                                 dbms_lob.close(l_parsedclob);
                                            dbms_lob.freetemporary(l_parsedclob);
                                                 dbms_lob.createtemporary(l_parsedclob, true, dbms_lob.session);
                                       end if;
                        --Return XML Processed with XSL in a clob : cause of memory consumed  but not released
                                  xslprocessor.processxsl(l_pro,l_xsl,l_xml,l_parsedclob);
                                       --release NOTHING
                                  xmlparser.freeparser(l_par);
                                  xslprocessor.freeprocessor(l_pro);
                                                      l_ligne:='';
                                                      l_offset :=1;
                                                      l_pos := null;
                                                      l_pos2 := null;
                                                      if(li_loop=0) then
                                                           begin
                                                                --on ouvre le fichier et on sauve l'entete + les donnies dedans.
                                                                     l_pos:=dbms_lob.instr(l_parsedclob,'</DATA>');
                                                      if ( nvl(l_pos,0) > 0 ) then
                                                                          loop
                                                                          if(l_pos-1>l_amount + l_offset ) then
                                                                                    l_ligne:=dbms_lob.SUBSTR(l_parsedclob,l_amount,l_offset);
                                                                                    UTL_FILE.PUT(l_filehandler_out,l_ligne);
                                                                                    UTL_FILE.fflush(l_filehandler_out);
                                                                                    l_offset:=l_offset+l_amount;
                                                                               else
                                                                                    l_ligne:=dbms_lob.SUBSTR(l_parsedclob,l_pos-1 -l_offset ,l_offset);
                                                                                    UTL_FILE.PUT(l_filehandler_out,l_ligne);
                                                                                    UTL_FILE.fflush(l_filehandler_out);
                                                                                    exit;
                                                                               end if;
                                                                          end loop;
                                                                     else
                                                                          EXIT;
                                                                     end if;
                                                           end;
                                                      else
                                                           --on met les donnies donc on ne repete pas le debut
                                                           begin
                                                                     l_pos:=dbms_lob.instr(l_parsedclob,'<ITEM');
                                                      if ( nvl(l_pos,0) > 0 ) then
                                                                     l_pos2:=dbms_lob.instr(l_parsedclob,'</DATA>');
                                                      if ( nvl(l_pos2,0) > 0 ) then
                                                                          loop
                                                                          if(l_pos + l_amount <= l_pos2 -1 ) then
                                                                                    l_ligne:=dbms_lob.SUBSTR(l_parsedclob,l_amount,l_pos);
                                                                                    UTL_FILE.PUT(l_filehandler_out,l_ligne);
                                                                                    UTL_FILE.fflush(l_filehandler_out);
                                                                                    l_pos:=l_pos +l_amount;
                                                                               else
                                                                                    l_ligne:=dbms_lob.SUBSTR(l_parsedclob,l_pos2 -1 -l_pos,l_pos);
                                                                                    UTL_FILE.PUT(l_filehandler_out,l_ligne);
                                                                                    UTL_FILE.fflush(l_filehandler_out);
                                                                                    exit;
                                                                               end if;
                                                                          end loop;
                                                                          else
                                                                          exit;                                                                      
                                                                          end if;
                                                                     end if;
                                                           end;
                                                      end if;
                                                 li_loop:=li_loop + 1 ;
                                                 --UTL_FILE.FCLOSE(l_filehandler_in);
                                                 JAVA_GC();
                                                 EXIT WHEN L_NBROWKEEPTODO=0;
                                                 Exception
                                                 when others then
                                                      begin
                                                      -- IF(utl_file.is_open(l_filehandler_in)) THEN
                                                      --               utl_file.fclose( l_filehandler_in);
                                                      -- END IF;
                                                      IF(utl_file.is_open(l_filehandler_out)) THEN
                                                                     utl_file.fclose( l_filehandler_out);
                                                      END IF;
                                                      RAISE_APPLICATION_ERROR(-20001,'File with errors');
                                                      end;
                             END;
                             END LOOP;
    END LOOP;
    CLOSE l_cursor;
                        if ( xmlString is not null ) then
                                  dbms_lob.open(xmlString,dbms_lob.lob_readwrite);
                                  l_lobsize:= dbms_lob.Getlength(xmlString);
                                  if(l_lobsize>0) then
                                  dbms_lob.erase(xmlString,l_lobsize,1);
                                  end if;
                                  dbms_lob.close(xmlString);
                                  dbms_lob.freeTemporary( xmlString);
                        end if;
                        if(l_parsedclob is not null) then
                                  dbms_lob.open(l_parsedclob,dbms_lob.lob_readwrite);
                                  l_lobsize:= dbms_lob.Getlength(l_parsedclob);
                                  if(l_lobsize>0) then
                                       dbms_lob.erase(l_parsedclob,l_lobsize,1);
                                  end if;
                                  dbms_lob.close(l_parsedclob);
                                  dbms_lob.freetemporary(l_parsedclob);
                        end if;
                        UTL_FILE.NEW_LINE(l_filehandler_out);
                        l_ligne:='</DATA></CATALOG>';
                        UTL_FILE.PUT(l_filehandler_out,l_ligne);
                        UTL_FILE.FCLOSE(l_filehandler_out);                    
                   EXCEPTION
                   when others then
                             begin
                             IF(utl_file.is_open(l_filehandler_out)) THEN
                                       utl_file.fclose( l_filehandler_out);
                                  END IF;
                             end;     
              END;
    ******************************

    Thank you for the info - I had no idea I was puing myself in danger by cutting it so close.  Since your post I have moved my iphoto library to an external drive and now have 165 GB of space on my HD.  Following this I have 2 questions.
    1.  Since my available HD space was reduced by the size of the photo download it seems logical that the download is somewhere on my HD still.  Is there a place where these photos might be hiding on my HD even though they are not available on the iphoto library?
    2.  I was able to recover the .jpg files which are fine.  I also recovered the .mov files but they have been compromised.  I am hoping I can find the originals still on the HD somewhere.  If not, do you have any suggestions for recovery methods or programs?  I have not used the SD card since the incident so I should be able to attempt another recovery to salvage the .mov files if there is an alternative method/program available.
    Thanks again!

  • BadPaddingException: Given final block not propertly padded -- Help Please

    I keep getting --Exception in thread "main" javax.crypto.BadPaddingException: Given final block not properly padded.       
    I know the problem lies with me writing to the encrypted text file or at some point when I'm actually reading it. Here's the code of these points......
    ciph.init(Cipher.ENCRYPT_MODE, skeySpec);
    /* The encryption begins */
    byte[] textBytesEncrypted = ciph.doFinal(textBytes);
    String bText = Base64.encodeBytes(textBytesEncrypted);
    // pw is a PrintWriter, I've also tried to use a FileOutputStream object
    // and write the entire byte array to a data file (without converting to
    // a String -- but that also resulted with the same exception being
    // thrown
    pw.write(bText);
    pw.close();
    public void decryptFile()
    throws IOException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException,
    IllegalBlockSizeException, BadPaddingException
    /* These lines will be writing and reading to the files */
    FileInputStream in = new FileInputStream(new File("C://outfile.txt"));
    PrintWriter pw = new PrintWriter(new File("C://outfile3.txt"));
    boolean done = false;
    int i = 0;
    ArrayList<Byte> bytearr = new ArrayList<Byte>();
    /* This loop places each of the bytes into an Array List, I'm using this because of the
    automatic resizing */
    while(!done)
    int next = in.read();
    if(next == -1) done = true;
    else{
    bytearr.add(i, (byte)next);
    i++;
    /* This variable retrieves the size of the array list in which the array will be set to */
    int length = bytearr.size();
    byte[] textBytes = new byte[length];
    /* This loop will move the Array List of bytes into the above array of bytes for future use */
    for(int j=0; j<length; j++)
    textBytes[j] = bytearr.get(j);
    ciph.init(Cipher.DECRYPT_MODE, skeySpec);
    /* The encryption begins */
    byte[] textBytesEncrypted = ciph.doFinal(textBytes);
    String text= new String(textBytesEncrypted);
    pw.write(text);
    in.close();
    pw.close();
    Any help would be greatly appreciated.

    You have not really supplied enough code to say exactly what is wrong BUT I would bet it is because you are treating files as containing chars and lines instead of just bytes.
    My suggestion - read the input files as bytes and encrypt/decrypt using CipherInputStream.

  • Finally close PO

    Hi All,
    When I am trying to do a finally close a PO I am getting the following error:
    Error: Line #1 Shipment #1 Distribution #1 Quantity received 10.681062 is not fully delivered .9000004
    Error: Line #2 Shipment #1 Distribution #1 Quantity received 9.72013333 is not fully delivered .9300007
    Error: Line #4 Shipment #1 Distribution #1 Quantity received 10.875412 is not fully delivered .9200002
    Error: Line #5 Shipment #1 Distribution #1 Quantity received 12.5396663333333 is not fully delivered 0
    Error: Line #6 Shipment #1 Distribution #1 Quantity received 6.1693 is not fully delivered .7431167
    Error: Line #7 Shipment #1 Distribution #1 Quantity received 9.34212 is not fully delivered .8875
    Please help me in closing the PO as a finally close.
    Thanks in advance,
    Pramod

    Based on the error, the qty is received but not yet delivered. Do the deliver transaction for the remaining qty.
    Edited by: pskumar on Apr 16, 2013 9:04 PM

  • Memory not released on disconnections

    Hi,
    We are developing a pro*C++ application to connect to an Oracle 8i database running in Windows 2000 . The application will run in HP-UX. When the application try to connect to the database, either the connection fails or successes, a memory segment is allocated to the connection, and even when we do a rollback release before the disconnection, the resources allocated are not released, so the memory allocated to the application grows without a limit (every 60 connections it takes 128 kb).
    We´ve tried with a rollback/commit release before every disconnection (depending on the failure or success of the associated processes), analising the tnsnames parameters to avoid any waiting time, increasing the timer period between connection tests, but the memory is not being released after disconnections... any idea about what is happening? why even when the connection with the database is not possible there is any memory allocated to it? how could we release it? do you know how to test that the database/listener are alive so the connection is possible, other than try to connect and examine the possible error messagges?
    Thanks a lot!
    Ana

    Jim,
    I don't think this is ID directly causing a problem, but some other interaction. I'm using 5.0.3 on XP pro SP2 and the exe disappears from processes about 2 or 3 seconds after close.
    What version of Windows are you running?
    Peter

  • PS Touch Android does not release memory when closed.

    I have to force closure with Task Manager on my Samsung Note 2 running JB 4.1. Why and when will it be fixed?

    Hi Ignacio,
    Sorry for the lack of information - I had typed more complete description, but had trouble posting it.
    The app is installed on a Samsung Galaxy Note 2 phone that is running Jellybean 4.1.1.
    The only way I can see to exit the application is by using the "back" soft key under the screen on the right. Some apps have an "exit" choice under the "menu" soft key, but that key is not active with PSTouch.
    I see the same issue with Google Chrome. The menu key is active with this app, but it does not have an "exit" choice.
    With both these apps, I have to go to the "Active Apps" tab of the Task Manager to release memory.
    There is one difference with PS Touch. Google Chrome always starts the same way whether or not I release it's memory. With PS Touch, if I release memory after closing with the back key, the next time I start it I get an initial royal blue screen with the PS Touch icon in the middle followed by a second screen with a menu in the middle titled "New Project From". If I exit at that point, it takes two presses of the back key to first close the menu and then exit the program and return to a home screen. If I do not release memory, the next time I start PS Touch, it goes directly to the second screen, but without the "New Project From" menu.
    I hope this gives you the information you need.
                      Pete

Maybe you are looking for

  • Office 2013 Professional Plus - 32 bit Deployment takes an unacceptable time to deploy in SCCM 2012 - SP1 CU3

    We recently migrated over to SCCM 2012 SP1 - CU3 the first of the year from SCCM 2007 SP2.  We have used SCCM in the past to deploy Office 2010 and had deployed Office 2013 to our IT Dept. before moving over to SCCM 2012.  The deployment went as expe

  • From which table do i fetch cost center????

    Hi.. i have material and plant as selection screen parameters.. CSKS table has plant and cost center.. but when i checked the contents of the table...there is no value for plant.. so plz suggest me smeother table wherein i can fetch cost center detai

  • Xreadlines module not working

    Hi, We have migrated from 10G to 11G recenlty. There is a module called xreadlines which is used in a Jython procedure and the procedure was working fine in 10G. But in 11G its throwing an error: Import xreadlines not found. Note: This issue specific

  • Oracle form builder 10g is not opening any form ,on Vista

    I have installed DevSuite 10g and its update in my Vista machine. Everything is working fine ,but when I try to open any form in form designer(form builder) the form builder crashes and it gives me error saying- "Oracle form designer has stopped work

  • Equipment Asset value?

    Hi Bw Gurus, I have a requirement to provide a report on De Installed Equipments from CRM and the asset value from ERP. I can get information like sevice order no, contract no , age of the equipment from the due data etc from CRM. Where as the Asset