Dynamic query not working

hi
im using a dynamic query to put in an internal table but its not working
Can you see whats wrong in that?
gv_query = ' au~uname AS OTCTUSERNM,'.
CONCATENATE gv_query  'a1object' '.' 'a1field'  ' AS  0TCTAUTH'  INTO gv_query.
CONCATENATE gv_query  'au~to_dat AS OTCTADTO, OTCTOBJNM, ' INTO gv_query.
SELECT DISTINCT (gv_query)
  INTO CORRESPONDING FIELDS OF TABLE gi_ds1
  FROM agr_users AS au INNER JOIN
  agr_1251 AS a1
  ON auagr_name = a1agr_name.

Hello,
Following are the observations:
1. gv_query = ' au~uname AS OTCTUSERNM,'.
>> In above string i think you want to use uname column as OTCTUSERNM and it is correct
2. CONCATENATE gv_query 'a1object' '.' 'a1field' ' AS 0TCTAUTH' INTO
    gv_query.
>> In statement 2 above I am not able to understand whey 'a1object' '.' 'a1field'  this is incorrect.
     Also '.' (dot) in not required in query it will be either '~' or 'AS' as valid chars.
3. CONCATENATE gv_query 'au~to_dat AS OTCTADTO, OTCTOBJNM, ' INTO gv_query.
>> In statement 3 above whey OTCTOBJNM is used there is no such column exit in AGR_USERS.
4. SELECT DISTINCT (gv_query)
    INTO CORRESPONDING FIELDS OF TABLE gi_ds1
    FROM agr_users AS au INNER JOIN
    agr_1251 AS a1
    ON auagr_name = a1agr_name.
>> In above statement a1 is used as alias for AGR_USERS then why it it not there in statement 3 where instead au is used.
Normarlly query is like this
'<alias1><col_name1> as <col_desc1>, <alias2><col_name2> as <col_desc2>......up to n cols
In this case it is possible that alias1 and alias2 are used for different table in case of joins and for same table in case of self joins.
Finally, You can only define colums in dynamic query those are available in the table from which we have to select the data.
Hope this helps.
Thanks,
Augustin.

Similar Messages

  • Cancel Query not working

    Problem Summary
    Cancel Query not working on 11.5.10
    Problem Description
    While finding orders, window pops up the cancel query but when user tries to click the cancel button, query does not cancel.

    jemar98 wrote:
    Problem Summary
    Cancel Query not working on 11.5.10
    Problem Description
    While finding orders, window pops up the cancel query but when user tries to click the cancel button, query does not cancel.Please post the details of the application release, database version and OS.
    Was this working before? If yes, any changes been done recently?
    Please review (Canceling Long Running Queries in Oracle Applications 11i [ID 138159.1]) and make sure you complete all the steps.
    Thanks,
    Hussein

  • Oracle date parameter query not working?

    http://stackoverflow.com/questions/14539489/oracle-date-parameter-query-not-working
    Trying to run the below query, but always fails even though the parameter values matches. I'm thinking there is a precision issue for :xRowVersion_prev parameter. I want too keep as much precision as possible.
    Delete
    from CONCURRENCYTESTITEMS
    where ITEMID = :xItemId
    and ROWVERSION = :xRowVersion_prev
    The Oracle Rowversion is a TimestampLTZ and so is the oracle parameter type.
    The same code & query works in Sql Server, but not Oracle.
    Public Function CreateConnection() As IDbConnection
    Dim sl As New SettingsLoader
    Dim cs As String = sl.ObtainConnectionString
    Dim cn As OracleConnection = New OracleConnection(cs)
    cn.Open()
    Return cn
    End Function
    Public Function CreateCommand(connection As IDbConnection) As IDbCommand
    Dim cmd As OracleCommand = DirectCast(connection.CreateCommand, OracleCommand)
    cmd.BindByName = True
    Return cmd
    End Function
    <TestMethod()>
    <TestCategory("Oracle")> _
    Public Sub Test_POC_Delete()
    Dim connection As IDbConnection = CreateConnection()
    Dim rowver As DateTime = DateTime.Now
    Dim id As Decimal
    Using cmd As IDbCommand = CreateCommand(connection)
    cmd.CommandText = "insert into CONCURRENCYTESTITEMS values(SEQ_CONCURRENCYTESTITEMS.nextval,'bla bla bla',:xRowVersion) returning ITEMID into :myOutputParameter"
    Dim p As OracleParameter = New OracleParameter
    p.Direction = ParameterDirection.ReturnValue
    p.DbType = DbType.Decimal
    p.ParameterName = "myOutputParameter"
    cmd.Parameters.Add(p)
    Dim v As OracleParameter = New OracleParameter
    v.Direction = ParameterDirection.Input
    v.OracleDbType = OracleDbType.TimeStampLTZ
    v.ParameterName = "xRowVersion"
    v.Value = rowver
    cmd.Parameters.Add(v)
    cmd.ExecuteNonQuery()
    id = CType(p.Value, Decimal)
    End Using
    Using cmd As IDbCommand = m_DBTypesFactory.CreateCommand(connection)
    cmd.CommandText = " Delete from CONCURRENCYTESTITEMS where ITEMID = :xItemId and ROWVERSION = :xRowVersion_prev"
    Dim p As OracleParameter = New OracleParameter
    p.Direction = ParameterDirection.Input
    p.DbType = DbType.Decimal
    p.ParameterName = "xItemId"
    p.Value = id
    cmd.Parameters.Add(p)
    Dim v As OracleParameter = New OracleParameter
    v.Direction = ParameterDirection.Input
    v.OracleDbType = OracleDbType.TimeStampLTZ
    v.ParameterName = "xRowVersion_prev"
    v.Value = rowver
    v.Precision = 6 '????
    cmd.Parameters.Add(v)
    Dim cnt As Integer = cmd.ExecuteNonQuery()
    If cnt = 0 Then Assert.Fail() 'should delete
    End Using
    connection.Close()
    End Sub
    Schema:
    -- ****** Object: Table SYSTEM.CONCURRENCYTESTITEMS Script Date: 1/26/2013 11:56:50 AM ******
    CREATE TABLE "CONCURRENCYTESTITEMS" (
    "ITEMID" NUMBER(19,0) NOT NULL,
    "NOTES" NCHAR(200) NOT NULL,
    "ROWVERSION" TIMESTAMP(6) WITH LOCAL TIME ZONE NOT NULL)
    STORAGE (
    NEXT 1048576 )
    Sequence:
    -- ****** Object: Sequence SYSTEM.SEQ_CONCURRENCYTESTITEMS Script Date: 1/26/2013 12:12:48 PM ******
    CREATE SEQUENCE "SEQ_CONCURRENCYTESTITEMS"
    START WITH 1
    CACHE 20
    MAXVALUE 9999999999999999999999999999

    still not comming...
    i have one table each entry is having only one fromdata and one todate only
    i am running below in sql it is showing two rows. ok.
      select t1.U_frmdate,t1.U_todate  ,ISNULL(t2.firstName,'')+ ',' +ISNULL(t2.middleName ,'')+','+ISNULL(t2.lastName,'') AS NAME, T2.empID  AS EMPID, T2.U_emp AS Empticket,t2.U_PFAcc,t0.U_pf 
       from  [@PR_PRCSAL1] t0 inner join [@PR_OPRCSAL] t1
       on t0.DocEntry = t1.DocEntry
       inner join ohem t2
       on t2.empID = t0.U_empid  where  t0.U_empid between  '830' and  '850'  and t1.U_frmdate ='20160801'  and  t1.u_todate='20160830'
    in commond promt
      select t1.U_frmdate,t1.U_todate  ,ISNULL(t2.firstName,'')+ ',' +ISNULL(t2.middleName ,'')+','+ISNULL(t2.lastName,'') AS NAME, T2.empID  AS EMPID, T2.U_emp AS Empticket,t2.U_PFAcc,t0.U_pf 
       from  [@PR_PRCSAL1] t0 inner join [@PR_OPRCSAL] t1
       on t0.DocEntry = t1.DocEntry
       inner join ohem t2
       on t2.empID = t0.U_empid  where  t0.U_empid between  {?FromEmid} and  {?ToEmid} and t1.U_frmdate ={?FDate} and  t1.u_todate={?TDate}
    still not showing any results..

  • Why Does Dynamic Link Not Work

    I purchased the CS5 Adobe Production Premium.  I have been working in Premiere and I have been learning about how to use Dynamic Link. I want to be able to alter clips in After Effects and bring them back and forth into Premiere.  When I go to File/ Adobe Dynamic Link/New After Effect Composition, I get this message:
    Adobe Dynamic Link Requires Adobe Production Premium.
    Since I own production premium, I do not know why I am getting this message.  I have reinstalled the CS5 Production Premium Software twice and it still gives me the same message.  What can I do to get Dynamic Link Working.

    Thank you for the tip.  Could you possibly tell me how to deactivate and
    then reactivate the suite.  I am using a Macbook Pro laptop running OS
    10.6.4.  I do not even know where to start.
    From:   Colin Brougham <[email protected]>
    To:     Dan Seanor <[email protected]>
    Date:   03/15/2011 09:55 AM
    Subject:        Why Does Dynamic Link Not Work
    Deactivate the software (not uninstall), and then reactivate the suite.
    This often fixes this. You can opt to leave the serial number on the
    system; no need to clear it and re-enter it.

  • Dynamic conversion not working if SSEnableDirectDelivery is set to true

    hi experts,
    In our site, we have downloadable pdfs,docs,videos etc. So in order to achieve this, we have used following configuration :
    SSEnableDirectDelivery=true
    SSDirectDeliveryExtensions=pdf,doc,ppt,jpg,gif,docx,pptx,gif,png,tif,eps,dot,html,zip,swf,exe,xls,xlsx,flv,mp3,mp4,fla,ppsx
    Now, we have planned to use dynamic converter to convert word douments into HTML and display on site for Press Releases. As we have enabled SSEnableDirectDelivery, Dynamic conversion is not working.
    we have a dynamic list on Primary Layout (hcsp template) that displays list of Press Releases. When we click on Press Release link, the word documents start downloading......
    the steps are as follows :
    1. Added SSEnableDirectDelivery=true and SSDirectDeliveryExtensions=pdf,doc,docx to config.cfg . Restarted the UCM server .
    2. Added Dynamic List Plain fragment to a section of the site . Set the query to retrieve all the contents with extension .doc
    3. Launched the site from a browser and the section where DL was added . This listed the word documents (extension with .doc)
    4. Selected the word doc and see that it is being downloaded .
    I also tired following :
    <!--$xml(dDocTitle)-->
    it is working fine but issue is that URL in browser changed to http://example.com/idcplg?IdcService=GET_DYNAMIC_CONVERSION&RevisionSelectionMethod=LatestReleased&dDocName=id_003461
    I dont want to expose this url, i want to show the friendly URL in Browser
    e.g
    http://exmaple.com/corporate/press-release/P09082010.html
    please help!!!!!!!!!

    help please

  • Retraction query not working BI7

    Hello,
    I am using a BI7 query so that it can be used for retraction back to R3. One of the variables is not being picked up by the Retraction program. The error code is E RSCR 263: Dynamic variables are not supported with 0DB0. There is a sap note 973676 which is supposed to fix the problem, but on investigation sap tell us that this oss note has been applied to our system. Has anyone got any ideas?
    many thanks,
    Dave

    After some investigation, I have narrowed it down to the variable. We were using variables that had been created in the BW 3.5 environment and ones that had been created in the BI7 environment in a query that had been created in the BI7 environment. The query that caused the problem would not work when in the basic settings "Variable represents" was multiple Single Values.If this was created withe the setting of Selection option then it worked. I guess it must be a bug in BI7,
    many thanks,
    Dave

  • Inline transform for Sql Query not working in SAP MII 12.1 Version 12.1.8 B

    Hi All,
    I applied an xslt for an sql query which returns an xml file.
    I used inline transform icon in sql query to load an xsl file which has to return me a string
    Any idea why is not working for me..?
    My Sample XML file:
                                     <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="/XMII/CM/BatchDisposition/BatchQueueManagement/StyleSheets/ProductXsl.xsl"?>
    <Rowsets DateCreated="2011-05-05T07:27:45" EndDate="2011-05-05T07:27:45" StartDate="2011-05-05T06:27:45" Version="12.1.8 Build(20)">
         <Rowset>
              <Columns>
                   <Column Description="ProductName" MaxRange="1" MinRange="0" Name="ProductName" SQLDataType="12" SourceColumn="ProductName"/>
              </Columns>
              <Row>
                   <ProductName>Asprin 100mg Tablets 12 x10 strip</ProductName>
              </Row>
              <Row>
                   <ProductName>Asprin 300mg Tablets 12 x10 strip</ProductName>
              </Row>
              <Row><ProductName>Ibprooven 200mg Tablets 12 x 10 strip</ProductName></Row>
              <Row><ProductName>RipTide 50mg Tablets 40 x10 strip</ProductName></Row>
              <Row><ProductName>Seroquel 200mg Tablets 6 x10 strip</ProductName></Row>
              <Row><ProductName>Seroquel 400mg Tablets 12 x10 strip</ProductName></Row>
         </Rowset>
    </Rowsets>
    My Sample XSl File:
                                    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
         <xsl:text>["</xsl:text>
         <xsl:for-each select="Rowsets/Rowset/Row">
              <xsl:value-of select="ProductName"/>
              <xsl:if test="position() &lt; last()">
                   <xsl:text>","</xsl:text>
                    </xsl:if>
              <xsl:if test="position()=last()">
                           <xsl:text>"]</xsl:text>
                    </xsl:if>
         </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    Any Suggestions  are Welcome:
    Thanks

    Something like this should work...
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="/">
              <Rowsets DateCreated="{Rowsets/@DateCreated}" Version="{Rowsets/@Version}" StartDate="{Rowsets/@StartDate}" EndDate="{Rowsets/@EndDate}">
                   <xsl:copy-of select="/Rowsets/FatalError"/>
                   <xsl:copy-of select="/Rowsets/Messages"/>
                   <Rowset>
                   <Columns>
                        <Column Description="Mycol1" MaxRange="1" MinRange="0" Name="Mycol1" SQLDataType="12" SourceColumn="Mycol1" />
                   </Columns>
                   <Row>
                   <Mycol1>
                   <xsl:text>["</xsl:text>
                        <xsl:for-each select="/Rowsets/Rowset/Row">
                             <xsl:value-of select="." />
                             <xsl:choose>
                                  <xsl:when test="position() &lt; last()"><xsl:text>","</xsl:text></xsl:when>
                                  <xsl:otherwise><xsl:text>"]</xsl:text></xsl:otherwise>
                             </xsl:choose>
                        </xsl:for-each>
                   </Mycol1>
                   </Row>
                   </Rowset>
              </Rowsets>
         </xsl:template>
    </xsl:stylesheet>

  • BW query not working in portal

    Hello Experts,
    We have this issue when we have a BW query which is running well in RSRT but the query is not working in Portal.
    The error message we have is
    User when running the report is getting the error message “Error in File SMT-0454 - Contribution Analysis (Cx) :   Error in formula  Running Total Condition Formula: 'HierarchyLevel (GroupingLevel ({YPAXXM01_YPAXXM01_QC001.[YGLSUBBRD                     GSK1CXBRNDCATH]-NodeId})) = 1' This field name is not known..”
    Explored the possibilties , Could this be issue with BW query.
    We have this query getting fed to BO's. Please advise.
    Thanks,
    Santhosh

    Hi Santhosh,
    Error... This field name is not known, check your formulas in query, there might be some changes happenened with the characteristics used in formula.
    Check the formula by going up to base level, you might removed some field ex: YGLSUBBRD from your query. Repair it appropriately.
    Hope helps - Kumar

  • Switch from MySQL to MS SQL Server, Query not working

    I'm sure there is a simple setting somewhere for this, but cannot seem to find it and really would appreciate some assistance. Have an application which uses JDBC to connect to a MySQL DB to run the following query without an issue:
    SELECT * FROM users
    This returns the desired results. Changed to connect to MS SQL Server 2000 using the JDBC-ODBC bridge and the same query returns no results. The problem, SQL Server wants this query instead:
    SELECT * FROM [users]
    I don't want to have to change queries depending on the DB, as that is supposed to be one of the advantages of JDBC. Is there a setting in MySQL (or the JDBC driver) to have it work correctly if I pass table names in []? Or is there a setting in MS SQL Server (or in the JDBC, or ODBC) to have it accept queries without the []?
    Or is there a different approach that I'm missing which would avoid this whole problem?
    Thanks,
    Matt

    I suspect your database definitions are different. It has nothing to do with your java code.
    The bracket syntax is used to indicate the more standard quoted identifiers in standard SQL.
    Thus you could do this in oracle and in MS SQL Server...
    SELECT * FROM "users"
    I suspect that the above will work for your MS SQL Server database and will not work for your Oracle database. However if you created the table in oracle and specifically used "users" (with the double quotes around the name) when creating the table then it would work.
    Of course if the database definitions are different it means you must use different SQL for each. Just as if the name of the table was 'other' rather than 'users'.

  • Dynamic configuration not working in Java mapping

    Hi All,
    I have a scenario where i  am using java mapping. In this i am doing following
    1)Read file name from input message header
    2)set file name in output message Header
    3) set Directory name in output message Header
    i  have used following code .. but iit is not working... when i test end  to end...  in reciver communication channel it is failing stating " message failed as "Directory is not set in Header. Also i checked in SXMB_MONI  "dynamic configuration".It is not showing Directory.
    this is code.
    public void transform(TransformationInput transformationInput,TransformationOutput transformationOutput)
                   throws StreamTransformationException {
                   private Map para;
                   String Directory ;
                   String  inputFileName;
                   String var1 = "ABC";
                   para = transformationInput.getInputHeader().getAll();
                   DynamicConfiguration conf = (DynamicConfiguration) para
                             .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                   DynamicConfigurationKey keyFileName1 = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "FileName");
                         inputFileName = conf.get(keyFileName1);
                   DynamicConfigurationKey keyFilename = DynamicConfigurationKey
                             .create("http://sap.com/xi/XI/System/File", "FileName");
                   DynamicConfigurationKey keyDirecory = DynamicConfigurationKey
                             .create("http://sap.com/xi/XI/System/File", "Directory");
                   Directory = "tmp/"+var1;
                   conf.put(keyFilename,inputFileName);
                   conf.put(keyDirecory, Directory);
    I am in PI 7.1 ,   and in eclipse its showing warning that Para is not used.
    Can anyone show some lights.
    Also is there any way to debug this?? like is there any function by which i can write the trace for each step to see those in MONI.

    Method name:   public void createDirectory(Resultlist result, Container container)throws StreamTransformationException
    //Use Simple UDF and do the following lines
    String Directory ;
    String  inputFileName;
    String var1 = "ABC";
    DynamicConfiguration conf = container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
      DynamicConfigurationKey keyFileName1 = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "FileName");
      inputFileName = conf.get(keyFileName1);
    DynamicConfigurationKey keyFilename = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "FileName");
    DynamicConfigurationKey keyDirecory = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "Directory");
    Directory = "tmp/"+var1;
    conf.put(keyFilename,inputFileName);
    conf.put(keyDirecory, Directory);
    and remove these 3 lines
    //private Map para;
    //para = transformationInput.getInputHeader().getAll();
    //DynamicConfiguration conf = (DynamicConfiguration) para.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION
    >>I am in PI 7.1 , and in eclipse its showing warning that Para is not used.Can anyone show some lights.
    You can simply remove declaring Map Para line... The eclipse gives warning because you dont assign values for it and you are trying to use...
    For using the same input file name in output side, you dont need coding ... you need only for the directory...
    Enable ASMA attributes in the channel.
    Edited by: Baskar Gopal on Feb 24, 2011 10:58 AM

  • Update query not working in the JDBC sender Communication channel

    Hi,
    We are working on JDBC to File scenario. As per the configuration, XI should pick the data from SQL database every 20 secs and should update the corresponding flag. We are using subquery in the select and update statement as both header and detail tables are involved.
    Now the issue is, select query is working fine but update statement is not working as expected. It is somehow updating some other records rather than doing for the ones selected by the adapter.
    Moreover logSQLstatement is also not working. Hence we are unable to identify the records which are getting updated.
    Please advise.

    Hi Rumi,
    See Question 8. Transaction Handling (Sender) in [SAP Note 831162 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 JDBC Adapter|https://websmp130.sap-ag.de/sap(bD1wdCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=831162].
    8.  Transaction Handling (Sender)
    Q: If I have the following configured in a JDBC Sender:
    Select Query:
    SELECT column FROM TABLENAME WHERE FLAG = "TRUE"
    Update Query:
    UPDATE TABLENAME SET FLAG = "FALSE" WHERE FLAG = "TRUE"
    How do I know that the JDBC adapter will not update newly added rows (rows that were
    added between the time that the SELECT and UPDATE queries were executed) that were
    not read in the initial SELECT query?
    A: The SELECT and the UPDATE are run in the same DB transaction, i.e. both statements
    have the same view on the database.
    Make sure that both statements use the same WHERE clause. An additional
    requirement for the correct operation of this scenario is the configuration of
    an appropriate transaction isolation level on the database
    (i.e., repeatable_read or serializable). You might also consider using a
    "SELECT FOR UPDATE" statement instead of a plain SELECT statement to
    ensure proper locking on the database. "SELECT FOR UPDATE"
    is not supported in MS SQL database. In this case please make use of an
    appropriate transaction isolation level on the database. For more details
    please contact your DB vendors.
    After, see Transaction Handling Issues in [SAP Note 1039779 - JDBC Adapter issues(Escape character,Transaction handling)|https://websmp130.sap-ag.de/sap(bD1wdCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1039779].
    Best Regards.
    Pedro Baroni

  • Oracle 8i - PL/SQL sub query not working in PROC, but works ins SQL

    I have read about certain things not working in 8i and I think this is one of them, but I was wondering if anyone had a work around. In the place of the SELECT SYSDATE FROM DUAL, I have a table look up, where I am going to look up the OCN of the corresponding VENDOR_ID ( a column in the original query ). I am doing it in a decode statement because if the first condition in the decode statement is met, that's it. But if not, it needs to look up the OCN number in this other table. Simple enough, conceptually. I thought of a view but that necessitates a SELECT statement, too. Anyway, here is the code with the appropriate text bolded:
    CREATE OR REPLACE PROCEDURE tstINS_RATE_ROUTE_RECORDS_PROC (GET_CUR_PERIOD IN DATE) IS
         CUR_PERIOD DATE;
         BEGIN
         CUR_PERIOD := GET_CUR_PERIOD;
         Insert into RATE_ROUTE (
           CVBI_KEY
         , VENDOR_ID
         , OCN
         , ST_CD
         , PERIOD
         , MDFY_DT )
         Select
           C.CVBI_KEY
         , C.VENDOR_ID
         <b>, decode( c.send_lca, 'YES', 'XXX', (SELECT SYSDATE FROM DUAL) )</b>
         , decode( c.send_lca, 'YES', 'XX', SUBSTR(C.ZLOC,5,2) )
         , CUR_PERIOD
         , TO_CHAR(SYSDATE)
         FROM
           rpt_ds1_cnt_cat c
         , cogs_resource cr
         , cogs_t1activity ct1
         , rpt_ds1_aloc_zloc_reverse_vw az
         where (C.CVBI_KEY = CR.CVBI_KEY (+)
         and  CR.PERIOD = CUR_PERIOD)
         AND  (C.CVBI_KEY = CT1.CVBI_KEY (+)
         and CT1.PERIOD = CUR_PERIOD)
         and (az.master_route_name=c.aloc||'-'||c.zloc OR az.reversed=c.aloc||'-'||c.zloc)
         END; -- INS_RATE_ROUTE_RECORDS_PROC

    have read about certain things not working in 8i and I think this is one of them,Yes as I said scalar sub-queries were also not recognized within PL/SQL in 8i.
    Re: PLS-00103: Encountered the symbol "SELECT" when expecting one of the fo
    I was wondering if anyone had a work around.Write a function that returns the value. You may incur a performance penalty from a context switch to PL/SQL, but it may be balanced by the decode optimization you are attempting.

  • Query not working while creating Sales Order... Need suggestions

    Dear All,
    My client requirement involves creation of Sales Orders both as standalone as well as based on Quotations, depending on the case. Now there is a UDF created in the Item Master Data called "U_Unit" which should be populated in another UDF (U_BPQty) in the Sales Order and Sales Quotation which can be changed at the transaction level.
    The requirement is if the Sales Order is created based on Quotation, the system should take the value from 'U_BPQty" of "Sales Quotation" and populate in the Sales Order. if the Sales Order is created as stand-alone, it should take the value from U_Unit field of the Item Master Data. I wrote the following query for that purpose and using it as a FMS but its not working.
    Can you suggest me where I am going wrong?
    Declare @Base varchar
    Declare @Item varchar
    Declare @Draw varchar
    Declare @BaseQty varchar
    Set @Base = (Select Case When $[$38.44.0] is Null then 0 when $[$38.44.0] is not Null then $[$38.44.0] end)
    Set @Item = ($[$38.1.0])
    Set @Draw = (SELECT T0.U_BPQty from QUT1 T0 INNER JOIN OQUT T1 ON T0.DocEntry = T1.DocEntry INNER JOIN RDR1 T2 ON T2.BaseRef = T1.DocNum WHERE T0.ItemCode = @Item)
    Set @BaseQty = (SELECT T0.U_Unit from OITM T0 WHERE T0.ItemCode = $[$38.1.0])
    Select Case when (@Base = 0) then @BaseQty when (@Base <> 0) then @Draw end
    Thanks and regards,
    Bharath S

    Hi Bharath.......
    As you said if SQ not there and SO is directly punched then it should Pick up U_Unit else if SQ has target of SO then U_BP then your query working fine.
    But if SQ not there and Del is directly punched instead of SO then it should Pick up U_Unit else if SQ has target of Delivery and not SO then U_BP. Is it?
    In such case its not working?
    If yes then use this query.......
    declare @basedoc as nvarchar
    set @basedoc=$[DLN1.BaseType.0]
    If @basedoc<1
    Begin
    Select T0.U_Unit from OITM T0 Where T0.ItemCode=$[DLN1.ItemCode.0]
    End
    If @basedoc>1
    Begin
    Select T0.U_BPQty From QUT1 T0 where T0.docentry=$[DLN1.BaseEntry.0] and T0.ItemCode=$[DLN1.ItemCode.0]
    End
    Else use this......
    declare @basedoc as nvarchar
    set @basedoc=$[DLN1.BaseType.0]
    If @basedoc<1
    Begin
    Select T0.U_Unit from OITM T0 Where T0.ItemCode=$[DLN1.ItemCode.0]
    End
    If @basedoc>1
    Begin
    Select T0.U_BPQty From RDR1 T0 where T0.docentry=$[$38.45.0] and T0.ItemCode=$[DLN1.ItemCode.0]
    End
    Regards,
    Rahul

  • Pld Query Not Working..

    Dear All,
    Following Query is not working when i Use the condition please guide me...
    SELECT     DocNum, DocDate, Linenum,ItemCode,Dscription,Quantity,Unitmsr,paymentterm,cardName,
                            SUM(AED)  AS AED,SUM(CST) as CST,
                         SUM(BED) AS BED, SUM(eCess) AS eCess, SUM(HSC) AS HSC, SUM(VAT) AS Vat
    FROM         (SELECT     t1.Linenum,t0.DocEntry,t0.DocNum, t0.cardName , t0.DocDate,t1.ItemCode, t1.Dscription, t1.Quantity,t1.Unitmsr,t4.pymntgroup as 'paymentterm',
                                                  ISNULL((CASE WHEN upper(t2.STACode) LIKE 'CUS%' THEN t2.basesum ELSE 0 END), 0) AS 'NetAV',
                                                  ISNULL((CASE WHEN upper(t2.STACode) LIKE 'CUS%' THEN t2.TaxSum ELSE 0 END), 0) AS 'BasicCD',
                                                  ISNULL((CASE WHEN upper(t2.STACode) LIKE 'CST%' THEN t2.TaxSum ELSE 0 END), 0) AS 'CST',
                                                  ISNULL((CASE WHEN upper(t2.STACode) LIKE 'AED%' THEN t2.TaxSum ELSE 0 END), 0) AS 'AED',
    ISNULL((CASE WHEN upper(t2.statype) = - 90 THEN t2.TaxSum ELSE 0 END), 0) AS 'BED', ISNULL((CASE WHEN upper(t2.statype) = - 60 THEN t2.TaxSum ELSE 0 END), 0)
                                                  AS 'eCess', ISNULL((CASE WHEN upper(t2.statype) = - 55 THEN t2.TaxSum ELSE 0 END), 0) AS 'HSC',
                                                  ISNULL((CASE WHEN upper(t2.stacode) LIKE 'Vat%' THEN t2.TaxSum ELSE 0 END), 0) AS 'VAT'
                                                                                    FROM  OINV AS t0 INNER JOIN
                         INV1 AS t1 ON t0.DocEntry = t1.DocEntry INNER JOIN
                   OCTG as t4 on t0.groupnum=t4.groupnum inner join
                                                  OITM AS t3 ON t1.ItemCode = t3.ItemCode INNER JOIN
                                                inv4 AS t2 ON t1.DocEntry = t2.DocEntry AND t1.LineNum = t2.LineNum LEFT OUTER JOIN
                                                  [@BTT_RG23D] AS t6 ON t1.U_FolioNo = t6.Code
                                           ) AS T
                       GROUP BY DocNum,cardName,Linenum, DocDate,Quantity,Dscription,ItemCode,CST,paymentterm,Unitmsr
    Thanks
    Mangesh Pagdhare

    Dear Mangesh Pagdhare,
    You need T. in front of all your main query fields at least.
    Thanks,
    Gordon

  • Dynamic Stamps Not Working in Adobe Acrobat Pro

    Hi everyone, the dynamic stamps on Adobe Simultaneous Review are no longer working for us. I have Adobe Acrobat Pro 9 (it works for me) but it's not working for many other people (they have Adobe Acrobat Pro X). Does anyone know how we can fix this. I think the problem started occurring a few months ago.
    Many Thanks!
    Joy

    You can shutting down Acrobat and then try moving (DO NOT DELETE - you may want put them back afterward if this doesn't work) the Collab and Sync folder out of the User's Acrobat folder and then rejoin the Shared Review to see if the Dynamic Stamps reappear.

Maybe you are looking for

  • Can't create pdfs from applications nor from distiller

    (Mac 10.5, Acrobat Professional 8.1) Problem description: From Firefox, Word, TextEdit: File > Print Choose Adobe PDF 8.0 from the the printer list Choose file destination in dialog box that appears Printer icon appears in dock, then pauses. Click on

  • Photos from HTC DNA to windows 8

    How do I transfer photos from my HTC DNA to my laptop with windows 8?

  • Gnome login fails at first attempt

    Hi guys, I'm having a strange problem here. When I boot my notebook and try to login into Gnome, it constantly fails at the first attempt. So I click on my username, enter the (correct) password and nothing happens. I cancle it with 'esc', click on t

  • Extended Prog check

    in my program DATA : ts_cod   TYPE STANDARD TABLE OF   ty_cod,        wa_cod   TYPE ty_cod. loop at itab    READ TABLE ts_cod INTO wa_cod             WITH KEY no =itab-no               BINARY SEARCH.     IF sy-subrc <> 0.       DELETE itab.       CLE

  • I can't install Firefox. Get a message saying "can not open output file" Firefox version 3.6.6

    Firefox stopped working after updating. I uninstalled it and downloaded latest version 3.6.6. Before that 3.6.3. When I try to install, I get a message "Extraction Failed.. Can not open output file" . I trie d former versions, all with the same resul