Issue with passing schema name as variable to sql file

Hi,
I have a scenario wherein from SYS a Java process (Process_1) is invoking SQL files and executing the same in SQLPLUS mode.
DB: Oracle 11.2.3.0
Platform: Oracle Linux 5 (64-bit)
Call_1.sql is being invoked by Java which contains the below content:-
ALTER SESSION SET CURRENT_SCHEMA=&&1;
UPDATE <table1> SET <Column1> = &&1;
COMMIT;
@Filename_1.sql
Another process (Process_2) again from SYS user is also accessing Filename_1.sql.
The content of Filename_1.sql is:-
DECLARE
cnt NUMBER := 0;
BEGIN
  SELECT COUNT(1) INTO cnt FROM all_tables WHERE table_name = 'TEST' AND owner = '&Schema_name';
  IF cnt = 1 THEN
  BEGIN
    EXECUTE IMMEDIATE 'DROP TABLE TEST';
    dbms_output.put_line('Table dropped with success');
  END;
  END IF;
  SELECT COUNT(1) INTO cnt FROM all_tables WHERE table_name = 'TEST' AND owner = '&Schema_name';
  IF cnt = 0 THEN
  BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE TEST (name VARCHAR2(100) , ID NUMBER)';
    dbms_output.put_line('Table created with success');
  END;
  END IF;
End;
Process_2 uses "&Schema_Name" identifier to populate the owner name in Filename_1.sql. But Process_1 needs to use "&&1" to populate the owner name. This is where I am looking a way to modify Call_1.sql file so that it can accommodate both "&&1"  to populate owner name values in Filename_1.sql (with avoiding making any changes to Filename_1.sql).
Any help would be appreciated.
Thanks.

Bad day for good code. Have yet to spot any posted today... Sadly, yours is just another ugly hack.
The appropriate method for using SQL*Plus substitution variables (in an automated fashion), is as command line parameters. Not as static/global variables defined by some other script ran prior.
So if a script is, for example, to create a schema, it should look something as follows:
-- usage: create-schema.sql <schema_name>
set verify off
set define on
create user &1 identified by .. default tablespace .. quota ... ;
grant ... to &1;
--eof
If script 1 wants to call it direct then:
-- script 1
@create-schema SCOTT
If script 2 want to call it using an existing variable:
-- script 2
@create-schema &SCHEMA
Please - when hacking in this fashion, make an attempt to understand why the hack is needed and how it works. (and yes, the majority of SQL*Plus scripts fall into the CLI hack category). There's nothing simple, beautiful, or elegant about SQL*Plus scripts and their mainframe roots.

Similar Messages

  • Issue with Data Provider name in variable screen for BEx Analyzer

    Hello all,
    We got an issue with Data Provider name in Variable screen in BEx Analayzer.
    We want to change the DataProvider name there to Description of the report instead of its Technical name.
    Any inputs are appreciated.
    Thanks
    Kumar

    You have to create a workbook to do this.
    Refresh your query/report. In Bex analyser, there is one toolbar named BEx design toolbox, If you are not able to see it in analyser, right click on the toolbar space of BEx analyser and click on BEx design toolbox. Here, goto to design mode, by clicking on a sysbol like 'A'. after that place the curser where you want to see the Query description. and click on insert text (T) in BEx toolbox. click on it and check "Query description" in constant tab. in the general tab you need to assign a dataprovider, for that assign your query name in workbook settings (in Bex design toolbox). also check the "display caption" in general tab.
    Pravender

  • Passing schema name at runtime in batch file

    I am having a batch file where i am prompting users to tell the schema name to which they wish to connect at runtime. I am calling one .sql fil within that batch file to execute where i need user to connect to the specific schema at runtime
    My batch file looks like as
    set serveroutput on;
    set linesize 500;
    set scan on;
    spool test_bat.log
    Accept a PROMPT 'Enter the schema name you wish to connect: '
    Accept a_pw PROMPT 'Enter the password?: ' HIDE
    Accept a_connstr PROMPT 'Enter the connect string : '
    conn &a/&a_pw@&a_connstr
    Now after getting connected to the specified schema i would like to call some .sql file within the batch file which seems to be as
    select count(*) from <schema entered above>.table_name
    I want to use the above schema name (a) to get data from the tables.
    Please let me know how to get this.
    Thanks

    user11200661 wrote:
    That's fine but still i want to prefix the schema name within the .sql file. My .sql should contain the name of that parameter only as i want to get that parameter replaced by the schema name at runtime. Some other users are using the same .sql file and they have access to that specific schema only. i want to make the .sql file more general so that it can be used by everyone without altering it every time.Sorry, your requirement no longer makes sense.
    If people have to access a specific schema because they need the script for general use, then you will have to hard code the schema name into it.
    If the script is to prompt for the schema name and connect to that schema and then use that schema name inside the called sql script, then people would not be able to use it generically, as it would be reliant upon the schema name being passed in.
    It sounds as if you're trying to write one generic thing that needs to do two different tasks.
    Just have two scripts and make life simple.

  • Having an issue with passing the text of a link to a session variable.

    I am having an issue with passing the text from a link to a session variable. I am adding this html as a literal for each item in the list that i have populated with a query.
    List<Literal> lit = new List<Literal>();
    for (int i = 0; i < posts.Count; i+=4)
    Literal someLit = new Literal();
    someLit.Text=
    @"<div class='row'>" +
    "<div class='col-md-12'>" +
    "<div class='panel'>" +
    " <div class='panel-body'>" +
    " <!--/stories-->" +
    " <div class='row'> " +
    " <br>" +
    "<div class='col-md-2 col-sm-3 text-center' id='javascript'> <h3>" +
    " <a href='#' runat='server' onserverclick='UserProfile_Click'>" + posts[i + 3] + " </a>" +
    "</h3>" +
    " </div>" +
    " <div class='col-md-10 col-sm-9'>" +
    "<h3><a href='Thread.aspx' runat='server' onserverclick='MyFuncion_Click'> " + posts[i] + " </a></h3>" +
    " <div class='row'>" +
    " <div class='col-xs-9'> " +
    posts[i + 1] +
    " </div>" +
    "<div class='col-xs-3'></div>" +
    posts[i + 2] +
    " </div>" +
    "<br><br>" +
    " </div>" +
    " </div>" +
    " <!--/stories-->" +
    " </div>" +
    " </div>" +
    " </div><!--/col-12-->" +
    " </div>" +
    "</div>";
    lit.Add(someLit);
    for(int i=0; i<lit.Count; i++)
    this.Controls.Add(lit[i]);
    I use one of the list positions as the text for a link in two different spots. For now, lets only talk about the line:
    <a href='#' runat='server' onserverclick='UserProfile_Click'>" + posts[i + 3] + " </a>
    Since I am generating these controls at pageLoad, I can't make them <asp:Linkbutton>s. And since they are anchor elements, I don't have access to an onCommand attribute or onservercommand attribute.
    All I want to do is access the content from inside the specific link tags that I generate on link click and set it as a session variable. That's what I would like my UserProfile_Click function to do. I cant commandargs it in like i can with a linkbutton's
    OnCommnad attribute, however.
    My fear is that the onserverclick attribute resolves so something else on pageLoad normally and since I am generating it the way I am similar to the way a <asp:linkButton> resolves to a generated JavaScript.
    Any help?

    @Brunellus
    For questions related to ASP.NET use the ASP.NET forum http://forums.asp.net     
    You should get more, better and faster answers on the other forum.  Thanks, ahead of time.
    Best Regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Using dbms_datapump package to export the schema with the schema name as pa

    Hi,
    I am using the pl/sql block to export schema using dbms_datapump package,Now I want to pass the scheme name as the parameter to the procedure and get the .dmp and .log files with the schema name included.
    CREATE OR REPLACE PROCEDURE export
    IS
    h1 number;
    begin
    h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'SCHEMA', job_name => 'export1', version => 'COMPATIBLE');
    dbms_datapump.set_parallel(handle => h1, degree => 1);
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT.LOG', directory => 'DATA_PUMP_DIR', filetype => 3);
    dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
    dbms_datapump.metadata_filter(handle => h1, name => 'SCHEMA_EXPR', value => 'IN(''CHECKOUT'')');
    dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT%U' || to_char(sysdate,'dd-mm-yyyy') || '.DMP', directory => 'DATA_PUMP_DIR', filetype => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
    dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
    dbms_datapump.detach (handle => h1);
    exception
    when others then
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    end;
    Thank you in advanced
    Sri

    user12062360 wrote:
    Hi,
    I am using the pl/sql block to export schema using dbms_datapump package,Now I want to pass the scheme name as the parameter to the procedure and get the .dmp and .log files with the schema name included.
    OK, please proceed to do so
    >
    CREATE OR REPLACE PROCEDURE export
    IS
    h1 number;
    begin
    h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'SCHEMA', job_name => 'export1', version => 'COMPATIBLE');
    dbms_datapump.set_parallel(handle => h1, degree => 1);
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT.LOG', directory => 'DATA_PUMP_DIR', filetype => 3);
    dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
    dbms_datapump.metadata_filter(handle => h1, name => 'SCHEMA_EXPR', value => 'IN(''CHECKOUT'')');
    dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT%U' || to_char(sysdate,'dd-mm-yyyy') || '.DMP', directory => 'DATA_PUMP_DIR', filetype => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
    dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
    dbms_datapump.detach (handle => h1);
    exception
    when others then
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    end;
    EXCEPTION handler is a bug waiting to happen.
    eliminate it entirely

  • [svn:fx-trunk] 12982: Fix for issue with exposing accessible names for combobox list items

    Revision: 12982
    Revision: 12982
    Author:   [email protected]
    Date:     2009-12-15 20:44:23 -0800 (Tue, 15 Dec 2009)
    Log Message:
    Fix for issue with exposing accessible names for combobox list items
    QE notes: none
    Doc notes: none
    Bugs: n/a
    Reviewer: Gordon
    Tests run: checkintests
    Is noteworthy for integration: no
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ComboBoxAccImpl.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ListBaseAccImpl.as

    Add this to the end of your nav p CSS selector at Line 209 of your HTML file, after 'background-repeat...':
    margin-bottom: -2px;
    Your nav p will then look like this:
    nav p {
              font-size: 90%;
              font-weight: bold;
              color: #FFC;
              background-color: #090;
              text-align: right;
              padding-top: 5px;
              padding-right: 20px;
              padding-bottom: 5px;
              border-bottom-width: 2px;
              border-bottom-style: solid;
              border-bottom-color: #060;
              background-image: url(images/background.png);
              background-repeat: repeat-x;
              margin-bottom: -2px;

  • How can i pass the Input value to the sql file in the korn shell ??

    Hi,
    How can i pass the Input value to the sql file in the korn shell ??
    I have to pass the 4 different values to the sql file and each time i pass the value it has to generate the txt file for that value like wise it has to generate the 4 files at each run.
    can any one help me out.
    Raja

    Can you please more elaberate., perhaps you should more elaberate.
    sqlplus is a program. you start it from the korn shell. when it's finished, processing control returns to the korn shell. the korn shell and sqlplus do not communicate back and forth.
    so "spool the output from .sql file to some txt file from k shell, while passing the input parameters to the sql file from korn shell" makes no sense.

  • Issue with passing expression to a hashmap key in a dataTable column

    hi all,
    Can someone help me with passing an expression like "123-456" to a hashmap key in my dataTable . In my dataTable i have t:columns tag which generates checkboxes for each row in the dynamic column .The value of checkbox must be identified by a combination of userID and accountID. So i want to set value of checkbox something like this'userID-account.ID' . But it never returns the right value since userID is taken as string instead i want the value of userID to be passed in that expression. Someone please help...iam struck with this issue from so long.Here is the code.
    page1.jsp:
    <t:dataTable id="groupuserlist"
                  var="user"            
                             value="#{manageuserscontroller.userList}"     // this is a list of userIDs
                 cellspacing="0"
                 preserveDataModel="false"
                 headerClass="topRow"
                 preserveSort="true"
                 summary="This table displays list of users for an accessgroup">
         <t:column>
          <f:facet name="header"><h:outputText value="User ID" /></f:facet>
          <t:outputText value="#{user.ID}" />
         </t:column>
         <t:column>
          <f:facet name="header"><t:commandSortHeader columnName="title" arrow="true"> <h:outputText value="Title"/> </t:commandSortHeader> </f:facet>
          <t:outputText value="#{user.title}" />
         </t:column>
          <t:columns var="cols" value="#{manageuserscontroller.selectedAGList}"> //selectedAGList is a list of accountIDs
          <f:facet name="header"><h:outputText value="#{cols.name}" /></f:facet>
          <h:selectBooleanCheckbox id="checkbox4" value="#{manageuserscontroller.selectedUserIds['user.ID-cols.ID]}" />
          </t:columns>
    </t:dataTable>Backing bean: In this selectedUserIds iam intentionally setting up key something like "userID-accountID" so that i can split the userID and accountID for later user
    private Map<String, Boolean> selectedUserIds = new HashMap<String, Boolean>();
             somebody please to my email. If you need further information iam very happy to provide any time. Also let me know if there is another way to get this job done..
    Thanks very much in advance

    Hi BalusC,
    I am very much thankful to you. I got my issue resolved only when i select one dynamic column. It doesn't seem to be working if i select multiple columns. Not sure where exactly my logic is going wrong. Here is a snippet of my code.. Please let me know if you find any mistake in it..Once again thanks very much..for your great help.
    jsp:
    <t:dataTable id="grouplist"
                  var="user"            
                   value="#{manageuserscontroller.userList}"     
                   styleClass="companyAdminMainTable ltgreen_Hrule marVertSml"
                 cellspacing="0"
                 preserveDataModel="false"
                 headerClass="topRow"
                 preserveSort="true"
                 summary="This table displays list of users for an account">
         <t:column>
          <f:facet name="header"><h:outputText value="User ID" /></f:facet>
          <t:outputText value="#{user.ID}" />
         </t:column>
         <t:column>
          <f:facet name="header"><t:commandSortHeader columnName="title" arrow="true"> <h:outputText value="Title"/> </t:commandSortHeader> </f:facet>
          <t:outputText value="#{user.title}" />
         </t:column>
          <t:columns id="dynamic" var="cols" value="#{manageuserscontroller.selectedAGList}">
          <f:facet name="header"><h:outputText value="#{cols.name}" /></f:facet>
          <h:selectBooleanCheckbox id="checkbox4" value="#{manageuserscontroller.selectedAGUserIds[user.ID][cols.accessGroupID]}" />
          </t:column>
          </t:columns>
    </t:dataTable>Backing bean:
    private Map<Integer, Map<Integer,Boolean>> selectedAGUserIds = new HashMap<Integer, Map<Integer,Boolean>>();
        private Map<Integer, Boolean> selectedAGIds = new HashMap<Integer, Boolean>();
    for(int j=0; j< selectedAGList.size(); j++){   //List of selected dynamic account columns
             for(int i=0; i < userList.size();i++){              // lisf of users
                   try {
                        int m = userList.get(i).getID();
                        int n = selectedAGList.get(j).getAccessGroupID();
                        selectedAGIds=(AccessGroupDAO.getUserMap1(userList.get(i).getID(),selectedAGList.get(j).getAccountID()));
                        selectedAGUserIds.put(userList.get(i).getID(),selectedAGIds);
                       System.out.println("hashmap value"+ selectedAGUserIds.get(m).get(n));
                        } catch (Exception e) {
                             // TODO Auto-generated catch block
                             e.printStackTrace();
                 System.out.println("outer hashmap size"+ selectedAGUserIds.size());
          }DAO:
    public static Map<Integer,Boolean> getUserMap1(Integer userID, int accountID) throws Exception {
         Map<Integer, Map<Integer,Boolean>> selectedUserAGIds = new HashMap<Integer, Map<Integer,Boolean>>();
                    Map<Integer, Boolean> selectedAGIds = new HashMap<Integer, Boolean>();
          String sql="  select iusermetaid,iaccountid from useraccountlist where iusermetaid = userID and iaccountid = accountID ";
             ResultSet rs = executeSQL(sql);
             if(rs!=null & rs.next()){
                  System.out.println("record found");
                  Integer aid = rs.getInt("iaccountid");
                        selectedAGIds.put(aid, true);
             else{
                  System.out.println("record not found");
                  selectedAGIds.put(accessGroupID, false);
                  System.out.println("get the key value"+ selectedUserAGIds.get(userID).get(accessGroupID));
            System.out.println("Exiting accessgroupDAO");
             return selectedAGIds;
    }

  • Issue with Opportunity schema contained in Opportunity.wsdl and Integration

    There is Opportunity XML schema object defined for Siebel web-service with URI “urn:/crmondemand/xml/opportunity” in opportunity.wsdl and opportunity.xsd contained in integrationevent.zip. Please find attached the schema files.
    If you check the diff, the opportunity schema is different, which is actually a conflict from Siebel side since it is the same object identified by URI “urn:/crmondemand/xml/opportunity”. Can we get some information about the discrepancy from Siebel OD team?
    Following compiler error comes for the BPEL process, where both Opportunity wsdl and integration event being used:
    Error:
    [Error ORABPEL-10903]: failed to read wsdl
    [Description]: in "bpel.xml", Global Type declaration/definition of name '{urn:/crmondemand/xml/opportunity}Opportunity' are duplicated at the following locations:
    file:/C:/Bhavnesh/Work/SiebelPoll/SourceCode/SiebelPoll/JDSU_SiebelToODSOpportunityTransfer/bpel/opportunity.wsdl [line#: 89]
    file:/C:/Bhavnesh/Work/SiebelPoll/SourceCode/SiebelPoll/JDSU_SiebelToODSOpportunityTransfer/bpel/opportunity.xsd [line#: 12]
    There are at least two of them looking different:
    file:/C:/Bhavnesh/Work/SiebelPoll/SourceCode/SiebelPoll/JDSU_SiebelToODSOpportunityTransfer/bpel/opportunity.wsdl [difference starting at line#:635]
    file:/C:/Bhavnesh/Work/SiebelPoll/SourceCode/SiebelPoll/JDSU_SiebelToODSOpportunityTransfer/bpel/opportunity.xsd [difference starting at line#:558]
    Global Type declaration/definition of name '{urn:/crmondemand/xml/opportunity}Team' are duplicated at the following locations:
    file:/C:/Bhavnesh/Work/SiebelPoll/SourceCode/SiebelPoll/JDSU_SiebelToODSOpportunityTransfer/bpel/opportunity.wsdl [line#: 2602]
    file:/C:/Bhavnesh/Work/SiebelPoll/SourceCode/SiebelPoll/JDSU_SiebelToODSOpportunityTransfer/bpel/opportunity.xsd [line#: 2524]
    There are at least two of them looking different:
    file:/C:/Bhavnesh/Work/SiebelPoll/SourceCode/SiebelPoll/JDSU_SiebelToODSOpportunityTransfer/bpel/opportunity.wsdl [difference starting at line#:2602]
    file:/C:/Bhavnesh/Work/SiebelPoll/SourceCode/SiebelPoll/JDSU_SiebelToODSOpportunityTransfer/bpel/opportunity.xsd [difference starting at line#:2524]
    [Potential fix]: If your site has a proxy server, then you may need to configure your BPEL Server, designer and browser with your proxy server configuration settings (see tech note on http://otn.oracle.com/bpel for instructions).
    Following is the difference between two schema:
    New line in opportunity.wsdl
    <xsd:element name="ListOfOpportunityContactRole" maxOccurs="1" minOccurs="0" type="xsdLocal1:ListOfOpportunityContactRole"></xsd:element>
    Difference between the sequence of elements in both schema:
    <xsd:complexType name="Team"><xsd:sequence><xsd:element name="OpportunityAccessId" maxOccurs="1" minOccurs="0" type="xsdLocal1:string30"></xsd:element>
    <xsd:element name="OpportunityTeamId" maxOccurs="1" minOccurs="0" type="xsd:string"></xsd:element>
    Thanks and regards,
    Bhavnesh Patel.
    Edited by: bhavnesh_p on Oct 9, 2008 1:24 PM

    Hello Bhavnesh,
    we just got into the same issue with the differing Opportunity-XSD/WSDL you have mentioned in your posting.
    Following is the difference between two schema:
    New line in opportunity.wsdl
    <xsd:element name="ListOfOpportunityContactRole" maxOccurs="1" minOccurs="0" type="xsdLocal1:ListOfOpportunityContactRole"></xsd:element>
    Difference between the sequence of elements in both schema:
    <xsd:complexType name="Team"><xsd:sequence><xsd:element name="OpportunityAccessId" maxOccurs="1" minOccurs="0" type="xsdLocal1:string30"></xsd:element>
    <xsd:element name="OpportunityTeamId" maxOccurs="1" minOccurs="0" type="xsd:string"></xsd:element>Did you get any update on this problem?
    Thanks in adavance & Best regards..
    Andre

  • Performance issues with respect scheme registration,select & insert query

    I am facing performance issues with respect to schema registration,Select & insert query towards 10.2.0.3 version.It is taking around 45 minutes to register schema and it is taking around 5 min to insert a single document into xml db where as it was taking less than min to insert a single document into xml db of 9.2.0.6 version.Would like to know the issue and solution to resolve this issue.Please help me out on this as it is very urgent for me

    Since it appears that this is an XML DB specific question, you're probably better off posting in the XML DB. The folks over there have much more experience with the ins and outs of that particular product.
    Justin

  • Issue with passing parameters through Java-JSP in a report with cross tab

    Can anyone tell me, if there's a bug in Java SDK in passing the parameters to a report (rpt file) that has a cross tab in it ?
    I hava report that works perfectly fine
       with ODBC through IDE and also through browser (JSP page)
    (ii)    with JDBC in CR 2011 IDE
    the rpt file has a cross tab and accpts two parameters.
    When I run the JDBC report through JSP the parameters are never considered. The same report works fine when I remove the cross tab and make it a simple report.
    I have posted this to CR SDK forum and have not received any reply. This have become a blocker and because of this our delivery has been postponed. We are left with two choices,
       Re-Write the rpt files not to have cross-tabs - This would take significant effort
    OR
    (ii)  Abandon the crystal solution and try out any other java based solutions available.
    I have given the code here in this forum posting..
    CR 2011 - JDBC Report Issue in passing parameters
    TIA
    DRG
    TIA
    DRG

    Mr.James,
    Thank you for the reply.
    As I stated earlier, we have been using the latest service pack (12) when I generated the log file that is uploaded earlier.
    To confirm this further, I downloaded the complete eclipse bundle from sdn site and reran the rpt files. No change in the behaviour and the bug is reproducible.
    You are right about the parameters, we are using  {?@Direction} is: n(1.0)
    {?@BDate} is: dt(d(1973-01-01),t(00:00:00.453000000)) as parameters in JSP and we get 146 records when we directly execute the stored procedure. The date and the direction parameter values stored in design time are different. '1965-01-01' and Direction 1.
    When we run the JSP page, The parameter that is passed through the JSP page, is displayed correctly on the right top of the report view. But the data that is displayed in cross tab is not corresponding to the date and direction parameter. It corresponds to 1965-01-01 and direction 1 which are saved at design time.
    You can test this by modifying the parameter values in the JSP page that I sent earlier. You will see the displayed data will remain same irrespective of the parameter.
    Further to note, Before each trial run, I modify the parameters in JSP page, build them and redeploy so that caching does not affect the end result.
    This behaviour, we observe on all the reports that have cross-tabs. These reports work perfectly fine when rendered through ODBC-ActiveX viewer and the bug is observable only when ran through Java runtime library. We get this bug on view, export and print functionalities as well.
    Additionally we tested the same in
        With CR version 2008 instead of CR 2011.
    (ii)   Different browsers ranging from IE 7 through 9 and FF 7.
    The complete environment and various softwares that we used for this testing are,
    OS      : XP Latest updates as on Oct 2011.
    App Server: GlassFish Version 3 with Java version 1.6 and build 21
    Database server ; SQL Server 2005. SP 3 - Dev Ed.
    JTds JDBC type 4 driver version - 1.2.5  from source forge.
    Eclipse : Helios along with crystal libraries directly downloaded from SDN site.
    I am uploading the log file that is generated when rendering the rpt for view in IE 8
    Regards
    DRG

  • Table names in generated stored procs are qualified with sa schema name

    I am using OMW 9.2.0.1.2 with the 9.2.0.1.3 SQL Serevr plugin to help with a SQL Server 7 to Oracle 9.2.0.1 migration on NT.
    As is common with SQL Server databases, the dbo is sa. I don't want my Oracle schema to be called sa. I have succesfully gotten around this by renaming the sa user in the Oracle model in OMW.
    However, the stored procedure code that OMW generates has table names qualified with sa as the schema (the tables names in the original T/SQL procs were not qualified).
    How can I stop OMW from generating table names qualified with sa?
    Thanks.

    Hi,
    this is a bug in the OMWB. As a workaround, you can generate the migration scripts (see reference guide and user guide for more information) from the OMWB Oracle Model and then edit these scripts to ensure that the 'sa' prefix does not appear in the text of the stored procedures. Then use these scripts to generate the schema in your database.
    An alternative is to migrate the stored procedures, schema and data over to the Oracle database using OMWB and then open each procedure in Enterprise Manager, remove the references to the 'sa' prefix and re-compile the procedure.
    I will keep you updated on the release this fix will appear in.
    I hope this helps,
    Tom.

  • Issue with Date Format for Presentation Variables

    Hi,
    I am using dashboard prompts to capture begin date and end date in presentation variables. The dates selected from calendar are in the format mm/dd/yyyy.
    In Asnwers I need to get a count of days between begin and end dates. I am using the column formula as shown:
    TIMESTAMPDIFF(SQL_TSI_DAY, DATE '@{pBeginDate}', DATE '@{pEndDate}')
    When ever I run the report from dashboard I get the following error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46046] Datetime value 1/1/2005 does not match the specified format. (HY000)
    SQL Issued: {call NQSGetQueryColumnInfo('SELECT "Transaction Dates"."Transaction Date", TIMESTAMPDIFF(SQL_TSI_DAY, DATE ''1/1/2005'', DATE ''1/2/2006'' FROM "Dates"')}
    SQL Issued: SELECT "Transaction Dates"."Transaction Date", TIMESTAMPDIFF(SQL_TSI_DAY, DATE '1/1/2005', DATE '1/2/2006') FROM "Dates"
    Can anyone help me to reolve this date format issue?
    Thanks,
    Aravind

    Hi,
    see this below links
    Issues with Prompts calender date
    Regards
    Naresh

  • Dropdown - issue with passing values to context

    Hi,
    After facing issue in:
    Webdynpro + alv + dynamic dropdown
    Now I've encountered another problem. Dropdown is created in alv, however once user select value from the list it shows selected value in the cell, however value in context remains unchanged.
    Here is the way I implemented dropdown:
    1) I added new field to the structure which is shown in the alv FIELD1 of WDR_CONTEXT_ATTR_VALUE_LIST type.
    2) I initialize the column, where dropdown is supposed to be:
    - first column
    l_col_name = 'COL1'.
    lr_column = lr_model->if_salv_wd_column_settings~get_column( l_col_name ).
    DATA: lr_drdn_by_idx_col1 TYPE REF TO cl_salv_wd_uie_dropdown_by_idx.
    CREATE OBJECT lr_drdn_by_idx_col1 EXPORTING selected_key_fieldname = l_col_name.
    lr_drdn_by_idx_col1->set_valueset_fieldname( value = 'FIELD1' ).
    lr_drdn_by_idx_col1->set_read_only( value = abap_false ).
    lr_drdn_by_idx_col1->set_type( if_salv_wd_c_uie_drdn_by_index=>type_key_value ).
    lr_column->set_cell_editor( lr_drdn_by_idx_col1 ).
    3) I load the data,
    Piece of code loading data into structure with dropdown:
    DATA:  ls_valueset     TYPE wdr_context_attr_value,
                lt_itab         LIKE TABLE OF ls_line.
          ls_valueset-value = 'KG'.
          ls_valueset-text = 'KG'.
          APPEND ls_valueset TO lt_itab[].
          ls_valueset-value = 'ST'.
          ls_valueset-text = 'ST'.
          APPEND ls_valueset TO lt_itab[].
    zstructure is type of the row show in the alv
    Data:
         ls_po_result TYPE zstructure.
         lt_po_result TYPE table of zstructure.
         ls_po_result-FIELD1[] = lt_itab[].
         APPEND ls_po_result TO lt_po_result[].
    Everything works so far good. The thing is that once I changed value from e.g. ST to KG, value in Attribute COL1 is still ST.
    I would appreciate your help,
    kind regards,
    Adam

    Hi Nithya,
    it could another issue with the SP, I will inform you if it's the case.
    Passing values comes up with function when I load data into alv.
    structure_name - alv columns structure
    DATA: l_name1        TYPE t001w-name1,
              ls_po_result   TYPE structure_name
              lt_po_result   TYPE table of structure_name,
    load data from DB into l_itab
      LOOP l_itab  AT ASSIGNING item.
    this method return value_set to field1
        CALL METHOD fill_single_dd
          EXPORTING
            i_id     = item-id
          IMPORTING
            rt_dd_table = ls_po_result-field1[].
        APPEND ls_po_result TO lt_po_result[].
      ENDLOOP.
    binding to node ....

  • I have a sync issue with any songs name track 1 or 2 so on ..even though my itune shows I have the play list right but after i sync the same 20 tracks play very different tracks, it doesn't happen when I sync other songs that actually have names

    I have a sync issue with my ipod, anytime I synch a playlist that has generic song names instead of actual names like track 1 or track 2 so on even though my itune library shows and plays the song, but after a sync my ipod will play a different song. Never happnes if the playlist has actual song names, than everything is fine..!!!!Any help?

    If I understand you correctly, when iPod play the Track 1, a different song is played, what is the name of this different song?

Maybe you are looking for

  • How do I convert a web based file to a PDF file?

    How do I convert a web based file to a PDF file? I know that you "Print to File" but for some reason that is not working for me.  I have Adobe Reader X, shouldn't that be able to create a PDF like this, or is there another program that I need to do t

  • IPhone letters don't pop up when keys are pressed

    You know how the letters pop up from under your finger when keys a pressed on the keyboard to let you know which key you press, well sometimes certain letters on my keyboard stop popping up. A restart fixes the key but a few minutes or hours (intermi

  • Email 1 of Multiple Options??

    I have a drop down list of 9 people. I am wanting to be able to submit by email and the form be mailed as a .pdf to the person that was chosen in the drop down list. Is there any way to put a script or something on the submit by email button that wil

  • How can I turn OFF Sitemaps in Muse

    Do not tell me why they matter. I do not want sitemaps in Muse How can I turn their creation off so I do not have to delete them every time I do something? If you do not know how to turn off sitemaps DO NOT RESPOND TO THIS QUESTION

  • Integration with ADF UIX

    Hi, Does anyone has any experience with building application that integrates HTML DB and ADF UIX technology? Are there any restriction to build such applications? regards, Cezary