WHY "@PIVOT_QUERY" IS NOT GENERATING??

Hi Experts,
I'm trying to use COALESCE function with dynamic SQL.
If I set @PU_ID = 28 OR 29, then results are coming, if if I set @PU_ID = NULL, no result, WHY?
Basically, I'm trying to do below,
1. If my SP receive @PU_ID > 0, then only particular @PU_ID result, or else
2. If my SP receive @PU_ID as NULL, then all @PU_ID result sum together.
Please suggest! Thanks ! and here is sample table, data & query,
CREATE TABLE DBO.TEST_DATA(PU_ID INT NOT NULL, PU_DATE DATE NOT NULL, X_COUNT INT NULL, Y_COUNT INT NULL)
INSERT INTO DBO.TEST_DATA VALUES(28, '2014-01-01', 10, 20), (28, '2014-01-02', 30, 20), (28, '2014-12-12', 10, 20), (28, '2015-02-02', 10, 20)
, (29, '2015-02-02', 10, 20), (29, '2015-02-02', 10, 20)
DECLARE @PIVOT_COLS NVARCHAR(1000), @PIVOT_QUERY NVARCHAR(2000)
DECLARE @PU_ID INT
SET @PU_ID = NULL
--SET @PU_ID = 28
SELECT @PIVOT_COLS = STUFF((SELECT '],[' + REPLACE(RIGHT(CONVERT(VARCHAR(11), PU_DATE,106),8),' ','-')
FROM TEST_DATA GROUP BY REPLACE(RIGHT(CONVERT(VARCHAR(11), PU_DATE,106),8),' ','-')
ORDER BY CAST('01-'+ REPLACE(RIGHT(CONVERT(VARCHAR(11), PU_DATE,106),8),' ','-') AS DATETIME) FOR XML PATH('') ), 1, 2, '') + ']'
--PRINT @PIVOT_COLS
SET @PIVOT_QUERY = N'SELECT *'+ 'FROM ( SELECT * FROM (SELECT CONVERT(CHAR(3), PU_DATE, 0) + ''-'' + CAST(YEAR(PU_DATE) AS VARCHAR) PU_DATE,
SUM(X_COUNT) X_COUNT, SUM(Y_COUNT) Y_COUNT
FROM TEST_DATA WHERE PU_ID = COALESCE(' + CAST(@PU_ID AS VARCHAR) + ', PU_ID)
GROUP BY CONVERT(CHAR(3), PU_DATE, 0) + ''-'' + CAST(YEAR(PU_DATE) AS VARCHAR) ) TMP
UNPIVOT (COL FOR [GROUP] IN (X_COUNT, Y_COUNT) ) AS UNPVT ) PVT ' + 'PIVOT ' + '(MAX(COL) FOR PU_DATE IN (' + @PIVOT_COLS + ')) AS J'
--PRINT @PIVOT_QUERY
EXEC (@PIVOT_QUERY)
DROP TABLE DBO.TEST_DATA

You have:
SET @PU_ID = NULL
--SET @PU_ID = 28
And then:
FROM TEST_DATA WHERE PU_ID = COALESCE(' + CAST(@PU_ID AS VARCHAR) + ', PU_ID)
But since @PU_ID is NULL the result of the entire concatenation is NULL. The fact that you have a coalesce inside the SQL string has nothing to do with it. At the point the query string that is just a bunch of bytes.
Overall, don't inline parameters in your dynamic SQL strings. It comes with all sorts of problems, and this is one of them. Instead use parameterised SQL, which is a lot simpler. The @PIVOT_COLS you need to keep, since column names cannnot be parameterised,
but for all simple parameters, you should use, well, parameters.
CREATE TABLE TEST_DATA(PU_ID INT NOT NULL, PU_DATE DATE NOT NULL, X_COUNT INT NULL, Y_COUNT INT NULL)
INSERT INTO TEST_DATA VALUES(28, '2014-01-01', 10, 20), (28, '2014-01-02', 30, 20), (28, '2014-12-12', 10, 20), (28, '2015-02-02', 10, 20)
, (29, '2015-02-02', 10, 20), (29, '2015-02-02', 10, 20)
DECLARE @PIVOT_COLS NVARCHAR(1000), @PIVOT_QUERY NVARCHAR(2000)
DECLARE @PU_ID INT
SET @PU_ID = NULL
--SET @PU_ID = 28
SELECT @PIVOT_COLS = STUFF((SELECT '],[' + REPLACE(RIGHT(CONVERT(VARCHAR(11), PU_DATE,106),8),' ','-')
FROM TEST_DATA GROUP BY   REPLACE(RIGHT(CONVERT(VARCHAR(11), PU_DATE,106),8),' ','-')
ORDER BY CAST('01-'+ REPLACE(RIGHT(CONVERT(VARCHAR(11), PU_DATE,106),8),' ','-') AS DATETIME) FOR XML PATH('') ), 1, 2, '') + ']'
PRINT @PIVOT_COLS
SET @PIVOT_QUERY = N'SELECT *'+ 'FROM ( SELECT * FROM (SELECT CONVERT(CHAR(3), PU_DATE, 0) + ''-'' + CAST(YEAR(PU_DATE) AS VARCHAR) PU_DATE,
SUM(X_COUNT) X_COUNT, SUM(Y_COUNT) Y_COUNT
FROM TEST_DATA WHERE PU_ID = COALESCE(@PU_ID, PU_ID)
GROUP BY CONVERT(CHAR(3), PU_DATE, 0) + ''-'' + CAST(YEAR(PU_DATE) AS VARCHAR)  ) TMP
UNPIVOT (COL FOR [GROUP] IN (X_COUNT, Y_COUNT) ) AS UNPVT ) PVT ' + 'PIVOT ' + '(MAX(COL) FOR PU_DATE IN (' + @PIVOT_COLS + ')) AS J'
PRINT @PIVOT_QUERY
EXEC sp_executesql @PIVOT_QUERY, N'@PU_ID int', @PU_ID
go
DROP TABLE TEST_DATA
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • Why is XJC not generating any JAXB implementation files?

    I'm running xjc.exe on a Windows XP machine via a .bat file to generated the binding Java files for my .xsd file. JDK 1.6.0_16 is installed. The bat file looks like this:
    xjc.exe -p my.packagepath xsdfile.xsd
    Those aren't really the file and package names I'm using but you get the point. i run the .bat file and it runs without any error. It happily and without complaint generates a couple .java files in the my\packagepath directory. But that's it. There is no impl sub-directory being created at all. I've used JAXB on a project like this a couple years back and I see that the impl directory and a runtime folder with several more auto-generated files is there for that project. But it doesn't seem to be working now and I've forgotten how I got it to work last time. What am I missing or forgetting to do?

    From the Javadoc: 'Since the JAXB 2.0 specification has defined a portable runtime, it is no longer necessary for the JAXB RI to generate **/impl/runtime packages.'

  • Why row_number() is not generating continuous numbers

    Hello Experts,
    I have :
    selectrow_number()over(partitionbycityorderbydate)rno,
    but I get the following:
    rno
    1
    4
    7
    10
    14
    18
    20
    25
    28
    31
    33
    36
    39
    42
    Please advise me.

    Hi Jingyang,
    Please ignore my post.
    Best Regards,
    Sqlquery9
    Hello,
    So, is the issue resolved? Row_Number() should return a sequential number of a row within a partition of a result set.
    Reference:ROW_NUMBER (Transact-SQL)
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Miro line item not generated

    Dear All,
    I have facing one issue at the time posting in MIRO.
    I post one of migo doc in date 03/01/2010 , the entry is:( with same material )
    Post key   description  amt                               curr.( USD)
    89              Stk.RM -IMP                                     32100.00
    96              PL.VND.RM.IMP GR/IR                     32100.00
    40              Purchase RM-IMP                            32100.00
    50              Purchase offset.                             32100.00
    And Miro Posting on date 23/03/2010
    Post key   description  amt                               curr.( USD)
    31           xyz Vendor                                    32100.00
    86           PL.VND.RM.IMP GR/IR                    32100.oo
    89           Stk.RM -IMP                                    -
    40           Purchase RM-IMP                          -
    50           Purchase offset.                           -
    But when I post for another po in migo on date 03/01/2010
    Post key   description  amt                               curr.( USD)
    89              Stk.RM -IMP                                     76800.00
    96              PL.VND.RM.IMP GR/IR                     76800.00
    40              Purchase RM-IMP                            76800.00
    50              Purchase offset.                             76800.00
    and miro posting on date 19/02/2010
    Post key   description  amt                               curr.( USD)
    32            yz Vendor                                       76800.00
    86           PL.VND.RM.IMP GR/IR                      76800.00
    89           Stk.RM -IMP                                      Line item not generated
    40           Purchase RM-IMP                             Line item not generated
    50           Purchase offset.                              Line item not generated
    Can any one tell why line item not generated for miro posting .
    Regards
    Milind

    Hi,
    The extra line items will be generated when there are any exchange rate diffrences are there then only shows.
    Other wise it wont show those extra line items
    Please check group currency , global currency etc. for  your extra line items

  • XML Publisher question - Not generating a valid XML file

    I am working through an Oracle document that walks you through creating an XML Pub report. I am using HCM 8.9, Tools 8.49.15 and it has XML Pub installed and I have the Microsoft plug-in installed
    I have created a query and have downloaded an rtf template and now am on a page where you enter your data source and then click ‘Generate’ for the sample data file. I did it and it created ‘PERSONAL_DATA_PAY.XML’ which is created from a PS Query. However if I click on ‘PERSONAL_DATA_PAY.XML’ it generates a blocky text file that is not an XML file and I can’t go any further.
    Do you know why it’s not generating a valid XML file when I click on 'generate'?
    Thanks
    Allen H. Cunningham
    Data Base Administrator - Oracle/PeopleSoft
    Sonoma State University

    You mean to say that you create a new data source by specifying Data Source Type as 'PS Query' and Data Source ID as your query name, you are not able to generate a valid XML file (by clicking on Generate link).
    did you cross check your query by running it?
    On field change of Generate link, PeopleSoft uses PSXP_RPTDEFNMANAGER and PSXP_XMLGEN app packagaes and query objects to create the file
    It should work if you query is valid..

  • Not generating a spool output in the background job

    Hi Team,
    I have an alv report and If I schedule the program using SM36 transaction it is not generating the spool ouput.
    If I run the same program in background mode when we use se38 and select execute in background in program menu and it works successfully and generates alv grid list in the spool output.
    But, user wants to schedule the job in sm36 and check the same output in spool. Please advise why it is not generating.
    Note:I am using the cl_salv_table=>factory method to generate the output.
    Thanks in advance,
    Sunil Kumar.

    This is not really an ABAP question and you might want to ask your Basis admin for assistance. But I believe that spool will not be generated if you don't specify print parameters for a step. When you define the step in SM36, make sure to specify the print parameters.

  • URGENT*** Test Client testpoint not generated in WebLogic 10.3.0.0

    Hi,
    I have created very basic "Java EE 1.5 with support for jax-ws Annotations" web service and deploying in to web logic server 10.3.0.0. I am using Jdeveloper 11g for convert my java file to web service and deploying the same in to WLS directly from Jdev IDE.
    Problem is, I cant able to see "Test Client" testPoint in order to test my webservice. When I access my web service via WLS admin console can able to see only "?WSDL" test point at TESTING tab and WSDL is accessible. But Test client is not getting generated.
    Please help me, what am I missing here, why the WLServer not generating the test client. Am I missing any setting at server side. Please help me. Below is my web service code.
    package edu.ws;
    import javax.jws.WebService;
    *@WebService(serviceName = "demoWS", portName = "demoWSSoapHttpPort")*
    public class demoWS
    public demoWS()
    public String fullName(String fn, String ln)
    String fullName = fn + ln;
    return fullName;
    WSDL file:
    *<!--*
    Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt).
    -->
    *<!--*
    Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt).
    -->
    *<definitions targetNamespace="http://ws.syu.edu/" name="demoWS">*
    *<types>*
    *<xsd:schema>*
    *<xsd:import namespace="http://ws.syu.edu/" schemaLocation="http://192.168.88.131:7001/DemoWebService-DemoWS-context-root/demoWSSoapHttpPort?xsd=1"/>*
    *</xsd:schema>*
    *</types>*
    *<message name="fullName">*
    *<part name="parameters" element="tns:fullName"/>*
    *</message>*
    *<message name="fullNameResponse">*
    *<part name="parameters" element="tns:fullNameResponse"/>*
    *</message>*
    *<portType name="demoWS">*
    *<operation name="fullName">*
    *<input message="tns:fullName"/>*
    *<output message="tns:fullNameResponse"/>*
    *</operation>*
    *</portType>*
    *<binding name="demoWSSoapHttpPortBinding" type="tns:demoWS">*
    *<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>*
    *<operation name="fullName">*
    *<soap:operation soapAction=""/>*
    *<input>*
    *<soap:body use="literal"/>*
    *</input>*
    *<output>*
    *<soap:body use="literal"/>*
    *</output>*
    *</operation>*
    *</binding>*
    *<service name="demoWS">*
    *<port name="demoWSSoapHttpPort" binding="tns:demoWSSoapHttpPortBinding">*
    *<soap:address location="http://192.168.88.131:7001/DemoWebService-DemoWS-context-root/demoWSSoapHttpPort"/>*
    *</port>*
    *</service>*
    *</definitions>*
    Thanks
    klogube

    Hi LJ,
    I did the same. I configured my WLS for development mode by making production_mode = false. But still I cant able to open http://localhost:7001/wls_utc window and so far cant able to test my WS :(
    Please check my config file and let me know where else I suppose to make the production mode false!!
    #!/bin/sh
    # WARNING: This file is created by the Configuration Wizard.
    # Any changes to this script may be lost when adding extensions to this configuration.
    # --- Start Functions ---
    BP=100
    SP=$BP
    pushd()
         if [ -z "$1" ]
         then
              return
         fi
         SP=`expr $SP - 1`
         eval _stack$SP=`pwd`
         cd $1
         return
    popd()
         if [ $SP -eq $BP ]
         then
              return
         fi
         eval cd \${_stack$SP}
         SP=`expr $SP + 1`
         return
    # --- End Functions ---
    # This script is used to setup the needed environment to be able to start Weblogic Server in this domain.
    # This script initializes the following variables before calling commEnv to set other variables:
    # WL_HOME - The BEA home directory of your WebLogic installation.
    # JAVA_VM - The desired Java VM to use. You can set this environment variable before calling
    # this script to switch between Sun or BEA or just have the default be set.
    # JAVA_HOME - Location of the version of Java used to start WebLogic
    # Server. Depends directly on which JAVA_VM value is set by default or by the environment.
    # USER_MEM_ARGS - The variable to override the standard memory arguments
    # passed to java.
    # PRODUCTION_MODE - The variable that determines whether Weblogic Server is started in production mode.
    # DOMAIN_PRODUCTION_MODE
    # - The variable that determines whether the workshop related settings like the debugger,
    # testconsole or iterativedev should be enabled. ONLY settable using the
    # command-line parameter named production
    # NOTE: Specifying the production command-line param will force
    # the server to start in production mode.
    # Other variables used in this script include:
    # SERVER_NAME - Name of the weblogic server.
    # JAVA_OPTIONS - Java command-line options for running the server. (These
    # will be tagged on to the end of the JAVA_VM and
    # MEM_ARGS)
    # For additional information, refer to the WebLogic Server Administration
    # Console Online Help(http://e-docs.bea.com/wls/docs103/ConsoleHelp/startstop.html).
    ORACLE_HOME="/opt/oracle/middleware/jdeveloper"
    export ORACLE_HOME
    WL_HOME="/opt/oracle/middleware/wlserver_10.3"
    export WL_HOME
    BEA_JAVA_HOME="/opt/oracle/middleware/jrockit_160_05"
    export BEA_JAVA_HOME
    SUN_JAVA_HOME=""
    export SUN_JAVA_HOME
    if [ "${JAVA_VENDOR}" = "BEA" ] ; then
         JAVA_HOME="${BEA_JAVA_HOME}"
         export JAVA_HOME
    else
         if [ "${JAVA_VENDOR}" = "Sun" ] ; then
              JAVA_HOME="${SUN_JAVA_HOME}"
              export JAVA_HOME
         else
              JAVA_VENDOR="BEA"
              export JAVA_VENDOR
              JAVA_HOME="/opt/oracle/middleware/jrockit_160_05"
              export JAVA_HOME
         fi
    fi
    # We need to reset the value of JAVA_HOME to get it shortened AND
    # we can not shorten it above because immediate variable expansion will blank it
    JAVA_HOME="${JAVA_HOME}"
    export JAVA_HOME
    SAMPLES_HOME="${WL_HOME}/samples"
    export SAMPLES_HOME
    DOMAIN_HOME="/opt/oracle/middleware/user_projects/domains/base_domain"
    export DOMAIN_HOME
    LONG_DOMAIN_HOME="/opt/oracle/middleware/user_projects/domains/base_domain"
    export LONG_DOMAIN_HOME
    if [ "${DEBUG_PORT}" = "" ] ; then
         DEBUG_PORT="8453"
         export DEBUG_PORT
    fi
    if [ "${SERVER_NAME}" = "" ] ; then
         SERVER_NAME="AdminServer"
         export SERVER_NAME
    fi
    POINTBASE_FLAG="false"
    export POINTBASE_FLAG
    enableHotswapFlag=""
    export enableHotswapFlag
    PRODUCTION_MODE="false"
    export PRODUCTION_MODE
    doExitFlag="false"
    export doExitFlag
    verboseLoggingFlag="false"
    export verboseLoggingFlag
    while [ $# -gt 0 ]
    do
         case $1 in
         nodebug)
              debugFlag="false"
              export debugFlag
         production)
              DOMAIN_PRODUCTION_MODE="true"
              export DOMAIN_PRODUCTION_MODE
         notestconsole)
              testConsoleFlag="false"
              export testConsoleFlag
         noiterativedev)
              iterativeDevFlag="false"
              export iterativeDevFlag
         noLogErrorsToConsole)
              logErrorsToConsoleFlag="false"
              export logErrorsToConsoleFlag
         nopointbase)
              POINTBASE_FLAG="false"
              export POINTBASE_FLAG
         doExit)
              doExitFlag="true"
              export doExitFlag
         noExit)
              doExitFlag="false"
              export doExitFlag
         verbose)
              verboseLoggingFlag="true"
              export verboseLoggingFlag
         enableHotswap)
              enableHotswapFlag="-javaagent:${WL_HOME}/server/lib/diagnostics-agent.jar"
              export enableHotswapFlag
              PROXY_SETTINGS="${PROXY_SETTINGS} $1"
              export PROXY_SETTINGS
         esac
         shift
    done
    MEM_DEV_ARGS=""
    export MEM_DEV_ARGS
    if [ "${DOMAIN_PRODUCTION_MODE}" = "true" ] ; then
         PRODUCTION_MODE="${DOMAIN_PRODUCTION_MODE}"
         export PRODUCTION_MODE
    fi
    if [ "${PRODUCTION_MODE}" = "true" ] ; then
         debugFlag="false"
         export debugFlag
         testConsoleFlag="false"
         export testConsoleFlag
         iterativeDevFlag="false"
         export iterativeDevFlag
    fi
    # If you want to override the default Patch Classpath, Library Path and Path for this domain,
    # Please uncomment the following lines and add a valid value for the environment variables
    # set PATCH_CLASSPATH=[myPatchClasspath] (windows)
    # set PATCH_LIBPATH=[myPatchLibpath] (windows)
    # set PATCH_PATH=[myPatchPath] (windows)
    # PATCH_CLASSPATH=[myPatchClasspath] (unix)
    # PATCH_LIBPATH=[myPatchLibpath] (unix)
    # PATCH_PATH=[myPatchPath] (unix)
    . ${WL_HOME}/common/bin/commEnv.sh
    WLS_HOME="${WL_HOME}/server"
    export WLS_HOME
    MEM_ARGS="-Xms256m -Xmx512m"
    export MEM_ARGS
    MEM_PERM_SIZE="-XX:PermSize=48m"
    export MEM_PERM_SIZE
    MEM_MAX_PERM_SIZE="-XX:MaxPermSize=192m"
    export MEM_MAX_PERM_SIZE
    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
         if [ "${PRODUCTION_MODE}" = "" ] ; then
              MEM_DEV_ARGS="-XX:CompileThreshold=8000 ${MEM_PERM_SIZE} "
              export MEM_DEV_ARGS
         fi
    fi
    # Had to have a separate test here BECAUSE of immediate variable expansion on windows
    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
         MEM_ARGS="${MEM_ARGS} ${MEM_DEV_ARGS} ${MEM_MAX_PERM_SIZE}"
         export MEM_ARGS
    fi
    if [ "${JAVA_VENDOR}" = "HP" ] ; then
         MEM_ARGS="${MEM_ARGS} ${MEM_MAX_PERM_SIZE}"
         export MEM_ARGS
    fi
    # IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS values
    if [ "${USER_MEM_ARGS}" != "" ] ; then
         MEM_ARGS="${USER_MEM_ARGS}"
         export MEM_ARGS
    fi
    JAVA_PROPERTIES="-Dplatform.home=${WL_HOME} -Dwls.home=${WLS_HOME} -Dweblogic.home=${WLS_HOME} "
    export JAVA_PROPERTIES
    # To use Java Authorization Contract for Containers (JACC) in this domain,
    # please uncomment the following section. If there are multiple machines in
    # your domain, be sure to edit the setDomainEnv in the associated domain on
    # each machine.
    # -Djava.security.manager
    # -Djava.security.policy=location of weblogic.policy
    # -Djavax.security.jacc.policy.provider=weblogic.security.jacc.simpleprovider.SimpleJACCPolicy
    # -Djavax.security.jacc.PolicyConfigurationFactory.provider=weblogic.security.jacc.simpleprovider.PolicyConfigurationFactoryImpl
    # -Dweblogic.security.jacc.RoleMapperFactory.provider=weblogic.security.jacc.simpleprovider.RoleMapperFactoryImpl
    EXTRA_JAVA_PROPERTIES="-Ddomain.home=${DOMAIN_HOME} -Doracle.home=${ORACLE_HOME} -Doracle.security.jps.config=${DOMAIN_HOME}/config/oracle/jps-config.xml -Doracle.dms.context=OFF -Djava.protocol.handler.pkgs=oracle.mds.net.protocol ${EXTRA_JAVA_PROPERTIES}"
    export EXTRA_JAVA_PROPERTIES
    JAVA_PROPERTIES="${JAVA_PROPERTIES} ${EXTRA_JAVA_PROPERTIES}"
    export JAVA_PROPERTIES
    ARDIR="${WL_HOME}/server/lib"
    export ARDIR
    pushd ${LONG_DOMAIN_HOME}
    # Clustering support (edit for your cluster!)
    if [ "${ADMIN_URL}" = "" ] ; then
         # The then part of this block is telling us we are either starting an admin server OR we are non-clustered
         CLUSTER_PROPERTIES="-Dweblogic.management.discover=true"
         export CLUSTER_PROPERTIES
    else
         CLUSTER_PROPERTIES="-Dweblogic.management.discover=false -Dweblogic.management.server=${ADMIN_URL}"
         export CLUSTER_PROPERTIES
    fi
    if [ "${LOG4J_CONFIG_FILE}" != "" ] ; then
         JAVA_PROPERTIES="${JAVA_PROPERTIES} -Dlog4j.configuration=file:${LOG4J_CONFIG_FILE}"
         export JAVA_PROPERTIES
    fi
    JAVA_PROPERTIES="${JAVA_PROPERTIES} ${CLUSTER_PROPERTIES}"
    export JAVA_PROPERTIES
    # Clear the pre_classpath here in case an application template wants to set it before the larger pre_classpath is invoked below
    PRE_CLASSPATH=""
    export PRE_CLASSPATH
    JAVA_DEBUG=""
    export JAVA_DEBUG
    if [ "${debugFlag}" = "true" ] ; then
         JAVA_DEBUG="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=${DEBUG_PORT},server=y,suspend=n -Djava.compiler=NONE"
         export JAVA_DEBUG
         JAVA_OPTIONS="${JAVA_OPTIONS} ${enableHotswapFlag} -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole..."
         export JAVA_OPTIONS
    else
         JAVA_OPTIONS="${JAVA_OPTIONS} ${enableHotswapFlag} -da"
         export JAVA_OPTIONS
    fi
    if [ ! -d ${JAVA_HOME}/lib ] ; then
         echo "The JRE was not found in directory ${JAVA_HOME}. (JAVA_HOME)"
         echo "Please edit your environment and set the JAVA_HOME"
         echo "variable to point to the root directory of your Java installation."
         popd
         read _val
         exit
    fi
    if [ "${POINTBASE_FLAG}" = "true" ] ; then
         DATABASE_CLASSPATH="${POINTBASE_CLASSPATH}"
         export DATABASE_CLASSPATH
    else
         DATABASE_CLASSPATH="${POINTBASE_CLIENT_CLASSPATH}"
         export DATABASE_CLASSPATH
    fi
    POST_CLASSPATH=""
    export POST_CLASSPATH
    POST_CLASSPATH="${ORACLE_HOME}/modules/features/adf.share_11.1.1.jar${CLASSPATHSEP}${POST_CLASSPATH}"
    export POST_CLASSPATH
    POST_CLASSPATH="${POST_CLASSPATH}${CLASSPATHSEP}${DATABASE_CLASSPATH}${CLASSPATHSEP}${ARDIR}/xqrl.jar"
    export POST_CLASSPATH
    # PROFILING SUPPORT
    JAVA_PROFILE=""
    export JAVA_PROFILE
    SERVER_CLASS="weblogic.Server"
    export SERVER_CLASS
    JAVA_PROPERTIES="${JAVA_PROPERTIES} ${WLP_JAVA_PROPERTIES}"
    export JAVA_PROPERTIES
    JAVA_OPTIONS="${JAVA_OPTIONS} ${JAVA_PROPERTIES} -Dwlw.iterativeDev=${iterativeDevFlag} -Dwlw.testConsole=${testConsoleFlag} -Dwlw.logErrorsToConsole=${logErrorsToConsoleFlag}"
    export JAVA_OPTIONS
    # -- Setup properties so that we can save stdout and stderr to files
    if [ "${WLS_STDOUT_LOG}" != "" ] ; then
         echo "Logging WLS stdout to ${WLS_STDOUT_LOG}"
         JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.Stdout=${WLS_STDOUT_LOG}"
         export JAVA_OPTIONS
    fi
    if [ "${WLS_STDERR_LOG}" != "" ] ; then
         echo "Logging WLS stderr to ${WLS_STDERR_LOG}"
         JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.Stderr=${WLS_STDERR_LOG}"
         export JAVA_OPTIONS
    fi
    # ADD EXTENSIONS TO CLASSPATHS
    if [ "${EXT_PRE_CLASSPATH}" != "" ] ; then
         PRE_CLASSPATH="${EXT_PRE_CLASSPATH}${CLASSPATHSEP}${PRE_CLASSPATH}"
         export PRE_CLASSPATH
    fi
    if [ "${EXT_POST_CLASSPATH}" != "" ] ; then
         POST_CLASSPATH="${POST_CLASSPATH}${CLASSPATHSEP}${EXT_POST_CLASSPATH}"
         export POST_CLASSPATH
    fi
    if [ "${WEBLOGIC_EXTENSION_DIRS}" != "" ] ; then
         JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.ext.dirs=${WEBLOGIC_EXTENSION_DIRS}"
         export JAVA_OPTIONS
    fi
    JAVA_OPTIONS="${JAVA_OPTIONS}"
    export JAVA_OPTIONS
    # SET THE CLASSPATH
    CLASSPATH="${PRE_CLASSPATH}${CLASSPATHSEP}${WEBLOGIC_CLASSPATH}${CLASSPATHSEP}${POST_CLASSPATH}${CLASSPATHSEP}${WLP_POST_CLASSPATH}"
    export CLASSPATH
    JAVA_VM="${JAVA_VM} ${JAVA_DEBUG} ${JAVA_PROFILE}"
    export JAVA_VM
    Edited by: klogube on Oct 23, 2009 10:58 AM

  • Payment proposal not generated throgh f110

    Hi FI Gurus,
    My problem will understand with the following scenario:
    I have one vendor having debit balance of 5000 and have many debit and credit trsanction including down payment of 6000.
    I haven't clear down payment through F-54.
    I executed f110, after payment proposal saving, I want to open to see payment proposal list but it was throwing message  like  "  Company codes xxx/xxxx do not appear in proposal 21.12.2009 xxxx; correct".
    Could you tell me reason why payment proposal not generated.  Or this may be because of overall this vendor has debit balance.
    Thanks in Advance.
    Regards,
    Prakash

    Hi,
    Some times this message comes if vendor or document (intend to clear) is locked under some other payment proposal.
    I would suggest check previously created payment runs and find out where the proposal run is not complete successfully.
    If you find any such entry then ask user either to complete this run or delete the proposal then parameters. Later create a fresh proposal & payment run.
    Please let me know if it helps!!
    Regards,

  • SAP Query not generated after upgrade

    Hi All,
    Our client has upgraded from 4.6c to ECC 6.0
    In the upgraded server some SAP Queries have not been generated…and others have generated. I wanted to know why all are not generated….
    I also wanted to know if any table name exists which maintains query with generated program name…
    Please let me know your learning’s on SAP Query if any…
    Thanks in advance

    These generated program names are stored in AQLDB for local area and AQGDB for global area. Usually these program names will include the infoset names and the query names.

  • Fi Document is not generating in MIGO for multiple account assignment in PO

    Hi,
    I have have created  asset po DG set 111 quanity is 4, i have created 4 different assets and assign quanity 1 to each dg sets in account assignment. While doing GRN system is not generating FI document for this po. if  i am giving one quanity or single account assignment for as 4 then it is generating FI quantity.
    PLease help me out why system is not generating FI document for multiple accont assignment in MIGO.
    Thanks in advance
    KISHORE

    Hi
    There is no option if you are not on EhP4... Do MIRO and see if the FI doc is generated
    Only way is to do MIRO immediately after MIGO.. OR Schedule ERS (Evaluated Receipt Settlement) which runs every hour in the background so that MIRO is posted automatically based on MIGO document.... Basically, you have to do MIRO after MIGO.. Whether you do it manually or through ERS is a matter of choice
    Regards
    Ajay M

  • Spool not generated in BAckground Job

    Hi,
    I am trying to schedule RSNAST00 in a background job. My problem is that when the job gets finished i cannot see a spool for the output, any pointers to this issue will be appreciated.
    Regards,
    Sharadendu

    Go to transaction SM37 and check job log.
    It is possible that something is going wrong in your program. I would suggest you to debugg background job.
    To debugg just select job in SM37 and in command window(Where we type T codes) type JDBG and press enter. This will open debugger. Press F7 for approx 4-5 times. Now your program will be opened in debugg and you check why spool is not generated.
    let me know ig this helps.
    Regards,
    Jigar Thakkar.

  • Business Partner ID in Org structure Not generated

    Hi,
    when i am creating a New Department(Org.unit) in My Org Structure ,system is not generating a Bussiness partner ID number.
    If system is not generating the number will there be any problem if i move ahead.
    do let me know why system is not generating the Number
    regards
    subhash

    Hi Subhash,
    As you said BP will be generated successfully for the dept if you fill the all address correctly .otherwise not. so request you fill all address data include mail also and save and see bp would have cretaed. mail if you dont get BP.
    regards
    Muthu

  • Job finished successfully but Spool not generated(no spool icon)

    I am generating a report which . When the program in scheduled, the job completed successfully but spool icon is not available. Could any one suggest us the reason why spool has not generated. Thanks in advance!

    Hi,
    When executing report, Spool gets generated only when an Output is generated. Please check if output exits for the selection criteria.
    Also check any special mechanisms are used that diverse the ouput when executed in background.

  • SAP ABAP Query not generated after upgrade

    Hi All,
    Our client has upgraded from 4.6c to ECC 6.0
    In the upgraded server some SAP Queries have not been generated…and others have generated. I wanted to know why all are not generated….
    I also wanted to know if any table name exists which maintains query with generated program name…
    Please let me know your learning’s on SAP/ABAP Query if any…
    Thanks in advance

    I forgot to mention that FM will just give u the report name..wont generate it.
    I dont think the report name is saved in any tables... it is generated ...
    but u can derive the report name..if u know the user group and query name.. by concatenating those ..
    for details..look into the code for that FM

  • Dump not generating after unexpected shutdown of 2008 VM

    Hi,
    I am facing issue with my server, server is getting unexpected shutdown , this is virtual server created on VMware environment. I have checked memory dump settings are
    enabled on server  but it is not generating any type of dump.<o:p></o:p>
    below are the registry configured on server<o:p></o:p>
    HLM\System\currentcontrolset\crashcontrol\
    dumpfile-> %systemroot%MEMORY.DMP
    minidumpDir->%systemroot%minidump<o:p></o:p>
    Can someone help me on this why dump are not generating this server and what are the possible reason for dump not generated.<o:p></o:p>
    Regards, Triyambak

    yes, path is correct and it is %systemroot%\MEMORY.DMP
    so no issue with registry configuration , so what would be the issue ! 
    Regards, Triyambak

Maybe you are looking for

  • Difference between Types of reports

    HI GURUS.,                In SAP we have differenr reports ,can u please say the difference between standard analasys,flexible reports,early warning reports Thanks in advance Narayana Message was edited by:         manam narayana Message was edited b

  • Email server automatica​lly updates itself

    I manually input the email server information for my Exchange Server into the 'incoming mail server' settings.  It syncs, and some emails download.  Then they stop... I go back to the incoming mail server information, and it's a different mail server

  • Activate Add Row Menu

    Dear Experts, How to activate the Data->Add Row, Delete Row for User matrix in user form Regards, Mathi

  • Three server farm set up

    i am having three boxes where  in the first 2 boxes  sp 2013  been installed, and i wanna implement the index/crawl server on the second box and  first box being appln server and  3rd box being the db server. would like to know how to implement my se

  • Preselect an option in html:select

    Hey, I am implementing struts in my application. How do i preselect an option in <html:select> tag here is what i am doing but the option does not get preselected.. the collection below returns A, B , C etc.. <html:select property="accountClass" name