Usage of goto

OK, I have a situation where inside a loop, if I do not find data for a particular record, skip that and go to next record in the loop, so i tried goto
create table example(id number, val number);
insert into example values (1,4);
insert into example values (2,null);
insert into example values (3,5);
commit;
create or replace procedure p_example
is
type t_ref_cur is ref cursor;
type tn is record(id number, val number);
post_rec tn;
post_cur t_ref_cur;
v_sql varchar2(4000);
v_res number;
begin
v_sql := 'select id, val from example order by id';
open post_cur for v_sql;
loop
   fetch post_cur into post_rec;
   exit when post_cur%notfound;
   begin
   select val
   into v_res
   from example
   where id = post_rec.id;
   exception
     when no_data_found then
       dbms_output.put_line('in nodatafound');
       goto myend;
   end;
    dbms_output.put_line('post_rec.id: '||post_rec.id||' post_rec.val: '||post_rec.val);
<<myend>>
null;
end loop;
end p_example;Idea is, we get a no_data_found when it comes to id 2, and so we have to skip 2 from going any further
and go to next id (that is 3),
but looks like my goto is not working here, 2 is not skipped, i can print 2 also in the print statement

As already mentioned, goto is a very easy construct to abuse. Personally I don't like it however it does occasionally have a place. Essentially it provides the same type of jumping capability as an exception block. However I think an exception block is clearer, more recognisable and more explicit - very few people use gotos in PL/SQL in my experience, but exception blocks are much more common place. So one alternative would be to raise a custom exception and capture that i.e.
create or replace procedure p_example
is
type t_ref_cur is ref cursor;
type tn is record(id number, val number);
post_rec tn;
post_cur t_ref_cur;
v_sql varchar2(4000);
v_res number;
    lex_MyNoData        EXCEPTION;
    PRAGMA EXCEPTION_INIT(lex_MyNoData, -20001);
begin
v_sql := '  select
                e1.id,
                e1.val
            from
                example e1
            left outer join
                example e2
            on 
                ( e1.id ';
open post_cur for v_sql;
loop
    BEGIN
       fetch post_cur into post_rec;
       exit when post_cur%notfound;
       begin
       select val
       into v_res
       from example
       where id = post_rec.id;
       if v_res is null then
          goto myend;
       end if;
       exception
         when no_data_found then
           RAISE_APPLICATION_ERROR(-20001,'Res is null);
       end;
        dbms_output.put_line('post_rec.id: '||post_rec.id||' post_rec.val: '||post_rec.val);
    EXCEPTION
        WHEN lex_MyNoData THEN
            NULL;
    END;
end loop;
end p_example;However, I've not yet come across a circumstance where it was not possible to reorganise the logic of a unit of code to avoid having gotos or something similar. If you've got an existing code base that you're maintaining, you might not have the choice of refactoring it to the extent necessary, but in those case I would make what you're doing as explicit as possible.
David

Similar Messages

  • Use of goto exception in forms

    Hi,
    I wonder if anybody can tell me how to GOto exception where the exception is a user-defined one, in forms 6i.
    Dipin

    Hi Dipin:
    EXCEPTION_INIT pragma: This is an instruction to the compile that instructs it to associate a name with an internal error code.
    Following example from "ORACLE PL/SQL" book:
    The following example, I declare and associate an exception for this error:
    ORA-2292 violated integrity constraint (OWNER.CONSTRAINT)
    child record found
    DECLARE
    MY_EXCEPTION EXCEPTION;
    PRAGMA EXCEPTION_INIT(MY_EXCEPTION, -2292);
    BEGIN
    DELETE FROM COMPANY WHERE COMPANY_ID = 'SOME_ID';
    EXCEPTION
    WHEN MY_EXCEPTION THEN
    DBMS_OUTPUT.PUT_LINE('Please delete employees for'
    || ' company first.');
    END;
    Note that in the example, eventhough I declared the exception, I did not explicitly raised it, this happened because of the EXCEPTION_INIT.
    Usage of GOTO:
    Syntax: GOTO label_name
    EXAMPLE
    FUNCTION GET_SOME_DESC(P_CODE IN CHAR) RETURN VARCHAR2 IS
    BEGIN
    IF P_CODE IS NULL THEN
    GOTO no_code_label;
    ELSIF P_CODE = 'S' THEN
    RETURN 'Simple';
    ELSIF P_CODE = 'C' THEN
    RETURN 'Complicated';
    END IF;
    <<no_code_label>>
    RETURN NULL;
    END;
    That should give you an answer for GOTO usage, however, it is my opinion based on experience that GOTO usage makes for more problems than it solves. You should always be able to design your code in a way that makes GOTO unneccessary.
    Hope this helps,
    Thomas

  • Error while starting Managed server in wls

    I am using WebLogic Server Version: 10.3.4.0. I have created one managed server thru admin console. I am starting managed server using startManagedWebLogic.cmd batch file. Chnages I made in this cmd file is added managed server name and wls userid/password.
    When execute this, I get below error:
    Server
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/Server
    Caused by: java.lang.ClassNotFoundException: weblogic.Server
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    Could not find the main class: weblogic.Server.  Program will exit.
    The contents of the startManagedWebLogic.cmd is as below:
    @ECHO OFF
    @REM WARNING: This file is created by the Configuration Wizard.
    @REM Any changes to this script may be lost when adding extensions to this configuration.
    SETLOCAL
    @REM --- Start Functions ---
    GOTO :ENDFUNCTIONS
    :usage
         echo Need to set SERVER_NAME and ADMIN_URL environment variables or specify
         echo them in command line:
         echo Usage: %1 SERVER_NAME {ADMIN_URL}
         echo for example:
         echo %1 managedserver1 http://localhost:7001
    GOTO :EOF
    :ENDFUNCTIONS
    @REM --- End Functions ---
    @REM *************************************************************************
    @REM This script is used to start a managed WebLogic Server for the domain in
    @REM the current working directory. This script can either read in the SERVER_NAME and
    @REM ADMIN_URL as positional parameters or will read them from environment variables that are
    @REM set before calling this script. If SERVER_NAME is not sent as a parameter or exists with a value
    @REM as an environment variable the script will EXIT. If the ADMIN_URL value cannot be determined
    @REM by reading a parameter or from the environment a default value will be used.
    @REM
    @REM For additional information, refer to "Managing Server Startup and Shutdown for Oracle WebLogic Server"
    @REM (http://download.oracle.com/docs/cd/E17904_01/web.1111/e13708/overview.htm)
    @REM *************************************************************************
    @REM Set SERVER_NAME to the name of the server you wish to start up.
    Set SERVER_NAME=*ManagedServer1*
    set DOMAIN_NAME=mydomain
    set ADMIN_URL=http://localhost:7001
    @REM Set WLS_USER equal to your system username and WLS_PW equal
    @REM to your system password for no username and password prompt
    @REM during server startup. Both are required to bypass the startup
    @REM prompt.
    set WLS_USER=*weblogic*
    set WLS_PW=*weblogic1*
    @REM Set JAVA_OPTIONS to the java flags you want to pass to the vm. i.e.:
    @REM set JAVA_OPTIONS=-Dweblogic.attribute=value -Djava.attribute=value
    set JAVA_OPTIONS=-Dweblogic.security.SSL.trustedCAKeyStore="d:\Perforce\weblogic1\src_16020jr\bea\wlserver_10.3\server\..\server\lib\cacerts" %JAVA_OPTIONS%
    @REM Set JAVA_VM to the java virtual machine you want to run. For instance:
    @REM set JAVA_VM=-server
    set JAVA_VM=
    @REM Set SERVER_NAME and ADMIN_URL, they must by specified before starting
    @REM a managed server, detailed information can be found at
    @REM http://download.oracle.com/docs/cd/E17904_01/web.1111/e13708/overview.htm
    if "%1"=="" (
         if "%SERVER_NAME%"=="" (
              CALL :usage %0
              GOTO :EOF
    ) else (
         set SERVER_NAME=%1
         shift
    if "%1"=="" (
         if "%ADMIN_URL%"=="" (
              CALL :usage %0
              GOTO :EOF
    ) else (
         set ADMIN_URL=%1
         shift
    @REM Export the admin_url whether the user specified it OR it was sent on the command-line
    set ADMIN_URL=%ADMIN_URL%
    set SERVER_NAME=%SERVER_NAME%
    set DOMAIN_HOME=D:\Perforce\weblogic1\dev\src_crmod\wls\mytest
    if "%1"=="" (
         @REM Call Weblogic Server with our default params since the user did not specify any other ones
         call "%DOMAIN_HOME%\bin\startWebLogic.cmd" nodebug noderby noiterativedev notestconsole noLogErrorsToConsole
    ) else (
         @REM Call Weblogic Server with the params the user sent in INSTEAD of the defaults
         call "%DOMAIN_HOME%\bin\startWebLogic.cmd" %1 %2 %3 %4 %5 %6 %7 %8 %9
    ENDLOCAL
    Any help is really appreciated.

    I could see calling to setDomainEnv.cmd script:
    *@REM Call setDomainEnv here.*
    set DOMAIN_HOME=D:\Perforce\weblogic1\dev\src_crmod\wls\mytest
    for %%i in ("%DOMAIN_HOME%") do set DOMAIN_HOME=%%~fsi
    call "%DOMAIN_HOME%\bin\setDomainEnv.cmd" %*
    set SAVE_JAVA_OPTIONS=%JAVA_OPTIONS%
    set SAVE_CLASSPATH=%CLASSPATH%
    But in my environment I do not see these variable set to any, JAVA_HOME, DERBY_CLASSPATH, JAVA_OPTIONS, CLASS_PATH.
    This might be the issue? Or anything else?

  • How to see BOM and Routing changes

    Hi,
          Can anyone help me in finding the changes made in BOM and Routing

    Hi,
    why open two thread for same question in this forum, pls close any one
    Routing changes: CA60
    BOM changes : CS80
    or
    Goto CS03, enter Material, Plant and Bom Usage.
    Goto Alternate Overview of BOM.
    Select the BOM.
    In the Menu Bar, Click Environment -> Change documents.
    Regards,
    Sankaran
    Regards,
    Sankaran

  • Managed Server missing error.

    Hi,
    I have installed Weblogic10.3 upgrading from Weblogic 8.1. I am able to start the admin server successfully but cannot start the managed server using a startup script. I get the following error:
    There are 1 nested errors:
    weblogic.management.ManagementException: [Management:141223]The server name MRO2
    26NTS_BENCALC specified with -Dweblogic.Name does not exist. The configuration i
    ncludes the following servers {MRO250WIN_ADMIN}.
    at weblogic.management.provider.internal.RuntimeAccessImpl.<init>(Runtim
    eAccessImpl.java:149)
    at weblogic.management.provider.internal.RuntimeAccessService.start(Runt
    imeAccessService.java:39)
    at weblogic.t3.srvr.ServerServicesManager.startService(ServerServicesMan
    ager.java:459)
    at weblogic.t3.srvr.ServerServicesManager.startInStandbyState(ServerServ
    icesManager.java:164)
    at weblogic.t3.srvr.T3Srvr.initializeStandby(T3Srvr.java:711)
    at weblogic.t3.srvr.T3Srvr.startup(T3Srvr.java:482)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:440)
    at weblogic.Server.main(Server.java:67)
    I cannot find the managed server instance when I log onto the console. How is it missing totally?
    This is the script used to start the managed server: named start_bc_managed_server.cmd
    S:
    cd S:\bea\user_projects\db_dev_domain\bin
    set DBES_ROOT=S:\BenefitCal_WL
    *@rem cmd /K startManagedWebLogic MRO226NTS_BENCALC http://localhost:7000 %DBES_ROOT% 7001 -Xms512m+-Xmx512m BenefitCal*
    *@rem set JAVA_OPTIONS=%JAVA_OPTIONS% -Dlog4j.configuration=file:/%DBES_ROOT%/dbsystem/config/log4j.xml*
    *@rem set JAVA_OPTIONS=%JAVA_OPTIONS% -Drule.client.location=%DBES_ROOT%\dbsystem\com\fidelity\definedbenefit\benefitcalculator\rule\client*
    cmd /K startManagedWebLogic MRO226NTS_BENCALC http://localhost:7000 %DBES_ROOT% 7001 -Xms512m+-Xmx512m BenefitCal
    THINGS I HAVE DONE:
    1) I have checked config.xml found in S:\bea\user_projects\domain1\config and found it does not contain all the target servers and have replaced it with a config xml that contains all the target servers(MRO226NTS_BENCALC is one of them).
    startManagedWebLogic
    *@ECHO OFF*
    *@REM WARNING: This file is created by the Configuration Wizard.*
    *@REM Any changes to this script may be lost when adding extensions to this configuration.*
    SETLOCAL
    *@REM --- Start Functions ---*
    GOTO :ENDFUNCTIONS
    *:usage*
    *     echo Need to set SERVER_NAME and ADMIN_URL environment variables or specify*
    *     echo them in command line:*
    *     echo Usage: %1 SERVER_NAME {ADMIN_URL}*
    *     echo for example:*
    *     echo %1 managedserver1 http://localhost:7000*
    GOTO :EOF
    *:ENDFUNCTIONS*
    *@REM --- End Functions ---*
    echo in STARTMANAGEDWEBLOGIC------
    *@REM **************************************************************************
    *@REM This script is used to start a managed WebLogic Server for the domain in*
    *@REM the current working directory. This script can either read in the SERVER_NAME and*
    *@REM ADMIN_URL as positional parameters or will read them from environment variables that are*
    *@REM set before calling this script. If SERVER_NAME is not sent as a parameter or exists with a value*
    *@REM as an environment variable the script will EXIT. If the ADMIN_URL value cannot be determined*
    *@REM by reading a parameter or from the environment a default value will be used.*
    *@REM*
    *@REM For additional information, refer to the WebLogic Server Administration*
    *@REM Guide (http://e-docs.bea.com/wls/docs103/adminguide)*
    *@REM **************************************************************************
    *@REM Set SERVER_NAME to the name of the server you wish to start up.*
    set DOMAIN_NAME=db_dev_domain
    set ADMIN_URL=http://localhost:7000
    *@REM Set WLS_USER equal to your system username and WLS_PW equal*
    *@REM to your system password for no username and password prompt*
    *@REM during server startup. Both are required to bypass the startup*
    *@REM prompt.*
    set WLS_USER=
    set WLS_PW=
    *@REM Set JAVA_OPTIONS to the java flags you want to pass to the vm. i.e.:*
    *@REM set JAVA_OPTIONS=-Dweblogic.attribute=value -Djava.attribute=value*
    set JAVA_OPTIONS=-Dweblogic.security.SSL.trustedCAKeyStore="S:\bea\wlserver_10.3\server\lib\cacerts" %JAVA_OPTIONS%
    *@REM Set JAVA_VM to the java virtual machine you want to run. For instance:*
    *@REM set JAVA_VM=-server*
    set JAVA_VM=
    *@REM Set SERVER_NAME and ADMIN_URL, they must by specified before starting*
    *@REM a managed server, detailed information can be found at*
    *@REM http://e-docs.bea.com/wls/docs103/adminguide*
    if "%1"=="" (
    *     if "%SERVER_NAME%"=="" (*
    *          CALL :usage %0*
    *          GOTO :EOF*
    *) else (*
    *     set SERVER_NAME=%1*
    *     shift*
    if "%1"=="" (
    *     if "%ADMIN_URL%"=="" (*
    *          CALL :usage %0*
    *          GOTO :EOF*
    *) else (*
    *     set ADMIN_URL=%1*
    *     shift*
    *@REM **************************************************************************
    *@REM Customization by A375886*
    *@REM If you are here with input parameter*
    *@REM %1 = APP_ROOT*
    *@REM %2 = PORT*
    *@REM %3 = (min heap)+(max heap)*
    *@REM (ie -Xms500m+-Xmx500m)*
    *@REM %4 = APPNAME*
    *@REM **************************************************************************
    set DOMAIN_HOME=S:\bea\user_projects\db_dev_domain
    set APP_ROOT=S:
    if "%1" == "" goto setPort
    set APP_ROOT=%1
    *:setPort*
    set PORT=7000
    if "%2" == "" goto setMemArgs
    set PORT="%2"
    *:setMemArgs*
    set MEM_ARGS=-Xms256m -Xmx512m
    if "%3" =="" go setAppName
    set MEM_ARGS="%3"
    *:setAppName*
    if "%4" =="" go setGoOne
    set APPNAME="%4"
    *:setGoOne*
    set JAVA_OPTIONS=%JAVA_OPTIONS% -Dlog4j.configuration=%APP_ROOT%\other\dbsystem\config\log4j.xml
    set JAVA_OPTIONS=%JAVA_OPTIONS% -Drule.client.location=%APP_ROOT%\presentation\com\fidelity\definedbenefit\benefitcalculator\rule\client
    set JAVA_OPTIONS=%JAVA_OPTIONS% -DConfigLocation="%APP_ROOT%\other\dbsystem\config"
    set JAVA_OPTIONS=%JAVA_OPTIONS% -DListenPort=%PORT% -Dweblogic.ListenPort=%PORT%
    set JAVA_OPTIONS=%JAVA_OPTIONS% -DListenAddress=%ADMIN_URL%
    set JAVA_OPTIONS=%JAVA_OPTIONS% -Dbea.home=%APP_ROOT%\bea\license
    set JAVA_OPTIONS=%JAVA_OPTIONS% -DAppName=%APPNAME%
    set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.security.allowAnonymous=true
    set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.disableMBeanAuthorization=true
    set JAVA_OPTIONS=%JAVA_OPTIONS% -DDOMAIN_FOLDER=%DOMAIN_HOME%
    set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.admin.username=system
    set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.admin.password=weblogic
    set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.admin.url=http://localhost:7000
    echo JAVA_OPTIONS= %JAVA_OPTIONS%
    echo APP_ROOT = %APP_ROOT%
    echo PORT = %PORT%
    echo MEM_ARGS = %MEM_ARGS%
    echo APPNAME = %APPNAME%
    *@REM Export the admin_url whether the user specified it OR it was sent on the command-line*
    set ADMIN_URL=%ADMIN_URL%
    set SERVER_NAME=%SERVER_NAME%
    *@REM set application specific setting*
    echo domain is %DOMAIN_HOME%
    echo App is %APPNAME%
    call "%DOMAIN_HOME%\bin\setAppEnv.cmd" %APPNAME%
    if "%1"=="" (
    *     @REM Call Weblogic Server with our default params since the user did not specify any other ones*
    *     call "%DOMAIN_HOME%\bin\startWebLogic.cmd" nodebug nopointbase noiterativedev notestconsole*
    *) else (*
    *     @REM Call Weblogic Server with the params the user sent in INSTEAD of the defaults*
    *     call "%DOMAIN_HOME%\bin\startWebLogic.cmd" %1 %2 %3 %4 %5 %6 %7 %8 %9*
    ENDLOCAL

    It seems that you have to check "config.xml" in S:\bea\user_projects\db_dev_domain, not the one in S:\bea\user_projects\domain1\config.
    Please check also that you have started the correct administrative instance (try also to log into the console to check the configuration).
    Bye
    Mariano

  • Testing connection with Oracle thin driver

    Hi !
    I am testing Oracle connection from dos prompt and I get the SQL Error SQLEXCEPTION.
    How do I connect Petstore to Oracle database? When I test the connection I get error message that java.sql.SQLException No License: weblogic.comon.LicenseNotFoundException. The file is in weblogic home directory.

    Hi Sree !
    Thanks !
    After I ran the SetEnv.cmd, this is working and I guess I am ok now to use this
    connection pool.
    Thank you very much.
    .Madhuri
    "Sree Bodapati" <[email protected]> wrote:
    can you point me to the doc which talks about the valid DBTYPE values
    (url)?
    java utils.dbping ORACLE_THIN scott tiger
    <machineip_or_name>:1521:<tns_alias >
    this should work fine. for out of box usage, just goto the the folder
    <wl_home>/config/mydomain and execute setenv.cmd / setenv.sh then execute
    the above command from the same shell.
    This command is not testing connection pool. its making sure that you
    can
    connect to the db and it will not take you into sqlplus, it will show
    you
    multiple ways to code your connections to the database.
    sree
    "Madhuri" <[email protected]> wrote in message
    news:[email protected]...
    Hi Sree !
    Thanks for your prompt reply. I have tried your solution but stillI am
    having
    problem and I don't find more info. about this on Bea site. Pleasesee
    following
    E:\bea\wlserver6.1>java utils.dbping ORACLE_THIN <username> <password>host:port:database
    name
    Valid DBTYPE values:
    ORACLE, ORACLE_JDBC20, INFORMIX4, [JCONNECT | SYBASE], MSSQLSERVER4
    Where I should have to use dbtype, is there something missing in command?
    Please let me know.
    After the connection pool test is successful, it should take me toSQLPLUS, am
    I right? What message I should be expecting?
    Thanks
    ..Madhuri
    "Sree Bodapati" <[email protected]> wrote:
    The license file for WLS6.1 is license.bea file that is normally in
    the
    BEA_HOME folder.
    Usage for utils.dbping:
    Usage: java utils.dbping ORACLE USER PASS DBNAME
    or java utils.dbping ORACLE_THIN USER PASS HOST:PORT:DBNAME
    or java utils.dbping JCONNECT USER PASS HOST:PORT/DBNAME
    or java utils.dbping INFORMIX4 USER PASS DBNAME@HOST:PORT
    or java utils.dbping MSSQLSERVER4 USER PASS DBNAME@HOST:PORT
    Try to use the second one and it should work. What you were usingwas
    the
    dbping for OCI driver.
    sree
    "Madhuri" <[email protected]> wrote in message
    news:[email protected]...
    Hi Sree !
    I tried this but still I get an error. Please see the following
    E:\bea\wlserver6.1>java -classpath%WL_HOME%;%WL_HOME%\license;%CLASSPATH%
    utils
    dbping ORACLE <username> <password> <database>
    Missing license file for: WebLogic Server 6.1
    Error encountered:
    java.sql.SQLException: Fail to load jDriver/Oracle due to license
    checking
    faile
    d!
    at
    weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:182)
    at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:146)
    at utils.dbping.main(dbping.java:167)
    Hi why it is complaining for OCI drivers when I am using thin driver?
    Thanks
    ..Madhuri
    "Sree Bodapati" <[email protected]> wrote:
    Try,
    java -classpath %WL_HOME%;%WL_HOME%\license;%CLASSPATH% utils.dbping
    ORACLE
    scott tiger TNS_alias
    and see if it helps, make sure WL_HOMe is set properly.
    sree
    "Madhuri" <[email protected]> wrote in message
    news:[email protected]...
    Hi Sree !
    Following is the error message I am getting:
    java.sql.SQLException: No License:weblogic.common.LicenseNotFoundException:
    weblogic.common.LicenseNotFoundException:
    Could not find licensing file:
    Your WebLogic license file, named either WebLogicLicense.xmlor
    WebLogicLicense.class must be located in a directory
    that
    is
    in your CLASSPATH. By default, your license file is locatedin the
    /license directory located in your WebLogic home directory
    (the root directory of your WebLogic installation).
    As of version 4.0 of WebLogic, a new XML-format license
    file
    has
    replaced the older, compiled class format license file.
    The WebLogic Server will recognize either format.
    For additional information on WebLogic licenses or on
    setting
    your
    class
    path, see the installation instructions in the WebLogic Serverdocumentation,
    av
    ailable at
    http://e-docs.bea.com/
    at weblogic.jdbcbase.oci.Driver.connect(Driver.java:72)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at utils.dbping.main(dbping.java:156)
    One more thing I would like to tell you that the file (including
    class
    file) is
    in the weblogic directory and the folder is also in the classpath.I am
    trying
    the following command :
    java utils.dbping ORACLE scott tiger TNS_alias
    Thanks in advance.
    .Madhuri
    "Sree Bodapati" <[email protected]> wrote:
    Hi Madhuri,
    Try placing the folder in which you have the license file in
    your
    classpath.
    Can you post the SQL Exception?
    sree
    "Madhuri" <[email protected]> wrote in message
    news:[email protected]...
    Hi !
    I am testing Oracle connection from dos prompt and I get the
    SQL
    Error
    SQLEXCEPTION.
    How do I connect Petstore to Oracle database? When I test
    the
    connection
    I
    get error message that java.sql.SQLException No License:
    weblogic.comon.LicenseNotFoundException. The file is in weblogic
    home
    directory.

  • How are deliveries automatically created from scheduling agreement?

    How are deliveries automatically created from the schedule line of the scheduling agreement? Can anybody explain this step by step? Can we use the code VL10BATCH for this purpose? If we can, how is this code used?
    Thanks in advance.

    hi
    A customer scheduling agreement is an outline agreement with the customer containing delivery quantities and dates. These are then entered as schedule lines in a delivery schedule. You can either create schedule lines when you create the scheduling agreement or you can create them later.
    You fulfill a scheduling agreement by creating the deliveries in the schedule as they become due. You process deliveries for a scheduling agreement in exactly the same way as you process a normal delivery. After you have carried out the delivery, the system updates the Delivered quantity field in the scheduling agreement item with the delivery quantity.
    The scheduling agreement is used as a basis for delivering a material. The customer sends in scheduling agreement releases, referred to as delivery schedules, at regular intervals to release a quantity of the material.
    Document Types
    To configure document types for scheduling agreements, choose Sales -> Sales Documents -> Sales Document Header -> Define sales document types in Customizing for Sales and Distribution.
    The R/3 System contains the following document types for component suppliers:
    LZ - Scheduling agreement with delivery schedules (no external agents)
    LZM - Scheduling agreement with delivery orders
    LK - Scheduling agreement with delivery schedules (external agents)
    ED - Delivery by external agent (consignment issue)
    EDKO - External agent correction
    RZ - Scheduling agreement returns (no external agents)
    KAZU - Consignment pick-up for external agents
    KRZU - Consignment returns for external agents
    Item Categories
    To configure item categories for scheduling agreements, choose Sales -> Sales Documents -> Sales Document Item -> Define item categories in Customizing for Sales and Distribution.
    The system determines the following item categories for the related document types in
    documents containing materials with item category group NORM:
    Item category LZN for scheduling agreement type LZ
    Item category LZMA for scheduling agreement type LZM
    Item category LKN for scheduling agreement type LK
    Item category KEN for document type ED
    Item category EDK for positive corrections (or the manual alternative EDK1 for
    negative corrections) for document type EDKO
    Item category REN for document type RZ
    Item category KAN for document type KAZU
    Item category KRN for document type KRZU
    Schedule Line Categories
    To configure schedule line categories for scheduling agreements, choose Sales -> Sales Documents -> Schedule lines -> Define or Assign schedule line categories in Customizing for Sales and Distribution.
    The R/3 System contains the following schedule line categories for component suppliers:
    L1, BN, L2, and CN for item category LZN
    E4, E0, E5, and BN for item category LKN
    L2 for item category LZMA (standard for delivery order processing)
    Schedule Line Types
    To configure schedule line types for scheduling agreements, choose Sales -> Sales Documents -> Scheduling Agreements with Delivery Schedules -> Define schedule line types in Customizing for Sales and Distribution.
    Creating Scheduling Agreements
    To create a scheduling agreement with delivery schedules:
    1. In the Sales menu http://Ext. choose Scheduling agreement ->Create.
    2. Enter scheduling agreement type LK (standard) or LZ (external agents) and the
    relevantorganizational data.
    3. Choose ENTER.
    4. Enter the following data:
    Sold-to or ship-to party number
    Purchase order or closing number
    Material or customer material number
    You can use the Description field to identify the scheduling agreement. For
    example,
    you could enter the model year for a particular production series.
    The system allows up to 35 digits for a customer material number.
    Rounding quantity
    Usage
    Choose Goto -> Header -> Sales to enter the usage at header level, or Goto ->
    Item-> Sales A to enter it at item level. The system proposes usage S, for series, as default in both cases.
    Planning indicator
    Choose Goto -> Header ->Sales.
    Target quantity
    Mark an item and choose Goto -> Item -> Sales A
    Partners
    For scheduling agreements with external agents , choose Goto -> Header
    ->Partners to enter the external agent as forwarding agent and special stock partner
    on the partner function screen.
    5. Create a delivery schedule
    Mark an item in the scheduling agreement and choose Goto -> Item -> <Delivery
    schedule>. Enter:
    A delivery schedule number and date
    The cumulative quantity received by the customer
    The last delivery confirmed by the customer
    A schedule line with date, time, and quantity
    To enter additional data in the delivery schedule, choose DlvSch.Hdr (delivery schedule header).
    configuration:
    img->SD->Sales->sales document->scheduling agreements with delivery schedules->
    step1: define schedule line types
    schedule line types are not schedule line categories. Schedule line types are used for information purpose only.
    stds are 1. fixed date 2. backlog 3. immediate requirement
    4. estimate
    step2: maintain planning delivery sched. instruct/splitting rules
    The planning delivery schedule is an internal delivery schedule used to plan requirement s more efficiently.  It is sub divided into 3 parts
    2.1 delivery schedule splitting rules
    2.2 dly schedule instrusctions
    2.3 assign dly schedule splitting rules
    step3: define sales documents type
    step4 : define item categories
    step5: define schedule line categories
    step6: maintain copy control
    PROCESS
    step1:  create scheduling agreement
    VA31
    enter SP,SH valid from, valid to,
    goto ITEM OVERVIEW tab
    enter material, rouding qty
    select ITEM  click on FORECAST DLSCH
    enter different dly dates and qties
    save it.
    step2: create sales order with reference to above
    step3: create delivery
    step4: create billing
    regards
    krishna

  • App that shows amount of data uses?

    iPhone 5
    iOS 7.1.1
    hey all! I want a app that can show me me how much data I have used. Kinda like 3G watch dog on android. Any sugesestions?

    You dont need the app that is built in ability to show data usage. Goto settings cellular and scroll down that shows the amount of data used by cellular.

  • Memory usage of excel stays high after Macro is executed and excel crashes after trying to close it

    Hi,
    I'm trying to resolve an issue with an excel based tool. The macros retrieve data from an Oracle database and do calculations with the data. They also open and write into files in the same directory. The macros all run and finish the calculations. I can
    continue to use and modify the sheet. I can also close the workbook, however excel memory usage I see in the windows Task manager stays elevated.If I  close Excel it says: Excel stopped working and then it tries to recover information...
    I assume something in the macro did not finish properly and memory was not released. I would like to check what is still open (connection, stream or any other object) when I close the workbook I would like to have a list of all still used memory. Is there
    a possibility to do so.
    Here the code I'm using, its reduced to functions which open something. Functions   
    get_v_tools() and get_change_tools() are same as get_client_positions().
    Public conODBC As New ADODB.Connection
    Public myPath As String
    Sub get_positions()
    Dim Src As range, dst As range
    Dim lastRow As Integer
    Dim myPath As String
    lastRow = Sheets("SQL_DATA").Cells(Sheets("SQL_DATA").rows.Count, "A").End(xlUp).Row
    Sheets("SQL_DATA").range("A2:AD" & lastRow + 1).ClearContents
    Sheets("SQL_DATA").range("AG2:BE" & lastRow + 2).ClearContents
    Sheets("SQL_DATA").range("AE3:AF" & lastRow + 2).ClearContents
    k = Sheets("ToolsList").Cells(Sheets("ToolsList").rows.Count, "A").End(xlUp).Row + 1
    Sheets("ToolsList").range("A2:M" & k).ClearContents
    'open connection
    Call open_connection
    lastRow = Sheets("SQL_DATA").Cells(Sheets("SQL_DATA").rows.Count, "A").End(xlUp).Row
    If lastRow < 2 Then GoTo ErrorHandling
    'copy bs price check multiplications
    Set Src = Sheets("SQL_DATA").range("AE2:AF2")
    Set dst = Worksheets("SQL_DATA").range("AE2").Resize(lastRow - 1, Src.columns.Count)
    dst.Formula = Src.Formula
    On Error GoTo ErrorHandling
    'new prices are calculated
    newPrice_calculate (lastRow)
    Calculate
    myPath = ThisWorkbook.Path
    'Refresh pivot table in Position Manager
    Sheets("Position Manager").PivotTables("PivotTable3").ChangePivotCache ActiveWorkbook. _
    PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
    myPath & "\[Position_Manager_v1.0.xlsm]SQL_DATA!R1C2:R" & lastRow & "C31" _
    , Version:=xlPivotTableVersion14)
    ErrorHandling:
    Set Src = Nothing
    Set dst = Nothing
    If conODBC.State <> 0 Then
    conODBC.Close
    End If
    End Sub
    Sub open_connection()
    Dim sql_data, sql_data_change, sql_data_v As Variant
    Dim wdth, TotalColumns, startRow As Integer
    Dim rst As New ADODB.Recordset
    Errorcode = 0
    On Error GoTo ErrorHandling
    Errorcode = 1
    With conODBC
    .Provider = "OraOLEDB.Oracle.1"
    .ConnectionString = "Password=" & pswrd & "; Persist Security Info=True;User ID= " & UserName & "; Data Source=" & DataSource
    .CursorLocation = adUseClient
    .Open
    .CommandTimeout = 300
    End With
    startRow = Sheets("SQL_DATA").Cells(Sheets("SQL_DATA").rows.Count, "A").End(xlUp).Row + 1
    sql_data = get_client_positions(conODBC, rst)
    wdth = UBound(sql_data, 1)
    Sheets("SQL_DATA").range("A" & startRow & ":AA" & wdth + startRow - 1).Value = sql_data
    'Run change tools instruments
    startRow = Sheets("ToolsList").Cells(Sheets("ToolsList").rows.Count, "A").End(xlUp).Row + 1
    sql_data_change = get_change_tools(conODBC, rst)
    wdth = UBound(sql_data_change, 1)
    Sheets("ToolsList").range("A" & startRow & ":M" & wdth + startRow - 1).Value _
    = sql_data_change
    'open SQL for V tools instruments
    startRow = Sheets("ToolsList").Cells(Sheets("ToolsList").rows.Count, "A").End(xlUp).Row + 1
    sql_data_v = get_v_tools(conODBC, rst)
    wdth = UBound(sql_data_v, 1)
    Sheets("ToolsList").range("A" & startRow & ":L" & startRow + wdth - 1).Value = sql_data_v
    conODBC.Close
    ErrorHandling:
    If rst.State <> 0 Then
    rst.Close
    End If
    Set rst = Nothing
    End Sub
    Private Function get_client_positions(conODBC As ADODB.Connection, rst_posi As ADODB.Recordset) As Variant
    Dim sql_data As Variant
    Dim objCommand As ADODB.Command
    Dim sql As String
    Dim records, TotalColumns As Integer
    On Error GoTo ErrorHandling
    Set objCommand = New ADODB.Command
    sql = read_sql()
    With objCommand
    .ActiveConnection = conODBC 'connection for the commands
    .CommandType = adCmdText
    .CommandText = sql 'Sql statement from the function
    .Prepared = True
    .CommandTimeout = 600
    End With
    Set rst_posi = objCommand.Execute
    TotalColumns = rst_posi.Fields.Count
    records = rst_posi.RecordCount
    ReDim sql_data(1 To records, 1 To TotalColumns)
    If TotalColumns = 0 Or records = 0 Then GoTo ErrorHandling
    If TotalColumns <> 27 Then GoTo ErrorHandling
    If rst_posi.EOF Then GoTo ErrorHandling
    l = 1
    Do While Not rst_posi.EOF
    For i = 0 To TotalColumns - 1
    sql_data(l, i + 1) = rst_posi.Fields(i)
    Next i
    l = l + 1
    rst_posi.MoveNext
    Loop
    ErrorHandling:
    rst_posi.Close
    Set rst_posi = Nothing
    Set objCommand = Nothing
    get_client_positions = sql_data
    End Function
    Private Function read_sql() As String
    Dim sqlFile As String, sqlQuery, Line As String
    Dim query_dt As String, client As String, account As String
    Dim GRP_ID, GRP_SPLIT_ID As String
    Dim fso, stream As Object
    Set fso = CreateObject("Scripting.FileSystemObject")
    client = Worksheets("Cover").range("C9").Value
    query_dt = Sheets("Cover").range("C7").Value
    GRP_ID = Sheets("Cover").range("C3").Value
    GRP_SPLIT_ID = Sheets("Cover").range("C5").Value
    account = Sheets("Cover").range("C11").Value
    sqlFile = Sheets("Cover").range("C15").Value
    Open sqlFile For Input As #1
    Do Until EOF(1)
    Line Input #1, Line
    sqlQuery = sqlQuery & vbCrLf & Line
    Loop
    Close
    ' Replace placeholders in the SQL
    sqlQuery = Replace(sqlQuery, "myClent", client)
    sqlQuery = Replace(sqlQuery, "01/01/9999", query_dt)
    sqlQuery = Replace(sqlQuery, "54747743", GRP_ID)
    If GRP_SPLIT_ID <> "" Then
    sqlQuery = Replace(sqlQuery, "7754843", GRP_SPLIT_ID)
    Else
    sqlQuery = Replace(sqlQuery, "AND POS.GRP_SPLIT_ID = 7754843", "")
    End If
    If account = "ZZ" Then
    sqlQuery = Replace(sqlQuery, "AND AC.ACCNT_NAME = 'ZZ'", "")
    Else
    sqlQuery = Replace(sqlQuery, "ZZ", account)
    End If
    ' Create a TextStream to check SQL Query
    sql = sqlQuery
    myPath = ThisWorkbook.Path
    Set stream = fso.CreateTextFile(myPath & "\SQL\LastQuery.txt", True)
    stream.Write sql
    stream.Close
    Set fso = Nothing
    Set stream = Nothing
    read_sql = sqlQuery
    End Function

    Thanks Starain,
    that's what I did the last days and found that the problem is in the
    newPrice_calculate (lastRow)
    function. This function retrieves data (sets it as arrays) which was correctly pasted into the sheet, loops through all rows and does math/calendar calculations with cell values using an Add-In("Quantlib")
    Public errorMessage as String
    Sub newPrice_calculate(lastRow)
    Dim Type() As Variant
    Dim Id() As Variant
    Dim Price() As Variant
    Dim daysTo() As Variant
    Dim fx() As Variant
    Dim interest() As Variant
    Dim ObjCalend as Variant
    Dim newPrice as Variant
    On Error GoTo Catch
    interest = Sheets("SQL_DATA").range("V2:V" & lastRow).Value
    Type = Sheets("SQL_DATA").range("L2:L" & lastRow).Value Id = Sheets("SQL_DATA").range("M2:M" & lastRow).Value Price = Sheets("SQL_DATA").range("T2:T" & lastRow).Value
    daysTo = Sheets("SQL_DATA").range("K2:K" & lastRow).Value
    fx = Sheets("SQL_DATA").range("U2:U" & lastRow).Value
    qlError = 1
    For i = 2 To lastRow
    If (i, 1) = "LG" Then
    'set something - nothing spectacular like
    interest(i, 1) = 0
    daysTo(i , 1) = 0
    Else
    adjTime = Sqr(daysTo(i, 1) / 365)
    ObjCalend(i,1) =Application.Run("qlCalendarHolidaysList", _
    "CalObj", ... , .... other input parameters)
    If IsError(ObjCalend(i,1)) Then GoTo Catch
    'other calendar calcs
    newPrice(i,1) = Application.Run( 'quantLib calcs)
    End If
    Catch:
    Select Case qlError
    Case 1
    errorMessage = errorMessage & " QuantLibXL Cal Error at: " & i & " " & vbNewLine & Err.Description
    ObjCalend(i,1) (i, 1) = "N/A"
    End Select
    Next i
    Sheets("SQL_DATA").range("AB2:AB" & lastRow).Value = newPrice
    'Sheets("SQL_DATA").range("AA2:AA" & lastRow).Value = daysTo
    ' erase and set to nothing all arrays and objects
    Erase Type
    Erase id
    Erase Price
    Set newPrice = Nothing
    Is there a possibility to clean everything in:
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    End Sub
    Thanks in advance
    Mark

  • Is there a goto statement in java??

    is ther a goto statement in java
    if yes how is it
    and if no wat we use instead of it , if we want to redirect to control flow??
    thanking you
    rose!!!

    But he did not say it with three exclamation
    points!!!
    yes, I'm trying to restrict my usage of the exclamation mark as part of my attempts to be more even tempered (which aren't succeeding that well, but I may just need more practice).

  • IPhone 4S Battery Life: Best solutions and procedures for 1st time user: 1-Do you have a battery life issue (learn first what the usage time spec is about) 2-What can you try to remedy the situation without reading 500 pages of posts

    What follows is a grouping of some of the most fruitful procedures - from what I've seen in the biggest battery life issue thread - and some background information and discussion for solving or improving the battery life with the iPhone 4S and may be applicable also to devices on which iOS 5.0/5.0.1 has been applied. Credit goes to the respective users who contributed this information to the forum and they should be commended for doing so. This is not a final listing. The goal here is to provide a first stop sort of knowledge base document for newcomers instead of having them perusing the never ending threads where the wheel is reinvented on every page...
    Please don't post your questions, usage screenshots, or claims that it worked or not for you or anything here except PROCEDURES/DEBUG STEPS/SOLUTIONS or improvements to the procedures already listed here. Try to use point form and to be as concise and clear as possible. Hope all this helps.
    Thank you and good luck!
    General info and specs
    First, take a look Apple's battery tips, info and specs(obligatory reading for all Iphone 4S users - read it once and for all):
    http://www.apple.com/batteries/iphone.html
    http://www.apple.com/batteries/
    ... you didn't read it? loll Always remember this i.e. the definition of "usage":
    Usage: Amount of time iPhone has been awake and in use since the last full charge.  The phone is awake when you’re on a call, using email, listening to music, browsing the web, or sending and receiving text messages, or during certain background tasks such as auto-checking email.
    I'm still not convinced you read the links so here's what Apple has to say in terms of fine tuning your battery life:
    Optimize your settings
    Depending on how they are configured, a few features may decrease your iPhone battery life.  For example, the frequency with which you retrieve email and the number of email accounts you auto-check can both affect battery life. The tips below apply to an iPhone running iOS 5.0 or later and may help extend your battery life.
    Minimize use of location services: Applications that actively use location services such as Maps may reduce battery life. To disable location services, go to Settings > General > Location Services or use location services only when needed.
    Turn off push notifications: Some applications from the App Store use the Apple Push Notification service to alert you of new data. Applications that extensively rely on push notifications (such as instant messaging applications) may impact battery life. To disable push notifications, go to Settings > Notifications and set Notifications to Off. Note that this does not prevent new data from being received when the application is opened. Also, the Notifications setting will not be visible if you do not have any applications installed that support push notifications.
    Fetch new data less frequently: Applications such as Mail can be set to fetch data wirelessly at specific intervals.  The more frequently email or other data is fetched, the quicker your battery may drain. To fetch new data manually, from the Home screen choose Settings > Mail, Contacts, Calendars > Fetch New Data and tap Manually. To increase the fetch interval, go to Settings > Mail, Contacts, Calendars > Fetch New Data and tap Hourly. Note that this is a global setting and applies to all applications that do not support push services.
    Turn off push mail: If you have a push mail account such as Yahoo! or Microsoft Exchange, turn off push when you don’t need it. Go to Settings > Mail, Contacts, Calendars > Fetch New Data and set Push to Off. Messages sent to your push email accounts will now be received on your phone based on the global Fetch setting rather than as they arrive.
    Auto-check fewer email accounts: You can save power by checking fewer email accounts. This can be accomplished by turning off an email account or by deleting it. To turn off an account, go to Settings > Mail, Contacts, Calendars, choose an email account, and set Account to Off. To remove an account, go to Settings > Mail, Contacts, Calendars, choose an email account, and tap Delete Account.
    Turn off Wi-Fi: If you rarely use Wi-Fi, you can turn it off to save power. Go to Settings > Wi-Fi and set Wi-Fi to Off. Note that if you frequently use your iPhone to browse the web, battery life may be improved by using Wi-Fi instead of cellular data networks.
    Turn off Bluetooth: If you rarely use a Bluetooth headset or car kit, you can turn off Bluetooth to save power.  Go to Settings > General > Bluetooth and set Bluetooth to Off.
    Use Airplane Mode in low- or no-coverage areas: Because your iPhone always tries to maintain a connection with the cellular network, it may use more power in low- or no-coverage areas.  Turning on Airplane Mode can increase battery life in these situations; however, you will be unable to make or receive calls.  To turn on Airplane Mode, go to Settings and set Airplane Mode to On.
    Adjust brightness: Dimming the screen is another way to extend battery life.  Go to Settings > Brightness and drag the slider to the left to lower the default screen brightness. In addition, turning on Auto-Brightness allows the screen to adjust its brightness based on current lighting conditions.  Go to Settings > Brightness and set Auto-Brightness to On.
    Turn off EQ: Applying an equalizer setting to song playback on your iPhone can decrease battery life.  To turn EQ off, go to Settings > iPod > EQ and tap Off. Note that if you’ve added EQ to songs directly in iTunes, you’ll need to set EQ on iPhone to Flat in order to have the same effect as Off because iPhone keeps your iTunes settings intact.  Go to Settings > iPod > EQ and tap Flat.
    Usage specs for the 4S - http://www.apple.com/iphone/specs.html:
    Talk time: Up to 8 hours (12.5% per hour drain) on 3G, up to 14 hours (7.1% per hour drain) on 2G (GSM)
    Standby time: Up to 200 hours (0.5% per hour drain)
    Internet use: Up to 6 hours on 3G (16.6% per hour drain), up to 9 hours (11.1% per hour drain) on Wi-Fi
    Video playback: Up to 10 hours (10% per hour drain)
    Audio playback: Up to 40 hours (2.5% per hour drain)
    So a scenario of normal usage could be for example: 4 heavy hours of 3G internet browsing (66.4%), with one hour of call on 3G (12.5%) and 22 hours of standby (11%) = 100%
    A battery life issue is a problem where the drain is really out of spec either during usage or standby or both. For example, multi-% per minute drain during usage or a 10% drain per hour during standby is problematic. Browsing the internet on 3G during one hour and losing 16-17% is not.
    Apple's test methodology for claiming the specs:
    http://www.apple.com/iphone/battery.html
    Procedures
    davidch tips (reset+full discharge recharge):
    Go through these steps to address the battery after updating to iOS 5.0.1:
    1. Reset all settings (settings app-> general-> reset)
    2. Go through initial setup steps (lang, wifi, siri, enable location, etc) and choose setup as new phone (don't worry your apps, data, contacts, mail will still be there). Do NOT restore from iCloud or iTunes (It can copy back corrupt settings)
    3. Turn off system location services timezone and iAd
    4. Fully discharge battery  (tilll it shuts off with the spinning wheel)
    5. Fully recharge battery (overnight if possible)
    In my experience this improves the Standby battery drain issue significantly in most cases.  It reduces drain from 2-4% or more per hr to 0.5% or less. It has worked for many, many users now. If it does not work after a few try's you may have a real battery or hardware issue and should contact Apple.  Good Luck!
    ram130's variant of davidch i.e. additional steps:
    Now using davidch original steps and attaching the tweaks I made to get me more usage. As shown on page 29.
    Go through these steps to address the battery after updating to iOS 5.0.1:
    1. Reset all settings (settings app-> general-> reset)
    2. Go through initial setup steps (lang, wifi, siri, enable location, etc) and choose setup as new phone (don't worry your apps, data, contacts, mail will still be there). Do NOT restore from iCloud or iTunes (It can copy back corrupt settings)
    3. Turn off system location services timezone and iAd
    4. Fully discharge battery  (till it shuts off with the spinning wheel)
    5. Fully recharge battery (overnight if possible)
    6. Disable Siri 'Raise To Speak' and REBOOT *( if possible use another camera to verify the                 infrared is off after the reboot).
    7. Set emails, icloud and calendars to fetch. ** test. Mines on hourly.
    8. If your in a no signal and your phone is saying "Searching..." even after 10mins, reboot while in that area and after 1-2min it should say "No Service". This mainly applies to Verizon customers and improve battery life in these areas.
    9. *optional* Goto Settings > General > Network and you will see "Hotspot.." loading something, wait a few seconds and it should say "setup personal hotspot" then exit out.
    * I notice a great improvement after disabling this and rebooting. This increased my "screen on" usage or at least helped it. Make the change.
    ** I have not tested push yet to narrow down the drain but I had this change on my phone. I believe exchange push is responsible for some stand by drain. As for icloud, haven't notice much of a difference. Just try it for a day. My email still came in fast most times. Again still testing, will report back on these..
    buxbuster tips(wifi sync, iCloud):
    These are my own tested workarounds that worked for my iPhone 4S and seemed to have worked for others as well :
    Workaround number 1. Deselect wifi-sync in iTunes and press sync.
    If that doesn't work try :
    Workaround number 2 : Remove iCloud, reset network settings. ( I guess this won't work for you since you don't have it enabled ).
    If both workarounds fail, you can always try to completely wipe your phone. That also solved some of the cases out there.
    rolandomerida tips - i.e. buxbuster and additional steps:
    Finally, I solved the syncing error loop. My contacts are syncing flawessly again between my devices and iCloud, and yes, the battery stopped draining, which is the main topic here.
    I followed instructions from buxbuster (check his workaround a few pages up!) and an additional BIG step to restore contacts and syncing, as seen in a MacRumors forum.
    This is what I did:
    1. Make a backup of your Address Book, using the vCard option (or both, it doesn't hurt). Save it for later.
    2. In your iPhone, delete iCloud account. When it asks, accept both: delete AND delete from my iPhone.
    3. Reset network settings. The iPhone will restart, then will ask you to unlock the SIM card.
    4.Turn Wi-Fi on.
    5. Add the iCloud account again.
    That's for Buxbuster's workaround. For some, it might work just like that. My iPhone repopulated from iCloud after step 5, but I still had that "server error" on iCloud. I had to do some extra steps, since my Mac was not syncing to iCloud and couldn't edit anything on my Mac or iCloud. Syncing back had to be fixed, too. If not, the syncing loop would continue from my iPhone, and the battery would drain awfully again.
    1. In System Preferences -> iCloud, I turned Contacts off. I chose "keep on My Mac" those contacts, but I got an empty Address Book after a while. And a few minutes later, iCloud contacts were empty and my iPhone also. It is scary at first! Now, before importing that vCard backup...
    2. Turn Wi-Fi off. This is important, since your contact-empty iCloud will attempt to wipe your Address Book from your Mac in seconds after importing.
    3. Import your vCard backup to Address Book. Just drag it to your blank Address Book window; it asks if you want to import "x" number of cards. Of course, say yes.
    4. Turn Wi-Fi on, and then iCloud contacts on again (System Preferences -> iCloud). It will offer to merge your newly populated Address Book with iCloud (which is empty at this point). It should upload every single contact to iCloud, and then to your iDevices. If not, a fifth step would be to import the vCard file to iCloud, but it shouldn't be necessary.
    So, with iCloud syncing working correctly, there is no battery draining! Again, that was my particular issue.
    I can't tell if this is the single answer to the widely spread battery draining problem, but it sure can be fixed with these workarounds, and yes, Apple should address the problem with a future update, for we affected customers don't need workarounds in the first place
    This is the MacRumors discussion:
    http://forums.macrumors.com/showthread.php?t=1256807
    And dont' forget to check buxbuster's fix, video, and THANK him!
    Miless tips (full 800mb release of 5.0.1 and sanitizing a restore):
    As for 4S battery life. Try doing this,
    1. Settings>Location Service ... disable all location services you do not need. In particularly Facebook because it drains the battery a lot.
    Scroll down to the bottom at Settings>Location services>System Services ... Disable Setting Time zone, location based iAds, Diagnostic & Usage.
    2. Settings>Notification>Calendar ... turn off the Notification Centre.
    3. Settings>General>Reset ... do Reset All Settings. Doing this will not wipe out your iPhone. It will just Reset the network settings, location warning, keyboard dictionary, etc... but it will clear up some corrupted data there. Generally this will help.
    Try these 3 steps first... if it still drains a lot, try the following,
    4. Drain your battery down to 1%. Then charge it up using USB from PC ... not the charger. The charger output 1.0 A ( x 5V from USB ... you get 5W power). From PC, output is only 0.5A x 5V = 2.5W power. Charging is slower but trickle charge 4S helps the battery retain its charge better. I think it takes about 3-3.5 hours to charge full from USB/PC compared to slightly below 2 hours using iPhone charger.
    If after doing the above still could not solve your battery issues (mine with iOS 5.0 was ok up to step 4, but not iOS 5.0.1).... plug you iPhone to a charger (any charger), from iPhone, access your iCloud ... set it up if you havent. Back up your iPhone data to iCloud. if you do not have enough storage (only 5GB is free), go to details and select the apps you need its data backup, choose only those you really need and leave those unnecessary ones out. Back up your camera roll to your PC/Mac manually as it could be too big to backup to iCloud.... once you have it setup, make sure you are on Wifi ...  tap backup to iCloud from your iPhone. It will take a while if the file is huge.
    Once backup to iCloud is completed, plug your iPhone to PC/Mac and launch iTunes 10.5.1 (make sure you have 10.5.1)
    Click Restore. It will automatically initiate a download of iOS 5.0.1 ipsw for iPhone 4S. Wait for the whole process to finish, ie. download, restore software/firmware.
    Once its done, do not set up your iPhone from iTunes. Set it up on your iPhone. Go through the selection. When prompted, select restore from iCloud (from your iphone backup earlier). Keep your iphone plugged into iTunes while restoring backup from iCloud. Because while restoring from iClouds, some data will be synced from iTunes if you plug in, e.g. music, video, etc... unless you bought these content from iTunes store. Apps will be downloaded from App Store from the cloud.
    Once it's all done restored. Turn off your iPhone,.. and turn it on again.
    Now, hopefully your battery wont be draining so fast anymore. Usually it wont after this. But you need to charge your battery at least 4-5 cycles to stabilize the charge on the battery. I dont know why... but battery life seems to get better and better for me after a few charge cycles after all the above work.
    Good luck. Let us know if it works for you.
    W. Raider tips (Sirii):
    Bottom line for me of things that helped battery life are:
    1. Turing off Siri and Rebooting the phone by holding the Home button and Top button down, ignoring the slider, until the phone shut down. (turn off Siri, reboot, and check top front of iPhone 4S against a lesser camera like the front-facing camera on an iPad2 - making sure the IR sensor is off)
    2. Fully draining the battery, meaning using the phone until it shuts itself off from a drained battery and then recharging it to 100% about 4, maybe 5 times. I charged it both with a Mac and a wall charger.
    Hope this is helpful!
    Comments
    jmm514 remarks (Twitter):
    I may have found something. I had Twitter disabled in my notifications, but got a tweet today that popped up on my home screen. Didn't know I had this enabled. At the bottom of the Twitter notification settings is the home scrren toggle. Since disabling this, battery life seems better. Considering there is no setting for frequency of checking for tweets, it appears the phone is continually connecting to wifi to check for new tweets.
    tmksnyder comments (notifications, corrupt data in iCloud):
    For me, I found my iphone on wifi mysteriously connecting to my mac.  I eventually narrowed it down to the Apple Move Trailers app which keeps a file in iCloud.  The phone was trying to sync the file with the mac in the background even when the Movie Trailers app was closed (hitting the red x).  Based on my macosx logs the iCloud process that was trying to sync was working directly between the phone and the mac without using itunes by connecting to an https address hosted on the phone.  It was connecting every 3 minutes and failing (while phone was awake or awake during during a notification).  I also found that iCloud control panel on OSX would error if I tried to delete the file.  I fixed it by removing the App and doing a hard reset which stopped the sync.  I probably could have turned off iCloud document sync in the phone but didn't think of that.  My battery life has greatly improved while at home on wifi.    I am now at 28 hrs standby, 2 hrs 20 minutes of usage, and 68% battery.  It was ok before where I could get 20-30 hrs standby and 6 -8 hrs usage.  My usage today was phone calls, 3g surfing, and music via bluetooth in the car.
    I also found even with Itunes iMatch, if I mass updated tages, art work etc, it would hit the phone on wifi even in standby.  I was amazed.   Granted if I am not doing updates, Match won't hot the phone so this was a once in awhile event.  I could drop my percentage by 5-10% in a matter of minutes when doing updates.   I think a lot of our problems are background processes, associated with iCloud, notification, and apps.  More features means more battery.   I think the key thing is to keep track of what has recently been added or changed if battery life gets worse all of a sudden.   It may be an app that was recently installed and if possible you may want to completely remove it and not just quit it.
    With twitter, i think it uses push notifications so it doesn't need to be running and actively poll on the phone. For instance , if i quit the mail app, i still will get mail notifications and can swipe the message and load mail. Apple Push Notifications servics maintain the connection to the phone and there are likely pings or connection checks  that occur for the service on an os level not an app level.  This minimizes the load so there arent a bunch of apps all runing and constantly checking.  The notification service , if it is contacted from twitter or another service with data, will check the settings you have registered to the with the apple push service and send the notification to your phone.  No matter what, there is a drain with notifications. M hunch is once one application is configured to receive notifications, connection checking occurs betwen the push service and the phone so it knows where it is on the network. If it is implemented correctly, these checks arent frequent if you are still and more frequent as you move. The other drain is for when the noification hits and is processsed.  If i get 9 emails over night, my screen just popped up for 20 seconds or so to process each message using battery.  I would even think that just go from low power to turning n the screen uses more juice than if the device was already on and i get the message.  On nights I get no notifications, I see a 3  or 4 percent drop.  On nights with a number of notifications, i have seen up to a 10 percent drop.  Besides notifications, wifi sync and icloud will poll on the local network and use up battery if the host computer is on and running itunes or trying to sync a data file that is corrupt (which i had with the apple movie trailers app causing my phone to drain).  For me turning off wifi sync and remving a corrupt file in icloud solved my battery issues and I get over 24 hrs of standby with 6 to 9 hrs of use and this is with all the normal location services and push serivices turned on.
    See http://developer.apple.com/library/mac/ipad/#documentation/NetworkingInternet/Co nceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html for more info.  I think it has a good overview of how the notifications work.

    Well seems like that rumor of iOS 5.0.1 is finally gone the way of the dogs since developers got a beta of 5.1. So as stated earlier in the master discussion-> I suspect if you are filling up this thread with false post or creating a master set of links to various post that are unreliable you are wasting your time. Press is not going to touch the story due to poor or inaccurate sources which may be links from the master thread. This can include inaccurate information, combination of conflicting post or postings from users which may not own the device. Reputable press organizations have policies that require discloser and strict rules about what is a reliable source for a story. It is clear that many of the post in the master thread, which are links presented here are questionable. 
    Sorry to say that postings taken without any analysis of their totality have been propagated via various sites, for example sites such as http://www.2012federalbudget(dot)com. (Do not visit but I suspect that this is not the 2012 federal-budget site you would expect based on analysis of the records. There are plenty of sites like http://www.2012federalbudget(dot)com propagating questionable post in these threads.) One site for example in the discussion thread used a self signed certificate, the site had a log in to allow users to enter their OpenID. Seems many of these sites are pop and drop drupel configurations.
    So remember this is how the really bad rumor of iOS 5.0.2 got started, the 5.1 memory leak issue, iCloud Issues, call quality, address book, etc.
    Some of the postings have been very comical, I think the latest now is a dropbox issue. Seems that the length of the previous thread has resulted in various app engines of some proxy servers/tools reaching their limits.
    So I would make sure to know the source of any information you link to. Make sure you avoid entering any information to outside links such as OpenID or Apple ID, these are big prize items for anyone with malicious intent.  If you have issues and are a valid user contact APPLE CARE. (Note link is using McAfee Secure Short URL Service, and is https.)
    http://mcaf.ee/ricdt
    The original solution still represents a high level of success for users having any battery issues.
    Install 5.0.1 on your iPhone 4s. Some users posting they are still using older versions, bad fake serial numbers, etc.
    Make sure your device can run iOS 5.0.1 and is not altered.
    Make sure you use a new Sim, not some cut down version which many users admit to doing. (Again, worth confirming what people are posting.)
    Reset the device doing a hard reset and software reset.
    Let battery drain and then charge for the full cycle, which is 24 hours.
    I think you will find you will get the battery usage that APPLE has stated for the device.
    Best of luck, stay safe and thanks

  • Usage of 'Average Inspection Duration' in the Material Master QM view?

    Hi,
    facing user requirements that you should be able to consider the QM stock in the ATP calculations in a special way, I want to have some feedback re the usage of this Material Master field. The user actually would like to have the parts available in the Sales Order scheduling line after a specific number of days, when having run the ATP job. The ATP Config is set to include QM stock in the run (and they do not want to change that), so presently the system promise deliveries in the SO, but it can not be done! Nice solution should have been the for instance set a delivery after the planned number of days for inspection as set in the MM QM view! The only usage I have seen so far of this field is that the planend insp date range is visibale alike in tr code QA32, but that is more admin info, not causing hands-on effects.
    So two questions:
    What hands-on effect does this MM QM field entry have in R/3?
    Any suggestion how to solve this user wish re ATP logic??
    Best regards / Roland

    Set all the parameters for certificate creation
    QM in procurement&#61664; define keys for certificate processing
    <b>Certificate type</b> will define the following controls
    Certificate for each PO/GR item
    Check on – certificate check required
    Set control w/o certificate FIELD  as E
    Enhanced cert processing – tick on.
    DO the GR with certicate received – no
    See the status of insp lot CTCM- certificate conf missing
    But you cannot do GR as it is disaloowed
    Proceed as below
    Goto QC51 and give PO and item no and click ok
    Select the appropriate line and click copy
    Here you change the certificate status that 5 i.e. certificate field and inspected, mention the certificate date and save
    Now see the status of insp lot – CROK- certificate receipt confirmed.
    Now do UD, it will go through.

  • External component usage with interface node

    Hi everyone,
    I have component A , which has an interface node with Input element checked:
    Nodes     
    Node Name     IF_HROBJID
    Interface Node     1
    Input Element (Ext.)     1
    Dictionary structure     ZHR_HROBJID_LIST
    Cardinality     0..n
    I have another component: Component B Where I want to bind a table to this interface node.
    In component B :
    1. I definied the Componenet Usage of component B in the componenet controller.
    2. I drag & drop the IF_HROBJID node  to the component controller's context (the node is mapped)
    But when I try to bind a table, I always get the " The Mapping to Node COMPONENTCONTROLLER.1.IF_HROBJID Has Not Been Completed. "  error.
    nd_if_hrobjid = wd_context->path_get_node( path = 'IF_HROBJID' ).
    nd_if_hrobjid->bind_table( lt_if_hrobjid ).
    Can someone tell me what is the problem, and how can I solve it?
    Thanks
    N.

    Hi,
    Here you are trying to use component A in component B right?
    Then what you need to do is:
    1. Declare the component usage of A say A_USAGE in properties tab of component B.
    2. Create a node say 'DATA' in component controller of component B. The node 'DATA' would have the same structure as the node in your component A.
    3. Fill the node 'DATA' in component controller's method.
    4. Under your webdynpro component B, you will see Component Usages -> A_USAGE. open interface controller inside that.
        Goto context tab and drag the 'DATA' node from component controller of B on to the node in interface controller.
    Hope this is clear!
    Best Regards,
    Srilatha

  • Usage decision - Reversal

    Hi
    How to reverse the Usage decision if we did by mistake ?. Any help will be appreciated
    Thanks
    JJ

    Hi JJ,
    for cancelling usage decision use user exit QEVA0008.With the help of Abaper Proceed with following steps.Once you apply this exit you can reset the UD.
    1) GOTO T. CODE CMOD
    2) CREATE NEW PROJECT FOR EXAMPLE "ZUDRE"
    3)GIVE SHORT BTEXT & SAVE IN REQUIRED PACKAGE
    4)CLICK ON ENHANCEMENT ASSIGNMENT PUSHBUTTON
    5)ASSIGN USER EXIT QEVA0008
    6)CLICK ON COMPONENTS PUSHBUTTON
    7)DOUBLE CLICK ON" EXIT_SAPMQEVA_008"
    8)DOUBLE CLICK ON "INCLUDE ZXQEVU10"
    9)WARNING MESSAGE WILL APPEAR ON STANDARD TOOL BAR IN YELLOW COLOUR
    10)HIT THE ENTER BUTTON OF KEYBOARD
    11)CREATE OBJECT MESSAGE APPEARS . CLICK ON YES
    12)SAVE CREATED OBJECT IN REQUIRED PACKAGE
    13)CLICK BACK TWO TIMES TO COME TO SCREEN OF DISPLAY PROJECT
    14)SINGLE CLICK ON ICON IN FRONT OF FUNCTION EXIT UNDER COLUMN EXP.
    15)COPY THE DISPLAYED PROGRAM
    16)COME BACK TO "INCLUDE ZXQEVU10" AND PASTE COPIED PROGRAM INTO "INCLUDE ZXQEVU10."
    17)SAVE AND COME BACK TO SMODE INITIAL SCREEN AND CLICK ON ACTIVATE PROJECT ICON.
    18) NOW ON UD SCREEN U WILL GET CUSTOMER FUNCTION PUSHBUTTON.CLICK ON THIS BUTTON, UD WILL GET REVERSED.
    Regards
    Amit

  • Goto saving images into a pdf and a message comes up " cannot start print job"

    I an having a problem with my lightroom 4- I goto save my images into a PDF and it comes up " cannot start print job" and wont even save the images. What can be the problem, ive never had the situation before.

    Hi Sasha,
    Using Acrobat, you can create forms that are called AcroForms. The forms created in LC Designer are called XFA (XML Forms Architecture) and are more data centric. While both will open in Acrobat, they are completely different animals.
    The issue with users not being able to save the data with Reader is that the form is not Reader Enabled. You can Reader Enable a form using one of two methods:
    Reader Enable the form using Acrobat Professional (V8 or below) or Acrobat Standard (V9 or above). Note there are licensing restrictions.
    Reader Enable the form using the full server product Adobe LiveCycle Reader Extensions ES2.5. This involves additional licensing fees.
    Have a look here: http://assure.ly/etkFNU, at the features that are available depending on whether the user has Acrobat or Reader; if the form is Reader Enabled; and how the form was Reader Enabled.
    The issue of Reader Enabling would also apply to AcroForms.
    I don't think that you need to dive into LC Designer just yet, as forms created in LC Designer face the same issues about Reader Enabling as forms developed in Acrobat.
    If your usage complies with the EULA, then you could Reader Enable your form in Acrobat.
    Hope that helps,
    Niall

Maybe you are looking for