Pluggable Protocol not released (?)

Hi,
I have an MFC application which uses CHtmlView (WebBrowser control) to display HTML data. For displaying, I implemeted an asynchronous pluggable protocol. I did this by adding ATL support to my MFC project and adding an OLE class derived from IInternetProtocol
and IInternetProtocolInfo to my project (using the wizard). My pluggable protocol is defined as follows:
class ATL_NO_VTABLE CPluggableProtocol :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CPluggableProtocol, &CLSID_PluggableProtocol>,
public IInternetProtocol,
public IInternetProtocolInfo
public:
CPluggableProtocol()
: m_fData(MEMORY_BUFFER)
DECLARE_REGISTRY_RESOURCEID(IDR_PLUGGABLEPROTOCOL)
BEGIN_COM_MAP(CPluggableProtocol)
COM_INTERFACE_ENTRY(IInternetProtocolInfo)
COM_INTERFACE_ENTRY(IInternetProtocol)
END_COM_MAP()
DECLARE_PROTECT_FINAL_CONSTRUCT()
HRESULT FinalConstruct()
return S_OK;
void FinalRelease()
// IInternetProtocol interface
public:
STDMETHOD(Start)(
LPCWSTR szUrl,
IInternetProtocolSink *pIProtSink,
IInternetBindInfo *pIBindInfo,
DWORD grfSTI,
DWORD dwReserved);
STDMETHOD(Continue)(PROTOCOLDATA *pStateInfo);
STDMETHOD(Abort)(HRESULT hrReason,DWORD dwOptions);
STDMETHOD(Terminate)(DWORD dwOptions);
STDMETHOD(Suspend)();
STDMETHOD(Resume)();
STDMETHOD(Read)(void *pv,ULONG cb,ULONG *pcbRead);
STDMETHOD(Seek)(
LARGE_INTEGER dlibMove,
DWORD dwOrigin,
ULARGE_INTEGER *plibNewPosition);
STDMETHOD(LockRequest)(DWORD dwOptions);
STDMETHOD(UnlockRequest)();
// IInternetProtocolInfo interface
public:
STDMETHOD(CombineUrl)(LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags,
LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved);
STDMETHOD(CompareUrl)(LPCWSTR pwzUrl1, LPCWSTR pwzUrl2, DWORD dwCompareFlags);
STDMETHOD(ParseUrl)(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwParseFlags,
LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved);
STDMETHOD(QueryInfo)( LPCWSTR pwzUrl, QUERYOPTION QueryOption, DWORD dwQueryFlags,
LPVOID pBuffer, DWORD cbBuffer, DWORD *pcbBuf, DWORD dwReserved);
private:
CAtlStringW GetContentType(CString &);
CMemFile m_fData;
In my InitInstance I register this protocol using RegisterNameSpace (and UnregisterNameSpace in ExitInstance). This is done by the following:
CComPtr<IClassFactory> m_spCF; // (class member)
CComPtr<IInternetSession> spIInetSession;
if(FAILED(CoInternetGetSession(0, &spIInetSession, 0)))
return FALSE;
HRESULT hr;
if(FAILED(CPluggableProtocol::_ClassFactoryCreatorClass::CreateInstance(CPluggableProtocol::_CreatorClass::CreateInstance, IID_IClassFactory, reinterpret_cast<void**>(&m_spCF))))
return FALSE;
hr = spIInetSession->RegisterNameSpace(m_spCF, CLSID_PluggableProtocol, m_strProtocol, 0, NULL, 0);
This works on all the computers I have access to and it worked for a few months no. No problems.
But now I got the message from somebody using the application that the application does not terminate. Using logfiles I found out that AfxOleCanExitApp() returns TRUE in CMainFrame::OnNcDestroy. This means that not all COM objects have been released and
therefore the application does not quit (only the windows disappear). Using the debugger (breakpoint at AfxOleLockApp()), I found out that the one COM object which is calling AfxOleLockApp is the asynchronous pluggable protocol (through urlmon.dll).
Unfortunately I can not do trial and error because it works perfectly on all my computers. But since it does obviously not work for a different person I am sure I have a little mistake in my implementation. I have very few COM experience, therefore it may
be that the code above is not perfectly correct.
Does anybody see a mistake in my implementation which could cause the bug?
Thank you very much,
Peter

Hello,
Hmm, no idea? :-(
Another thing which came into my mind:
I call RegisterNameSpace in InitInstance and UnregisterNameSpace in ExitInstance. However, ExitInstance is called
after receiving WM_QUIT, bevor the MFC framework asks via AfxOleCanExitApp() if it will call PostQuitMessage().
Maybe I must do this stuff in the window function? E.g. RegisterNameSpace on WM_CREATE and UnregisterNamespace on WM_CLOSE? This would be before the AfxOleCanExitApp() check...
And: After I cann UnregisterNameSpace, can I be sure that all COM objects are destroyed and released?
Regards, Peter

Similar Messages

  • 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.

  • Unable to follow links in pdf document which use asynchronous pluggable protocol on Windows unless we disable extended security completely (Reader 11.0.7) - is there any other way round this?

    We have a pdf document which contains links of the format appname://some/path.
    This is using Windows Asynchronous Pluggable Protocols which we have defined in the registry so these links should launch the application with the path as an argument.
    If we disable enhanced security in Reader 11.0.7 then this works - otherwise it just fails to do anything.
    With enhanced security on, we get warning and select trust this site for all pdfs.
    Adobe then stores the first part of the path i.e. for appname://some/path it will store path in [HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\11.0\TrustManager\cDefaultLaunchURLPerms].
    Don't get warning after that but the application still doesn't launch if enhanced security is enabled.

    Apologies was mislead - it's not enhanced security which is causing the issue, it is protected mode.

  • Weblogic Data source is not releasing connections

    Hi All,
    Weblogic JDBC data source is not releasing connection until JDBC connection is deleted and created again. Could you please let me know this is a database issue or weblogic jdbc driver issue. We are using weblogic 10.1. Please see the following xml for JDBC driver.
    Although maximum connections are set to 300, it stills keeps increasing connections over 300. This issue is resolved only when jdbc data source is deleted and created again.
    <?xml version='1.0' encoding='UTF-8'?>
    <jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/90" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xsi:schemaLocation="http://www.bea.com/ns/weblogic/920 http://www.bea.com/ns/weblogic/920.xsd">
    <name>abc_admin_STGNCB</name>
    <jdbc-driver-params>
    <url>jdbc:oracle:thin:@10.151.43.54:1521:STGNCB</url>
    <driver-name>oracle.jdbc.OracleDriver</driver-name>
    <properties>
    <property>
    <name>user</name>
    <value>abc_admin</value>
    </property>
    <property>
    <name>portNumber</name>
    <value>1521</value>
    </property>
    <property>
    <name>SID</name>
    <value>STGNCB</value>
    </property>
    <property>
    <name>serverName</name>
    <value>10.151.43.54</value>
    </property>
    </properties>
    <password-encrypted>{3DES}wc5vg5GIbPtt+b8vWY0i5Q==</password-encrypted>
    </jdbc-driver-params>
    <jdbc-connection-pool-params>
    <initial-capacity>20</initial-capacity>
    <max-capacity>300</max-capacity>
    <capacity-increment>10</capacity-increment>
    <connection-creation-retry-frequency-seconds>30</connection-creation-retry-frequency-seconds>
    <statement-cache-size>200</statement-cache-size>
    <pinned-to-thread>true</pinned-to-thread>
    <identity-based-connection-pooling-enabled>true</identity-based-connection-pooling-enabled>
    </jdbc-connection-pool-params>
    <jdbc-data-source-params>
    <jndi-name>jdbc/ABC_TX_DATASOURCE</jndi-name>
    <jndi-name>jdbc/ABC_NON_TX_DATASOURCE</jndi-name>
    <jndi-name>jdbc/ABC_TX_EVENT_DATASOURCE</jndi-name>
    <jndi-name>jdbc/ABC_NON_TX_EVENT_DATASOURCE</jndi-name>
    <jndi-name>jdbc/ABC_DATASOURCE</jndi-name>
    <jndi-name>abc.cdb.DataSource</jndi-name>
    <global-transactions-protocol>EmulateTwoPhaseCommit</global-transactions-protocol>
    </jdbc-data-source-params>
    </jdbc-data-source>
    Edited by: bpenugon on Aug 24, 2010 8:02 AM

    The root cause is pinned-to-thread is enabled. When the application finishes using the connection and calls connection.close(), WebLogic Server keeps the connection with the execute thread and does not return it to the connection pool. The connection pool maximum capacity is ignored when pinned-to-thread is enabled. So you saw the number of connections in connection pool keeps increasing over 300.
    Set pinned-to-thread to false can solve the problem.

  • EMac modem does not release phone line

    I have an original eMac. The modem is capabale of receiving and sending faxing. However, occasionally it does not "release" the phone line causing any incoming fax to get a busy signal and if you try to dial the phone number you also get a busy signal. Unplugging the phone line from the modem port resolves the issue as does restarting.
    What can be done to fix this issue besides getting a new modem.
    Thanks!

    I recall having similar problems with my home pre-broadband dial-up account under 10.1.5. That was blamed on the computer modem and the ISP modems implementing different versions of the same modem protocol (which certainly doesn't say mush for the 'standard' part of the v.92 protocol). That I thought was fixed in later versions of OS X, but you may still want to contact your ISP to ask them if they're aware of other Mac dial-up users with the same problem and if they can suggest any modem commands to add to your modem command strings. You can ask them to check on their end to see if they're receiving the line release command from your modem when you attempt to hang up.
    Since most Mac-related questions to ISP support seem to garner a response of "huh?", your other option would be to try dropping the modem protocol from v.92 to v.90 (and if necessary even lower) to see if those protocols are more compatible with your ISP's modem banks.

  • Oracle select for update: not releasing lock

    My JDBC code uses "select for update" to modify record in Oracle database. I tried to simulate network connection down situation.
    After my JDBC code locked on a record using "select for update", I unplugged the network cable. I then tried to run the same code on another computer, but it could not accquire the lock, because the previous lock was not released. I tried sqlplus to lock the record, but failed also. The lock has been there for at least an hour now. I guess it may finally be released, but is there a way for oracle to release the lock as soon as the connection is down? Not know if it is a JDBC setting or oracle setting.

    Dear Friend,
    What you are trying to do is not correct way of checking the concurrency and transaction.
    The reason is as listed below.
    01.Always remember http is a stateless protocol and removing the connection or just closing the browser will never be informed to the database or to the application server thus the transaction monitor (TM)or processor will never release the lock as it will deem that the actor is manipulating the data.
    02.As per locking goes every database is having a �TM� and the default isolation level setting is different like oracle uses serializable DB2udb 7.0 or db2/As400 uses repeatable read. You can change this setting by editing the default setting in the database but be very sure before touching it.
    03.     You can also transpose this with your Application server setting for that piece of code or Globally but again be very sure about it as it will change the entire gamete.
    04.     For releasing lock you have to manually do it or you can change the settings of App server or the Database to release the connection after some wait time.
    Regards,
    Ruchir

  • I do 'router isis' but I get 'protocol not in this image'

    C2610, IOS 12.3.
    I've searched this on forums but I couldn't find the answer:
    I attempt to do 'router isis' but IOS returns 'protocol not in this image'. How can I solve this ? I would like to work on ISIS redistribution labs against EIGRP, OSPF, etc.

    Thanks for info. hmmm... I need to search it more, but so far it seems my image can't do ISIS...
    Cisco Internetwork Operating System Software
    IOS (tm) C2600 Software (C2600-I-M), Version 12.3(12b), RELEASE SOFTWARE (fc2)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2005 by cisco Systems, Inc.
    Compiled Thu 31-Mar-05 19:08 by jfeldhou
    Image text-base: 0x80008098, data-base: 0x80CCAA68
    ROM: System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
    ROM: C2600 Software (C2600-I-M), Version 12.3(12b), RELEASE SOFTWARE (fc2)
    RouterC uptime is 8 hours, 16 minutes
    System returned to ROM by power-on
    System image file is "flash:c2600-i-mz.123-12b.bin"
    cisco 2610 (MPC860) processor (revision 0x203) with 28672K/4096K bytes of memory
    Processor board ID JAD05390K1C (3082946085)
    M860 processor: part number 0, mask 49
    Bridging software.
    X.25 software, Version 3.0.0.
    1 Ethernet/IEEE 802.3 interface(s)
    2 Serial network interface(s)
    32K bytes of non-volatile configuration memory.
    --More--

  • Problem with PresentModalViewController and it is not releasing components

    Hi ,
    Here is the code that takes the user to next screen.
    ==============
    UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:elementController];
    [[self navigationController]presentModalViewController:navController aimated:YES];
    [elementController release];
    [navController release];
    ================
    I have two screens
    1)First screen
    2)second Screen
    In First screen i have a button, when i click on this the above code executes.
    then it takes control to second screen
    Even if i released the nav Controller and ElementController , the elements like iubaritem,navigation items are not releasing
    Please help me out

    Cloud programs do not use serial numbers... you log in to your PAID Cloud account to download & install & activate... you MAY need to log out of the Cloud and restart your computer and log back in to the Cloud for things to work
    Some general information for a Cloud subscription
    Log out of your Cloud account... Restart your computer... Log in to your paid Cloud account
    -Sign in help http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
    -http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html

  • Report to Show PR that are not released by release codes

    Hello Experts,
    I would like to know if there is any report on SAP 6.0 that shows all the purchase requisitions that are not released which shows the releease code (the person's name who has to release the PR). In me55 only could be found by release code, and it is required, I cannot has a report
    I think that there is not, but i would like to confirm it.
    Thank you in advance,
    Best regards

    Hello,
    1)Go to ME5A t-code & select DYNAMIC SELECTIONS.
    2)Select "Purchase Requisition" section and you can make use of parameters like Release Code, Release Indicator , Release Status etc., to fetch the required results.
    Hope this helps you in resolving your matter.
    Regards
    Mahesh

  • 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

  • Invoice is not Release MRBR after GR

    Hello,
    *Usually the vendor sends invoice before the good is receipt. The invoice is paid after the GR.*we want the set up
    (1) create purchase order**
    (2) MIRO the PO**
    (3) IR becomes blocked**
    (4) Run MRBR - invoice receipt not released due to GR not having been done.**
    (5) Do GR**
    (6) Run MRBR automatically as a background job
    (7)Check IR freed for payment
    (8) Pay the Invoice
    (9) GR/IR clearing
    When I run MRBR #6 automatically system is not releasing IR for payment.  I also tried tolerance DW, BR and PP-50%.  May be I am not setting them correctly.
    Please advice.
    Thank you,

    Hi
    Can you tell me how did you achieve point (4)?
    I also have a similar requirement in MRBR to prevent invoices from getting released if GR is not done.
    Thanks

  • Job not released in the given specified time(Job_close)

    Hi,
    I need to run a program through job.I created a job using JOB_OPEN
    And submitted the job name and job count to the required program
    And closed the job using JOB_CLOSE.
    My problem is the job getting scheduled but not released/ processed automatically by the specified time I need to release it manually through SM37.
    My code.
    JOB_OPEN
    SUBMIT VIA job_name and job count
    l_time = sy-uzeit + 60.
    CALL FUNCTION 'JOB_CLOSE'
                EXPORTING
                  jobcount             = l_jobcount
                  jobname              = l_jobname
                  SDLSTRTDT            = sy-datum
                  SDLSTRTTM            = l_time
                  STRTIMMED            = 'X'
                IMPORTING
                  job_was_released     = l_released
                EXCEPTIONS
                  cant_start_immediate = 1
                  invalid_startdate    = 2
                  jobname_missing      = 3
                  job_close_failed     = 4
                  job_nosteps          = 5
                  job_notex            = 6
                  lock_failed          = 7
                  OTHERS               = 8.
    After the above code execution SY-SUBRC is ‘8’ and And the L_released is having balnk.If I pass start immediately the the job processed immediately. And the L_released is having ‘X’.
    Please help me….

    If you are trying to set up the job to start at some point in the future - use the SDLSTRTDT and SDLSTRTTM, but do not set the STRTIMMED to 'X'.  You can either schedule it for the future (with the sy-datum and sy-uzeit+60 you desginated) or you can set it to begin immediately.  But I don't believe you can do both.
    In your code example, your are setting both the "start immediately" plus giving it a future date and time.
    Give that a try and see if it helps.
    -Mark

  • Function Module not released yet. Has anybody used them in their programs?

    Hi
    I am trying to use the barcode functionality during a goods movement 101 (using MIGO). As we donu2019t have any control of SAPu2019s barcode functionality thru configuration in MIGO I have developed a custom popup and I am calling this in a BADI implementation MB_MIGO_BADI. Once the user enters the barcode then I call Function module ARCHIV_BARCODE_GLOBAL to save the barcode to the standard tables.
    This Function module is not released to the customers and it was last changed on 11/12/2004.
    My question is should I be using this Function module in my BADI implementation even though it is not released (does not have a release date) ?. Has anyone of have used a unreleased Function module in your programs?.
    Additionally I need this info
    I am using ECC 5.0. If anyone of you is using ECC 6.0 or higher can you please check and let me know if this FM ARCHIV_BARCODE_GLOBAL is released or not or when was it last changed.
    Please advice me at you earlist
    Thanks of your time
    SHraj

    Hi,
    We are not using the above FM. But I can give some Info from ECC 6.0.
    In ECC 6.0 the above FM is realeased for customers.
    Last changed on:28.12.2004 18:28:16.
    You can use the same code in ur Z function module.
    Thanks and Regards

  • Mail.jar is locked when sending a mail using servlet and not releasing

    Hi everybody,
    The mail.jar is locked in tomcat while sending the first message and not released until the tomcat get restarts.
    the problem is not recorded in any logs.
    1. Please create a servlet that sends mail
    2. Send a mail to any mailid
    3. then after the mail is send please try to delete the mail.jar or please deploy the same servlet again with some small changes (for redeploying take place only a few changes is there - please change any strings a little bit)
    then try to send mail using this servlet will not send mail becoause it will not redployed correctely.
    when i removed Transport.send(msg); from code it works fine. but ??
    please help me to recover from this issue. i don't want to turn on tomcat antiJarlocking and antiresourcelocking to true, becaouse this craete many other problems.
    please help me to recover from this issue.
    Thanks,
    Prasad.N

    hi friend
    I am using advanced version of jdk. i i have used many other jar files like mysqlconnector, logging, commonhttpclient, etc.... the only problem is with mail.jar. that locks are released when its use completed, but the lock holds until tomcat shutdown in mail.jar.
    what may be the reason?
    Thanks,
    Prasad.N

Maybe you are looking for

  • Error while addind A/R Creditmemo

    hi Experts , while adding A/R Credit memo the document was not getting added and throwing an error as ' reconsilation date must be on or after the last posting date for transaction selected for reconciliation [Message 3821-3]'

  • Help with Photoshop Cs6 Image size

    I am using Photoshop Cs6 on a MacBook Pro with retina display.  I'm working on an image that is 72 dpi and 1000 pixels wide by 300 pixels tall.  When I hook my laptop up to my external monitor, the image is a nice size.  However, when I disconnect it

  • Function mmodule for payment details

    hello,        is ther any function  module that will retrun the details of paymnet run happened for the current day. where i willl be passing the current date has the input criteria. cheers

  • How to display PSA screen capture on Front Panel

    Any one know how to display screen capture of PSA series specturm analyzer on front panel. I can save the JPEG file in the C drive, but I can't display on the front pannel. Please see my labview code. Solved! Go to Solution. Attachments: Capture scre

  • Using Adobe Standard as default application

    I had to download Adobe Reader for a document that I wanted to open and read.  After doing this, the reader has become the default for opening all PDFs instead of my Adobe Standard.  Now, in order to open a PDF in standard so I can work on it, I have