Using Variable in the Data Template

Hi All,
I am on BIP 10.1.3.4.1 and DB is SQL Server. My Data Model is a Data Template wherein I have written multiple SQL Statements. I want to use a variable in my Data Template, assign it a value and use that variable to limit one of the SQL statements in the where clause like
declare @cnt int;
set @cnt = select count(asset_id) from asset
How do I use in the data template. I tried using it in a separate SQL statement but it throws me an error when i run the report like
"Need to declare the scalar variable '@cnt'
Can we have a variable section like parameter section we have in the data template to declare the parameters?
Any help would be highly appreciated.
Thanks,
Ronny

Sorry for the shot follow up, can anybody please reply on this?

Similar Messages

  • What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?

    Hi All,
    I am new to TestStand. Still in the process of learning it.
    What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?
    Thanks in advance,
    LaVIEWan
    Solved!
    Go to Solution.

    Hi,
    Using the Parameters is the correct method to pass data into and out of a sub sequence. You assign your data to be passed into or out of a Sequence when you are in the Edit Sequence Call dialog and in the Sequence Parameter list.
    Regards
    Ray Farmer

  • Problem in using relational operators in Data Templates

    Hi All,
    I have a query like following in data template type of Data set but I am not getting any data if I use simple < operator. Same query shows data in the database. Is there any other specific way of using relational operators in Data templates ? Please help in this regard
    <dataTemplate name="REVIEW_DATE" dataSourceRef="MY_DB">
         <dataQuery>
              <sqlStatement name="REVIEW_DATE">
                   <![CDATA[
    SELECT
    TABLE1.REVIEW_DATE
    FROM TABLE1 TABLE1 , TABLE2 TABLE2
    WHERE
    TABLE1.COLUMN1 = TABLE2.COLUMN2
    AND TABLE1.REVIEW_DATE < TABLE2.CURRENT_DATE]]></sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="REVIEW_DATE" source="REVIEW_DATE">
                   <element name="REVIEW_DATE" value="REVIEW_DATE"/>
              </group>
         </dataStructure>
    </dataTemplate>Thanks a lot !
    -Sookie

    solved after watching www.youtube.com/watch?v=FCujba8euWc
    thanks to all

  • How to enable the "update file" button to update the data template

    We have an escalated customer bug that the chinese character does not display correctly on report. We want to update the data template xml file on customer site to test the fix. However, when the customer login using "XML publisher Administrator" responsitility, select function "Data Definitions", search and then update the definition, on the update page, the button "update file" next to "Data Template" is disabled. Anyone know how to enable the button?
    screenshot at:
    ftp://bugftp.oraclecorp.com/upload/bug6649637/CannotUpdate.doc
    Thanks,
    Wei

    Unless until it is a Manual Journal, SLA page doesn't give you the provision to change them.
    Even for Manual Journal, it won't allow you to change, if that is transferred to GL.
    Only option is to UNDO the accounting and correct the setup to create correct journals. You may contact Oracle Support.
    By
    Vamsi

  • Does Less Than ( ) operator works in the data template SQL within CDATA ??

    All,
    I am trying to use <= operator (<= sysdate) in the data template sql query and it's throwing Java exceptions.
    I have CDATA around my sql and XML parser should ignore '<' symbol. Query works fine if I use 'ampersandlt;=' operator. Here is my query
    <sqlStatement name="Q_1" dataSourceRef="">
    <![CDATA[select * from table where date_column <= sysdate]]>
    </sqlStatement>
    Just want to know if this is a bug.
    Thanks
    Problem was solved. Use 'ampersandlt;' where ampersand is '&' for less than

    Try this..
    select * from table where date_column <= sysdate

  • Need to Achieve Grand Total in the Data Template

    Hi Team
    As per the requirements i need to achieve the grand total form the various level of Total. To achieve the Total i have used the SUM function and it works fine. Could you please suggest me how can i achieve the Grand Total. For your reference i am attaching the data template here that i am using.
    <group name="G_ITEM" dataType="varchar2" source="Q_ITEMQuery" groupFilter="">
                        <element name="ITEM_ID" dataType="varchar2" value="item_id" function=""/>
                        <element name="DESCRIPTION" dataType="varchar2" value="description" function=""/>
                        <element name="DIVISION" dataType="varchar2" value="division" function=""/>
                        <element name="UNITS_APPTD" dataType="varchar2" value="apptd_unit_qty" function=""/>
                        <element name="UNITS_RCVD" dataType="varchar2" value="unit_rcvd" function=""/>
                        <element name="WEIGHT_APPTD" dataType="varchar2" value="apptd_weight" function=""/>
                        <element name="WEIGHT_RCVD" dataType="varchar2" value="receipt_weight" function=""/>
                        <element name="SUM_UNITS_APPTD" value="G_ITEM.UNITS_APPTD" function="SUM()"/>
                        <element name="SUM_UNITS_RCVD" value="G_ITEM.UNITS_RCVD" function="SUM()"/>
                        <element name="SUM_WEIGHT_APPTD" value="G_ITEM.WEIGHT_APPTD" function="SUM()"/>
                        <element name="SUM_WEIGHT_RCVD" value="G_ITEM.WEIGHT_RCVD" function="SUM()"/>
                        <group name="G_TROUBLE" dataType="varchar2" source="Q_TROUBLEQuery" groupFilter="">
                             <element name="T_CODE" dataType="varchar2" value="trouble_code" function=""/>
                        </group>
                   </group>
                   <group name="G_DEPOSIT" dataType="varchar2" source="Q_DEPOSITQuery" groupFilter="">
                        <element name="ITEM_ID1" dataType="varchar2" value="ITEM_ID1" function=""/>
                        <element name="DESCRIPTION1" dataType="varchar2" value="DESCRIPTION1" function=""/>
                        <element name="UNIT_QTY1" dataType="varchar2" value="Unit_Qty1" function=""/>
                        <element name="SUM_UNIT_QTY1" value="G_DEPOSIT.UNIT_QTY1" function="SUM()"/>
                   </group>
                   <group name="G_TRANSPORT" dataType="varchar2" source="Q_TRANSPORTQuery" groupFilter="">
                        <element name="ITEM_ID2" dataType="varchar2" value="ITEM_ID2" function=""/>
                        <element name="DESCRIPTION2" dataType="varchar2" value="DESCRIPTION2" function=""/>
                        <element name="UNIT_QTY2" dataType="varchar2" value="Unit_Qty2" function=""/>
                        <element name="SUM_UNIT_QTY2" value="G_TRANSPORT.UNIT_QTY2" function="SUM()"/>
                   </group>
    I need SUM_UNITS_APPTD, SUM_UNIT_QTY1 and SUM_UNIT_QTY2 of 3 different group to be added to generate the Grand Total. PLEASE ADVISE
    Regards
    Srikant

    Hi Domnic
    Thanks for the reply.
    I am not much aware of the XDO. Could you please let me know can i pass the field name in place of 2 and 3 as in your example.
    For example if i have field A and B and i need to add it then should it be
    <?xdofx:A+B?> in RTF.
    Else please give me the complete syntax.
    Thanks in advance for your reply.
    Regards
    Srikant

  • I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    Here's a quick example I threw together that generates a sort-of-bell-curve shaped data distribution, then performs the binning and plotting.
    -Kevin P.
    Message Edited by Kevin Price on 12-01-2006 02:42 PM
    Attachments:
    Binning example.vi ‏51 KB
    Binning example.png ‏12 KB

  • Using variables in the title of the graph

    Hi Gurus,
    I would like to use - for example a presentation- variable in the title of a graph.
    I assign a value for that variable in dashboard prompt.
    Does anybody know the syntax of using variable in the title of a graph
    (Not in a Title view!)
    Thanks in advance .
    Regards
    Laszlo

    You can reference presentation variables in the following areas :
    Title Views
    Narrative Views
    Column Filters
    Column Formulas
    Conditional Formatting conditions
    Chart scale markers.
    Gauge range settings.
    Static text.
    Direct Database Requests
    Dashboard prompts
    iBot Headlines and text

  • Which  Function Module is used for converting the DATE in BDC

    HI,
    Which  Function Module is used for converting the DATE Format in BDC for Uploading purpose please help me.

    data : date like sy-datum.
    data : odate(10) type c.
    date = sy-datum.        " in format YYYYMMDD
    CALL FUNCTION 'CONVERSION_EXIT_PDATE_OUTPUT'
      EXPORTING
       input         = date
    IMPORTING
       OUTPUT        = odate         .
    write:/ odate.  "in ur format '.
    1.
    In ur itab make a field for date as 10 characters and use this Fm to store the date .
    2. Pass the date as the charcter field to the screen and now check .

  • SPSiteDataQuery - filter by file Title - Can I use variable for the filter value?

    I use SPsiteDataQuery to search across multiple lists and filter by file title. I have the file title information in a variable.
    Can I use variable in the filter value?
    string fileName = "Policies.doc"
    SPSiteDataQuery spQry = new SPSiteDataQuery();
    spQry.ViewFields = "<FieldRef Name='Title'/><Value Type='Text'>fileName</Value>"

    If I have understood correctly, you want to search based upon a File title in all the sites. You can include a query to filename in the spQry
    spQry.Query = "<Where>" +
    "<Eq>" +
    "<FieldRef Name=\"FileLeafRef\"/>" +
    "<Value Type=\"Text\">" + fileName + "</Value>" +
    "</Eq>" +
    "</Where>";
    get2pallav
    Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

  • .  wat is multiprovider wat mechanism it will use to get the data? can we c

    hi gurus,
      wat is multiprovider wat mechanism it will use to get the data? can we create multiprovider on one cube?wat is the advantage?
    thankx in advace,
    i will assign points.
    srinivas

    Hi
    A MultiProvider is a type of InfoProvider that combines data from a number of InfoProviders and makes them available as a whole to reporting. The MultiProvider does not itself contain any data. Its data comes entirely from the InfoProviders on which it is based. These are combined using a union operation.
    InfoProviders and MultiProviders are the objects or views that are relevant for reporting.
    MultiProviders only exist as a logical definition. The data is still saved in the InfoProviders it is based on.
    A query based on a MultiProvider is divided into sub-queries internally. There is a sub-query for each InfoProvider in the MultiProvider. These sub-queries are usually processed in parallel.
    ADV
    A MultiProvider allows reporting using several InfoProviders.
    InfoCube and InfoCube: You have an InfoProvider with actual data for a logically
    closed business area and an equivalent InfoProvider with plan data. You can
    combine the two InfoProviders into one MultiProvider so that you can compare
    the actual data with the planned data of a query.
    InfoCube and InfoObject: You have an InfoCube with your products and sales.
    Combine the InfoObject 0MATERIAL with it. In this way you can display the
    "slow-moving items" since products that do not result in sales are also displayed.
    Ya you can create multiprovider for one cube but what is need to create for single cube ?
    M Kalpana

  • Calling a package function in the data template

    Hello All,
    I am not able to understand the concept of calling a function from the data template.
    In my data template, I put the sql statement as
    <sqlStatement name="Q_SEL">
    <![CDATA[  Select l_period_name PERIOD_NAME
                             from xla_tb_ap_report_pvt.get_period_name(1) ]]>
    </sqlStatement>
    Is it possible to call a specific package function as shown above in a select statement?
    I am getting the message "ORA-00933: SQL command not properly ended" when I tried with the above. Could you pls. point out what the error is in the above sqlStatement?
    1) My instance is R12.1.3
    2) The base pkg function 'xla_tb_ap_report_pvt.get_period_name' expects a number to be passed in as 'IN' parameter.
    Thanks,
    Monkey

    I tried another version of the sql statement (after going through some older posts) like:
    <sqlStatement name="Q_SEL">
    <![CDATA[  Select xla_tb_ap_report_pvt.get_period_name(1) PERIOD_NAME
                            from  dual]]>
    </sqlStatement>
    My group is :
    <group name="G_PERIOD_NAME" source="Q_SEL">
    <element name="PERIOD_NAME" value="PERIOD_NAME"/>
    </group>
    Now getting the error message:
    ORA-00904: xla_tb_ap_report_pvt.get_period_name : invaild identifier
    What is it that i am doing wrong?
    Thanks,
    Monkey
    Edited by: OAF_Monkey on Mar 26, 2012 11:52 AM

  • Transaction code used to upload the data in the application server SCM syst

    Hi
    Could you please anyone tell me the transaction code which has been used to upload the data into the application server in SCM ( APO) system from presentation server. 
    For ex : R/3 system CG3Y , CG3Z has been used to upload the data into application server similarly way could you please tell me the transaction code is used in the APO system for uploading the data into application server.
    Thanks advance for your support.
    Regards,
    Kiran

    try tcode SXDA_TOOLS - copy
    (1st you must fill all obligatory fields)
    A.

  • Which tables are being used to extract the data for the materi Extractors

    Hi
    please advise which tables are used to extract the data for the extarctors
    0MAT_SALES_ATTR,
    0MATERIAL_ATTR,
    0MAT_PLANT_ATTR
    0PLANT_ATTR
    ,Many thanks.

    Hi,
    Activate a database trace using ST01. Then perform the MM03 operation and goto the SD Texts tab. Now stop the trace and see if you can locate either a table or program which you can utilize in the log.
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/55f993545a11d1a7020000e829fd11/frameset.htm
    Hope this helps..
    Rgs,
    Ravikanth.

  • Can anyone confirm the date used for pushing the data into AR interface table? Is it abse don Actual ship date or scheduled ship date?

    Can anyone confirm the date used for pushing the data into AR interface table? Is it abse don Actual ship date or scheduled ship date? We are facing a scenario where trx date is lower than the actual ship to which logically sounds incorrect.
    Appreciate any quick response around this.

    Hi,
    Transaction date  will be your autoinvoice master program submission level date (If you haven't setup any logic.
    Please check the program level default date, if user enter old date ststem will pick the same.
    Customer is trying to set the value of the profile OM:Set receivables transaction date as current date for non-shippable lines at the responsiblity level. System does not set the transaction date to current date in ra_interface_lines_all.
    CAUSE
    Customer has used the functionality in R11i. But after the upgrade to R12, the system functions differently than R11i.
    SOLUTION
    1.Ensure that there are no scheduled workflow background process run.
    2.Set the profile "OM: Set Receivables Transaction Date as Current Date for Non-Shippable Lines"  at Responsibility level only as Yes.
    3.Now switch the responsibility to which the profile is set.
    4.Create order for Non-Shippable Lines and progress it to invoicing.
    5.Ensure that the 'workflow background process' concurrent program is run in the same responsibility and this line is considered in it.
    6.Now check if the 'SHIP_DATE_ACTUAL' is populated to ra_interface_lines_all

Maybe you are looking for

  • Cannot import some pictures: reported as corrupted

    I receive family pictures from my brother. He uses Photoshop. Some JPEG pictures are reported to be "corrupted" and won't import to iPhoto 08, most will. If I put them through my Photoshop Elements and make them PNG, twice the size, but then they wil

  • Ipod start-up error

    was recently given an 80gig video ipod as a birthday present, and after a mere two weeks or so it's now out of action. it shows a dim apple logo at the start-up, the logo then lights up and a click is heard as it seems to reset the process and return

  • Restricting the Multiple Selection for the Standard PCH selection Screen.

    Hi - I want to Hide the Extension pushbutton for the OBJID in the PCH LDB Standard Selection Screen. How do I do that ?? Thanks, Mullai

  • IOS 5 and itunes errors

    "The Software for the iPhone was corrupted during download. Disconnect and reconnect, then try again. Make sure your network settings are correct and your connection is active, or try again later."

  • First page appearing only

    Hi I have a problem with a form that consists of two different dymanic interactive pages. when I first open the form I do not want the second page to appear until the first page is filled with data. is this possible with LiveCycle Designer 7 or do I