How to upload database tab(ztable) before executing of report

hi all,
        I have developed a report , in which i have a check box in selection screen, when ever i check this and give inputs to report(year, period), upto that year and period , the database table(ztable), have to be updated (the data is inturn fetched from standarad database table and inserted into my ztable)and that results from the ztable are selected in report.Can any one help me where i shoud write code for this(is it in at selection screen) or not.what commands i have to use to achieve this. Can any one suggest me how to do this, if possible with a sample code

Kiran,
In your report first select the data from the standard table and update the ztable and then display the output fetched from the ztable.
I guess the selection criteria that you are using for fetching from the standard table and selection criteria that you intend to fetch from the ztable for displaying the output are the same.If it is not then do the filtering in the program as per your need and then display the output.
By the way I didn't get why you need a ztable when already the data is available in the standard table.
K.Kiran.

Similar Messages

  • How to preserve database user details before cloning

    Hi Experts,
    How to preserve database user details before cloning,
    I am cloning the test database with the prod database, so my concern is how to preserve the users details which they have in TEST database( like roles, privilges, profiles , passwords, etc.....). Because that all gone after cloning from PROD.
    Thanks
    Sam

    use the following script to take the backup of roles,pwd & other  details of DEV . after cloning  execute the scripts back in DEV to restore the old values....
    set head off
    set lines 200
    set pages 9999
    col owner for a20
    col db_link for a30
    col username for a15
    col host for a40
    col created for a12
    spool db_details.lst
    select * from global_name;
    select * from dba_db_links;
    select name from v$controlfile;
    select member from v$logfile;
    select file_name from dba_data_files;
    select file_name from dba_temp_files;
    spool off
    spool create_db_links.lst
    select 'create DATABASE LINK '||owner#||'.'||NAME|| ' connect to '|| userid || ' identified by '|| password || ' using '||''''|| host ||''''||'; ' FROM sys.link$ order by owner#;
    select username,user_id from dba_users where user_id in (select distinct owner# from link$);
    spool off
    spool alter_user.lst
    select ' alter user '||username||' identified by values ' || chr(39)||password||chr(39) || ';' from dba_users;
    spool off
    Set verify off
    Set space 0
    set feedback off;
    set echo off;
    set pages 1000;
    set lines 150;
    spool create_synonym.sql
    Select 'CREATE SYNONYM '||owner||'.'||synonym_name||' FOR '||table_owner||'.'||table_name||'@'||db_link||';' from dba_synonyms where db_link is not null and table_owner is not null;
    Select 'CREATE SYNONYM '||owner||'.'||synonym_name||' FOR '||table_name||'@'||db_link||';' from dba_synonyms where db_link is not null and table_owner is null;
    spool off;
    Spool profile.sql
    select ' alter user '||username||' profile '||PROFILE||';' from dba_users;
    spool off

  • How to upload data into ztables

    Hi all,
    How to upload data into ztables
    plz sent the detail description as well sa sample programs

    Hi Narendra,
    Sample code to update the Z db table :
    REPORT yupload.
    TABLES ybtab.
    DATA itab LIKE ybtab OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    CODEPAGE = ' '
    filename = 'C:\data.txt'
    filetype = 'DAT'
    HEADLEN = ' '
    LINE_EXIT = ' '
    TRUNCLEN = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    DAT_D_FORMAT = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    data_tab = itab
    EXCEPTIONS
    CONVERSION_ERROR = 1
    FILE_OPEN_ERROR = 2
    FILE_READ_ERROR = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    NO_AUTHORITY = 10
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ELSE.
    INSERT ybtab FROM TABLE itab.
    ENDIF.
    Schedule this program as a Background Job with required time paramters .
    Regards,
    Ramganesan K.

  • How to run a procedure before executing the report in BI Publisher

    Dear All,
    I got a requirement when I should execute a procedure before running the report.
    Here is my requirement
    I have created a temp table and created a stored procedure (temp_proc) which will insert sysdate value.
    create table temp (emp_name varchar(10));
    create or replace procedure temp_proc
    is
    begin
    insert into temp values(sysdate);
    commit;
    end;
    I have written a query in the Data Model section with a new Dataset as SQL Query Type. Now I want to run this report so that the procedure should be executed and it should insert a value in the temp table. I cannot create a datatemplate instead of sql query as it will consume more time.
    I am using BI Publisher 10.1.3.4.2 Standalone version. Please help me out.

    Hi,
    better to ask a question about BI Publisher in BI Publisher Forum than here in Reports Forum.
    You can create a template in your rtf wich you reference in your header. With BI Desktop in Winword you can use a different header for first page than the others.
    Regards
    Rainer

  • How to upload a TAB Delimited file and pls tell me the internal tble format

    Hello All,
    When i upload a TAB Delimited .txt file its giving me # Symbols in between the internal table fields.
    pls advise.
    Suresh

    data: begin of wa_input,  
            plnnr(8) type c,   
            plnal(2) type c,   
            vornr(4) type c,   
            arbpl(8) type c,   
            steus(4) type c,   
            ltxa1(40) type c,  
            ltext(1000) type c,
           end of wa_input.    
    data: i_input like wa_input occurs 0 with header line.
      call function 'WS_UPLOAD'                  
           exporting                             
                filename            = p_input " file path
                filentype           = 'DAT'      
           tables                                
                data_tab            = i_input    
           exceptions                            
                file_open_error     = 1          
                file_write_error    = 2          
                invalid_filesize    = 3          
                invalid_table_width = 4          
                invalid_type        = 5          
                no_batch            = 6          
                unknown_error       = 7.

  • How to pass database login information to a crystal report using c#?

    Hi,
    I need to pass database logon information to a crystal report dynamically using c#.  I am developing a windows application using c# .Net.
    I looked some of the articles however I am not able to figure out the mistake I have did.  Please find below the code I have written so far; It would be great if you could help me out in solving the issue.
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using System.Data.OracleClient;
    using System.Configuration;
    using CrystalDecisions.Shared;
    using CrystalDecisions.CrystalReports.Engine;
    private void Frm_report_Load(object sender, EventArgs e)
                setReportParameters(); // method to pass parameters to the Crystal report
                crystalReportViewer1.ReportSource = new Upper_Lower();  // Upper_Lower is the Crystal report I have used in my project
               TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
               TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
               ConnectionInfo crConnectionInfo = new ConnectionInfo();
               Tables crTables;                            
                    crTables = new Upper_Lower().Database.Tables;
                    crConnectionInfo.ServerName = "oops";
                    crConnectionInfo.DatabaseName = "";
                    crConnectionInfo.UserID = "new";
                    crConnectionInfo.Password = "new123";
                    foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in crTables)
                        crtableLogoninfo = CrTable.LogOnInfo;
                        crtableLogoninfo.ConnectionInfo = crConnectionInfo;
                        CrTable.ApplyLogOnInfo(crtableLogoninfo);
    Thanks & Regards,
    Karthik.

    Hi,
    Try using this code ,
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    using CrystalDecisions.Web;
            ReportDocument rd = new ReportDocument();
            rd.Load(Server.MapPath("Report name"));
            rd.SetDatabaseLogon("User Name", "Password", "Server Name", "Database Name");
            CrystalReportViewer1.ReportSource = rd;
    [See Also.|http://devlibrary.businessobjects.com/BusinessObjectsXIR2/en/devsuite.htm]
    Hope this helps!!
    Sincerely,
    Nikhil Dharme

  • How to pass database logon info to a Crystal Report in a subreport with different server name using VS C #

    Post Author: fabu1971
    CA Forum: .NET
    I could pass the database logon in Reports with subreports but the reports with subreports with different  server name I can not pass the logon information . Do you have any idea how I can do that to pass the database logon with different database or server name ?

    Post Author: quafto
    CA Forum: .NET
    You can use the Subreports collection of the ReportDocument object to access all the subreports in your main report. These are returned as ReportDocument objects. Once you have your subreport as a ReportDocument you can loop through your Tables collection and set the ConnectionProperties to your appropriate Server/Database. For example here is some pseudo code: ConnectionInfo boConnectionInfo = new ConnectionInfo();boConnectionInfo.ServerName = "serverName";boConnectionInfo.DatabaseName = "databaseName";boConnectionInfo.UserID = "username";boConnectionInfo.Password = "yourpassword"; foreach(ReportDocument boSubreport in mainReport.Subreports){    foreach(Table boTable in boSubreport.Database.Tables)    {        TableLogOnInfo boTableLogOnInfo = boTable.LogOnInfo;          boTableLogOnInfo.ConnectionInfo = boConnectionInfo;          boTable.ApplyLogOnInfo(boTableLogOnInfo);          boTable.Location = "newtablelocation";     }}

  • How to create a Custom Screen for executing a report in the backend ?

    Hello Everyone,
    I have a requirement to develop a Custom Application on the Cloud to capture few fields from user and trigger an execution of a report in the background in CRM. There is no need to display any results after the triggering execution. Just need to show a message that "Background Job was successfully submitted".
    I saw the types of screens available for creation as explained in this link Screen Types, unfortunately none of the screen types works out for me.
    As seen from the requirement, there is no need to store any data send from the UI in backend. So, it doesn't make sense for me to create a Business Object. So I tried creating a Query Object to see if that works out, but query object also requires a BO to execute query on and it also makes result list view mandatory and asks me to pick atleast one field to show in the result list.
    I also tried Mass Data run which doesn't fit the bill.
    So, I'm looking for the best possible UI screen and approach to build a simple custom application with 5-6 fields and an execute button. Please suggest me the best possible option available in the C4C.
    Regards,
    Srikanth

    Hey,
    first of all: if you really need a button, you will need to create your own business object with an action.
    If you just want to trigger the service you could add an extension field of type indicator to any standard Bo and the put logic in the before save of this Xbo. Then you just add the indicator to the UI. But the user would always have to go to this screen I.e. The customer...
    so i guess maybe a custom business object with only one instance, a button, some logic in an action and a generated UI including a workcenters 'backend report execution' is the best way for you!
    cheers
    jens

  • How to save Database Configuration setting to a Crystal Report Instance

    Hello,
    I'm using .net c# to create and run a schedule of a crystal report.
    I'm able to connect to BOE and succesffuly create the schedule instance and pass the parameters. but it's failing to run because I'm not providing it with the Database Logon credentials.
    I know there is a way to set the database confiuration on the report in CMC, but we don't want to do that so we can have a trail of who ran the report. We want to pass that through code when scheduling an instance. Can someone tell me how to do so.
    Thanks!

    ceReportObjects = ceInfoStore.Query(sQuery);
    //check for returned reports
    if(ceReportObjects.Count > 0)
         ceReportObject = ceReportObjects[1];
         ceReport = (Report)ceReportObject;
         //grab the report logons
         dbLogons = ceReport.ReportLogons;
         dbLogon = dbLogons[1];
         //set custom values
         //** NOTE: **
         //The easiest way to determine the proper custom logon values is to
         //successfully set custom logon values through the CMC first, then
         //transpose those values to this application
         dbLogon.UseOriginalDataSource = false;
         dbLogon.CustomDatabaseDLLName = "crdb_ado.dll";
         dbLogon.CustomServerName = "servername";
         dbLogon.CustomDatabaseName = "database";
         dbLogon.CustomUserName = "username";
         dbLogon.CustomPassword = "password";
         dbLogon.TableLocationPrefixes[1].MappedTablePrefix = "DatabaseName.dbo.";
         dbLogon.TableLocationPrefixes[1].UseMappedTablePrefix = true;
         //Create an interface to the scheduling options for the report.
         SchedulingInfo ceSchedulingInfo;
         ceSchedulingInfo = ceReport.SchedulingInfo;
         //run the report right now
         ceSchedulingInfo.RightNow = true;
         //run the report once only
         ceSchedulingInfo.Type = CeScheduleType.ceScheduleTypeOnce;
         //schedule report
         ceInfoStore.Schedule(ceReportObjects);
    Taken from a sample contained [here|https://smpdl.sap-ag.de/~sapidb/012002523100005921432008E/bexi_csharp_smpl.zip]

  • How to hide Database Logon option when scheduling Crystal Report in BOE?

    Hi All,
    For security reason, we are try to hide the Database Logon option in Crystal Report Schedule page in InfoView.
    There is option in CMC which we can configure the default Database logon option so that users do not have to enter the logon everytime they view or schedule the report.  However, we are looking to hide this option completely.
    Does anyone know if there is a security setting which can hide the option from specific users?
    Thanks,
    Bobby

    Hi Bobby,
    As Jorge informed that there is no method available within CMC to hide database logon option when scheduling or viewing a Crystal Report in the Info view. This is very much true.
    But as you also mentioned that you don't want your users to enter the database logon credentials evertime they view or schedule a crystal report, there is one setting in CMC which we can do to avoid prompt for database logon credentials.
    CMC - Home - Go to that specific crystal report - Click Process tab - Click the sub-tab 'Database' and at the bottom of the page there is an option "Use same database logon as when report is run". Check this option after providing the database credentials and click UPDATE.
    Now whenever users try to view or schedule this specifc crystal report they won't be prompted for the database logon credentials.
    Regards,
    Venkat

  • How to Change Database parameters as suggested by EWA report

    Dear Experts,
    As per EWA report , i have been asked to change several DB parameters as per note 0124361 . Should i go aghead and change the parameters ? What is the procedure of chaging those parameters? what is the real process that should be followed ? Please revert.Points guaranteed.
    Regards,
    Somya

    Run "brspace -f dbparam"
    Select option 1 "Change parameter value" and change the parameters. After changing select option 3 to create a new init.ora.
    If you change parameters that have the scope "spfile" oracle requires a restart. If you only change parameters with scope "both" you don't need a restart of oracle. This changes are affected on the fly.
    To restart oracle:
    connect / as sysdba
    SQL> shutdown
    SQL> startup
    You don't need to stop SAP if you only change oracle parameters. SAP reconnects automatically if the database is up.

  • Dashboards: Wait for a dashprompt selection before executing Answers report

    We have some dashboards consisting of a dashboard prompt and two Answers reports. Because the answers reports take a long time to execute without narrowing the selection, we would like BI to only start executing the Answers reports after a selection has been made in the dashboard prompt. Is there any way to achieve this?
    Greetings,
    Andreas

    Report will run upon navigating.. I dont think we do have an option that overrides this feature...
    One thing I can suggest you to overcome the issue:
    the answers reports take a long time to execute without narrowing the selection
    Default the Prompt with any String that doesnot retrieve any value.. viz. use string Tax for Tax Reports...
    -Vency

  • How Many Points Do I Need Before I Can Report Abuse?

    I noticed a thread was removed yesterday because it mentioned a bad JB had caused issues and we all know that hacking Apple iPhones and iPads can't be discussed here, however I was about to explain to this person that they should restore their phone to original factory condition using iTunes and forget about the JB when it was yanked.
    When I posted a complaint my thread got yanked presumably simply because it mentioned the dreaded JB word.
    I wouldn't mind so much but doing a forums search using that word produces at least 2 pages of threads that have been left intact, many of them in Enterprise and stretching back over quite a long period of time, so I feel that someone is acting in rather an arbitrary manner and not reading the posts before yanking them.
    I shall await the yanking of this thread but I tell you, as a veteran poster in many security-related forums, I do know the meaning of the expression acceptable behaviour.

    Meg St._Clair wrote:
    I think it's more a question of way too little time. This is a VERY busy forum. The Hosts can't possibly read every post as well as deal with all the maintenance, answer questions. I don't know if you saw my answer to you in your other thread. Several Hosts have said that moderation is more of an art than a science. They try to balance a the TOU against a lively exchange of ideas (and sometimes, it gets very lively!). They are also human. Sometimes one host will have a different take on a post than another. Sometimes, deaicions are changed and threads get reinstated.
    Whether threads are left open also depends on timing. I don't spend much time in the Mac forums these days nut I'd bet that the Hosts are being a bit more lenient about somethings because of the recent release of Lion. They tend to allow posts that are a bit closer to rants when there has been a big release because, well, some people are freaking out.
    It's never going to be completely consistent. However, every Host I've ever interacted with has seemed to be trying very hard to make this a useful, and yes, even fun place.
    If you have a concern, post it here and it will get sorted out.
    Best of luck.
    I moderate McAfee and Neosmart forums, so I know what you mean.
    Thanks.

  • Executing PL-SQL Query before running a Report

    Hi Guys,
    Can i use a Run a Pl-Sql Query every time before executing a report. Like if i am opening a report then the pl-sql Query should run before it.
    Thanks
    Rondo.

    Try with Evaluate as one of the column's expression.. so that we can limit to specific report..
    or
    Use Connection Pool->Connection Pool Scripts tab->use 'Execute before query'
    Since we can set the repository variables using advanced tab.. the same variable we may validate using Connection pool scripts tab.
    This might be more dev work..
    Edited by: Srini VEERAVALLI on Dec 17, 2012 9:00 PM

  • How to set Database Logon Info, if allowDatabaseLogonPrompting="false"

    Hey,
    Here is the Version Details -
    Crystal report X1 R1
    Sql Server 2005
    Tomcat 5.5.27
    Question -
    I am using jsf viewer to dispaly report in my web project. We don't want to prompt for database logon information before showing the report to teh front user. I have seen few sample jsp code which creates the crystalreportviewer object and set the connectioninfo details and calls the processhttprequest method to render the report. I have tried the same approach and it works for us.
    But our requirement is to just use the jsf tags. Is there a way to pass the database credentials to the jsp without prompting for Logon Information or using the java code to populate the connectioninfo in crystalreportviewer instance.
    Here is the jsp file -
    <%@ taglib uri="/crystal-tags-reportviewer.tld" prefix="crviewer" %>
    <crviewer:viewer displayGroupTree="false" viewerName="CrystalViewer"
    reportSourceType="reportingComponent"
    displayGroupTree="false"       
            displayToolbarExportButton="true"
            displayToolbarPrintButton="true"
            displayToolbarRefreshButton="true"
            displayToolbarToggleTreeButton="false"
            displayToolbarCrystalLogo="true"
    top="100"
    left="200"
    reportSourceVar="#{Report.reportSource}"
    isOwnPage="true"
    displayGroupTree="false"
    allowDatabaseLogonPrompting="false">
    <crviewer:report reportName="Report.rpt">
         <crviewer:partsViewer viewerName="CrystalViewer"
              reportSourceType="reportingComponent"
              title="Fill to Fill Report"
              numberOfRecords="10"
              showHeadings="true"
              showPageNavigationLinks="true"
              allowParameterPrompting="false"
              reportSourceVar="#{Report.reportSource}"/>
    </crviewer:report>
    </crviewer:viewer>
    I am trying to run this and it shows an error page with information Database Login Error.
    I have created the report using JDBC/JNDI database connection with trusted authentication = false.
    The Sql Server 2005 error log shows -
    Error: 18456, Severity: 14, State: 5.
    Logon       Login failed for user ''. [CLIENT: <named pipe>]
    Any help will really be appreciated.
    Thanks
    Bonyshree

    Yes within the report designer i am able to refresh the report and open and close the report without getting prompted. I am not changing any database properties at runtime and using the jar files which come with CR Release 2.
    All i am doing is to export the report in pdf format. Here is the code :
    ReportExportControl exportControl = new ReportExportControl();
    ExportOptions exportOptions = new ExportOptions();
    PDFExportFormatOptions  pdfOptions = new PDFExportFormatOptions();
    exportOptions.setExportFormatType(ReportExportFormat.PDF);                 
    exportOptions.setFormatOptions(pdfOptions);     
    exportControl.setExportOptions(exportOptions);
    exportControl.setExportAsAttachment(false);     
    exportControl.setReportSource(this.wrapper.getReportSource());
    exportControl.setName(this.wrapper.getReportName());
    exportControl.setEnableLogonPrompt(false);
    //Pass Fields object to ReportExportControl
    exportControl.setParameterFields(this.wrapper.getFields());
    //Export only works if i pass the connections object with connectioninfo object populated with username and password.
    //We want to run the report using trusted authentication i.e. we don't want to pass username and password.
    exportControl.setDatabaseLogonInfos(connections);               
    if(to_refresh)
      exportControl.refresh();
    If i don't provide the connectioninfo object with proper username and password to run the report inside the java class, it try's to logon to database using username = 'userid'. I think it picks it from the JDBC Connection String created while creating database connection for the report in the designer.
    Here is the jdbc connection string for the JDBC/JNDI connection created inside the report designer:
    !net.sourceforge.jtds.jdbc.Driver!jdbc:jtds:sqlserver://localhost:1433/customer;namedPipe=true!user=!password=.
    Is there a way to get pass this problem??? Is there a way to force the connection from the java class to use trusted authetication??? Can we change the connection string to replace the userid with empty string to force trusted authetication???
    Any help will be really appreciated.
    Regards
    Bonyshree

Maybe you are looking for

  • Time Machine forcing computer to restart

    I have just bought a new iMac and am trying to back up onto a external hard drive using time machine. I have erased and partitioned the Hard Drive and then tried to back up onto it. When I do this it works until about 12gb of the 203gb are backed up

  • Call Web Dynpro application on a button Click.

    Hi, I have 2 web dynpro components.(COMP1 and COMP2). I wants to call  the application of COMP2  from a button click  from COMP1. 1. In COMP1  view i have a button. I have  created an outbound plug 'TO_APP'  with parameter 'URL' type string. 2.  Insi

  • Virtual Directory Change from Oracle HTTP Server to Embedded PL/SQL Gateway

    We finally upgraded from htmldb 1.6 to ApEx 3.1.2 late last year. This was in conjunction with setting up a new server and installing Oracle 11g DB, while our production DB is still 10g. During this install, I opted for the Embedded PL/SQL Gateway, w

  • Command prompt showing 2 users

    well... i have been using OS X for quite a while now. Recently i thought of learning UNIX commands in command prompt... so while learning, I came acroos a commant that shows all the users logged in - " who | wc -l " when i typed this command in the p

  • Register System for UWL

    Hi,      I am not able to register a system for UWL. We have created a system named as "QAS". I am getting error as "System not registered". We are using EP 6 SP 19. Can anybody help me in this case? Regards, Vaibhav