CALL a report from WDA using SUBMIT to sap-spool

Hi,
I need to call a report from one of the methods of a WDA application.
The out of this report is a sapscript. I want show it in WDA (PDF).
The report is called when a user clicks EXECUTE button.
The piece of the code is:
  call function 'GET_PRINT_PARAMETERS'
    exporting
      immediately            = 'X'
      new_list_id            = 'X'
      no_dialog              = 'X'
      receiver               = sy-uname
      release                = 'X'
      sap_cover_page         = 'X'
    importing
      out_archive_parameters = t_arcpar
      out_parameters         = t_pripar
      valid                  = i_valid
    exceptions
      archive_info_not_found = 1
      invalid_print_params   = 2
      invalid_archive_params = 3
      others                 = 4.
      submit hbrcced0
                      with pnppernr-low eq i_pernr
                      with pnpbukrs-low eq t_p0001-bukrs
                      with pnpbegda     eq i_begda
                      with pnpendda     eq i_endda
                      with p_expot      eq ''
                      with ano          eq v_gjahr
                      with respcc       eq v_sachn
                     to sap-spool
                     spool   parameters t_pripar
                     archive parameters t_arcpar
                     without spool dynpro
                     and return.
    if sy-calld eq ''.
      message 'err' type 'E'.
    else.
If i execute this code in WDA, the sy-calld never is equal 'X'.
But if i execute it in program (SE38) the sy-calld is 'X'.
How i can call the program 'hbrcced0' in WDA ?
Cheers,
Silvio Galery

Hi Silvio,
a submit REPORT to spool does work from WDA.
ONLY when "and return" is used.
You have that, so it should work.
Note you had print immediate on, so it will be output on printer,
and not available to read after the call.
(which option was the keep after print?, I would have to check docu)
The sy-calld will be set to X  inside the REPORT when it is running.
After the submit has run back inside WDA it is of course reset to space again.
Cheers
Phil.

Similar Messages

  • Calling a report from form using web.show_document

    Hi,
    Used the method as below, But , error reprot not found,
    Could anybody tell me how to get the server name from ny local machine as in the example servername ' Repsrv '
    /* WHEN-BUTTON-PRESSED */
    DECLARE
    vc_url varchar2(100);
    BEGIN
    vc_url:=‘http://<hostname><port>/reports/rwservlet?server='
    ||
    ‘Repsrv&report=reptest.rdf&desformat=htmlcss&destype=cache ’
    ||
    '&userid=user/pw@database&p_deptno='||:dept.deptno||'&paramform
    =no’;
    WEB.SHOW_DOCUMENT(vc_url,’_blank’);
    END;
    Thanks

    If you are attempting to print a report from a when-button-pressed trigger from within a form, you do not have to explicitly specify the server (hostname) nor the port. You can just use what I've found referred to as a virtual path to the server as I have done here:
    parm_string := '/reports/rwservlet?config=my_config&report=report_name'
         ||'&desformat=pdf&destype=cache'
         ||'&paramform=no&printjob=no'
         ||'&p_my_user_param1='||v_my_param1
         ||'&p_my_user_param2='||v_my_param2;
    web.show_document(parm_string,'_blank');
    You can specify a userid/password@connectstring within a named congifuration section of your formsweb.cfg file if necessary, e.g. my_config.
    Hope this helps.
    James K.

  • Crystal report from JSP using the JRC

    Hi, I am trying to call crystal report from JSP using the JRC.
    But i am getting the Error as 'Logon Failed'. my web.xml entry is
    <env-entry>
    <env-entry-name>jdbc/Test</env-entry-name>
    <env-entry-value>!oracle.jdbc.driver.OracleDriver!jdbc:oracle:thin:{userid}/{password}@//10.0.0.1:1521/TestDB</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    i am setting the userid and password in the code. Please see the below code for your reference. Please help me to solve the issue.
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@ page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
    <%@ page import="com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource" %>
    <%@ page import="com.crystaldecisions.reports.reportengineinterface.JPEReportSource" %>
    <html>
    <head>
    <title>Crystal Report with Database Logon information</title> </head>
    <body bgcolor="#ffffff">
    <%
    try
    String report = "/TEMPLATE.rpt";
    IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
    JPEReportSource reportSource = (JPEReportSource) rptSrcFactory.createReportSource(report, request.getLocale());
    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setReportSource(reportSource);
    viewer.setHasRefreshButton(true);
    IConnectionInfo newConnInfo = new ConnectionInfo();
    newConnInfo.setUserName("TEST");
    newConnInfo.setPassword("TEST");
    ConnectionInfos newConnInfos = new ConnectionInfos();
    newConnInfos.add(newConnInfo);
    viewer.setDatabaseLogonInfos(newConnInfos);
    viewer.setEnableLogonPrompt(false);
    viewer.setOwnPage(true);
    viewer.setOwnForm(true);
    out.println("Connection Information: "+viewer.getDatabaseLogonInfos().getConnectionInfo(0).getAttributes().toString());
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(),null);
    viewer.dispose();
    catch(Exception e)
    throw new JspException( e);
    %>
    </body>
    </html>

    I never really had much luck with this approach.
    Mind you I was using Crystal Reports 10, and as far as I recall it didn't allow setting/changing of database at this level.
    Things to check
    - can you create a database connection on your page with this URL/username/password?
    - what server are you using? Tomcat? WebLogic?
    I found this in your other post:
    Connection Information: {Server Name=ee6rpt, Connection String=DSN=s(ee6rpt);User ID=s(ee62test);Password=;UseDSNProperties=b(false), Database Name=, Database DLL=crdb_odbc.dll}That would indicate it is using odbc to connect to the database (crdb_odbc.dll). ODBC is a bad idea with java.
    The way I have got it to work for me (after much trial and error) was to in Crystal Reports to connect using the Oracle Driver, and specifying a tnsname - eg define REPORT_DS in tnsnames.ora.
    When running through the JRC, it looked for a JNDI datasource under that same name "REPORT_DS".
    Don't know if that will help you or not.
    Good luck,
    evnafets

  • Regarding tutorial of how to call Oracle Reports from APEX

    Hi,
    I'm trying to call Oracle Reports from APEX using this tutorial.
    http://www.oracle.com/technology/products/database/application_express/howtos/howto_integrate_oracle_reports.html
    But in the step of 'Create the Oracle HTML DB Application', 'OE' doesn't appear in the LOV of Existing Schema, even though the sample schema exists in the schema and they are unlocked. And when I type 'OE' directly without using LOV, and press Next, the message 'Schema is reserved or restricted' appears.
    How can I create the workspace based on OE schema?

    Hello Shohei,
    I know your following the tutorial, but if you want to call oracle reports from apex it is quite easy though if your working with oracle reports 9i or higher. Just create an html region and put in the source the html code for referencing an url like to_report
    Or reference the same url from a button placed on the HTML region
    (you can create a package that would create the whole URL and returns it as a string, easier for scalability)
    Hope this can help you to (tutorial is good but try and learn from scratch is also good ;-) )
    Erwin

  • Calling XML Publisher Report from OAF using the conc programs xml output

    Hi all
    I am trying to call a report from oa Framework. I have developed the Template in the Ms-Word and for Generating the xml data i used the view object defined in OAF, this approach is working for me...i used the following code to do this in the AM as mentioned in many places...
    public XMLNode getEmpDataXML()
    OAViewObject vo = (OAViewObject)findViewObject("EmpVO1");
    XMLNode xmlNode = (XMLNode) vo.writeXML(4, XMLInterface.XML_OPT_ALL_ROWS);
    return xmlNode;
    now i want that instead of the view object i should use the xml generated by the report which is registered as concurrnet program with output as xml.
    I am submitting the concurrent program and able to get the request id ...
    Now from here what should i do.. please suggest...

    Hi,
    I am thinking of doing something very similar. What i was planning on doing is submitting the request, and then redirecting the user to the concurrent request page. They can then use the standard functionality to view output and get the xml to use the appropriate template.
    i would be interested in how you get the concurrent request id from the submitted job.
    Many thanks
    Rupesh

  • HOW TO HIDE USERID PARAMETER, WHEN CALL REPORT FROM MENU USING FORM 10G

    good morning colegas
    i'm from panama
    when i call a report from a oracle forms menu, its send a user, pass and bd in the url, i need to hide this parameter userid,
    cuando llamo un reporte desde forms, se envia el usuario, pass y bd en el url nesesito ocultar estos parametros del url, le agradeceria si alguno tiene algun eejmplo q me de, de como ocultar estos parametros
    i'm using oracle forms y report 10g
    this is my msn [email protected]
    slds desde panama

    this document show us, only when i call a report from a forms, but not from a menu!
    but to hide these parameters, i need to create a bean in a block a way and the menus do not allow me to create these objects
    you done this before?
    you have a example?
    slds desde panama

  • Help me in using RUN_PRODUCT to call a report from form

    Hi GURUs
    I am trying to call a report from a form.
    I enter hiredate as input parameter in the form and click the 'run report' button.
    The hiredate value will be sent to report via pl_id, TEXT_PARAMETER,:CTL.TXT_DT as shown below in when button pressed trigger
    DECLARE
    pl_id ParamList;
    BEGIN
    pl_id := Create_Parameter_List('tmpdata');
    Add_Parameter(pl_id,'HRDATE',TEXT_PARAMETER,:CTL.TXT_DT);
    Run_Product(REPORTS, 'C:\empreport.RDF', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    END;
    Coming to report side its a simple query select * from emp where trunc(hiredate) > trunc(:hrdate);
    I created 'hrdate' user parameter in the report
    The problem is when I run the form it calls report and shows the report parameter form with the carried value. now I have to run report again.
    How do I supress this paramenter form because when I am sending value from form I dont have to see the parameter form at the report.
    I dont know how to use paramform = no with RUN_PRODUCT
    Please tell me what to do it....
    Thanks

    Looking at the Forms documentation it specifies, "To run a report from within a form, you must use the dedicated report integration built-in RUN_REPORT_OBJECT." The RUN_PRODUCT built-in is used to run the Graphics product. I suggest you give RUN_REPORT_OBJECT a try. This is how we call a report from a form.
    Hope this helps.
    Craig...

  • Calling a report from a form based on procedure

    I created a form based on a procedure.
    It is a entry form where the user is selecting or enters data then on submit I must display the report based on selected data.
    I know I can simply create a report with all bind variable and do the job.
    My question is what is the syntax to call the report from the procedure for the selected parameters values.
    Thanks
    Lawrence

    If you want to display other HTML page after successful submission, you need to use
    either go or call method.
    I created a form on SCOTT.EMP and a report on SCOTT.EMP and the report accept a parameter for
    the deptno. Here is my on successfull submission code:
    declare
    l_dept number;
    l_url varchar2(2000);
    begin
    l_dept := p_session.get_value_as_number('DEFAULT', 'A_DEPTNO', 1);
    l_url := 'scott.rpt_mask_1.show?p_arg_names=emp.deptno&p_arg_values='&#0124; &#0124;l_dept;
    go(l_url);
    end;
    null

  • Calling a report from module pool program

    Hi all,
            I had a requirement where I need to call a report from the module pool program where in when we click REPORT button, it should display the report output in the another screen.
    Can we do by calling screen after pushing REPORT button. If so, where we should write that code ( In pbo or pai). Please give me an idea.
    Thanking you,
    Regards,
    Murali Krishna T

    Use submit syntax.
    Press F1 on submit, Donot use return statement with it.
    If so, where we should write that code ( In pbo or pai).
    Please understand about these two events before doing the requirement.

  • Calling a report from function module

    Hi Friends,
    I have requirement for Function Module i.e. we will add the button to the standard T-code and ( Function added in config ) then
    Function to be called from Customizing
    Program A called from customizing function
    CalculationPDFFunction  is called from program A.
    So can any one help me the logic for "calling a report from function module  ".
    Thanks in Advance.
    Regards,
    OSReddy.
    Edited by: OSReddy on Sep 23, 2011 7:31 AM

    Hi Jaya,
    Yes. It is possible to call ur custom program using SUBMIT statement.
    1. If u have data to pass then build table type RSPARAMS and use below statement.
    data:
          rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab,
    SUBMIT report1 WITH SELECTION-TABLE rspar_tab
                   AND RETURN.
    1. If u want to create variant to the program and use that. use the below statement .
    SUBMIT report1 USING SELECTION-SET 'VAR1' "variant
                   AND RETURN.
    Regards,
    Venkat.O

  • Regarding calling 1 report from another

    Hello Friends,
       Can u plz tell me how to call one report from another report.
    Regards,
    Drashana

    hi,
    Use SUBMIT program statement
    SUBMIT ZFIR001
    chk this.
    *Code used to populate 'select-options' & execute report 
    DATA: seltab type table of rsparams,
          seltab_wa like line of seltab.
      seltab_wa-selname = 'PNPPERNR'.
      seltab_wa-sign    = 'I'.
      seltab_wa-option  = 'EQ'.
    load each personnel number accessed from the structure into
    parameters to be used in the report
      loop at pnppernr.
        seltab_wa-low = pnppernr-low.
        append seltab_wa to seltab.
      endloop.
      SUBMIT zreport with selection-table seltab
                                    via selection-screen.
    *Code used to populate 'parameters' & execute report 
    SUBMIT zreport with p_param1 = 'value'
                    with p_param2 = 'value'.
    Other additions for SUBMIT
    *Submit report and return to current program afterwards
    SUBMIT zreport AND RETURN.
    *Submit report via its own selection screen
    SUBMIT zreport VIA SELECTION-SCREEN.
    *Submit report using selection screen variant
    SUBMIT zreport USING SELECTION-SET 'VARIANT1'.
    *Submit report but export resultant list to memory, rather than
    *it being displayed on screen
    SUBMIT zreport EXPORTING LIST TO MEMORY.
    Once report has finished and control has returned to calling
    program, use function modules LIST_FROM_MEMORY, WRITE_LIST and
    DISPLAY_LIST to retrieve and display report.
    \[removed by moderator\]
    rEGARDS
    Edited by: Jan Stallkamp on Jul 29, 2008 5:25 PM

  • **How to call a report from a form by passing a specfic value?????

    Hi Expert,
    I want to call a report from a form.My problem scenario like, a user is login to his account and there is a option called ADMIT CARD(Push Button).Now when he pressed the button a report will generate.I want that when he pressed the button the user id of the user will passed to the report and the report will generate corresponding to his details which was stored in the database.This scenario is like any online admit card.
    Suppose I want a details report of employee whose employee_id=100.How could I pass this value(employee id) to report which will generate a report details.
    Thanks,
    TAPAN
    Message was edited by:
    user630863

    Thanks for replying.
    Actually I am a beginner.I think that I have to use RUN_REPORT_OBJECT built-in.But I cannot understand the parameterlist.Can u plz give me any example or code then I am very thankful.
    Suppose I want a details report of employee whose employee_id=100.How could I pass this value(employee id) to report which will generate a report details.
    Thanks,
    TAPAN

  • How to call a report from a web application

    Hi,
    I have a web server in wich is installed Reports 6i. My question is how can I call reports 6i to generate a pdf using a .rep file from my web application (built with java)?

    Hi,
    The below link will be very useful for one who need idea on calling Oracle Report from Java Application,
    http://www.oracle.com/technology/products/reports/htdocs/getstart/examples/reportswebservice/index.html
    Thanks & Rgds,
    M T

  • Call Oracle Reports from  Forms ver 9i or 10g

    Hi,
    Can somebody guide me, how to call Oracle Reports from the Oracle form 9i,
    Run_product is no more available into 9i & 10g, Run_report_object is not working with out put type "Screen" or "preview".
    What is the best way to call the reports from the form ??? pls help...
    Thanks in avdance.
    Jitesh ([email protected])

    You can use RUN_REPORT_OBJECT with CACHE type, and WEB.SHOW_DOCUMENT to view the document on the screen.
    In the Forms help you should find examples.
    If you have access to Metalink, have a look at Note:207396.1.

  • How to call a report from a menu ?

    I am converting 6i client/server forms to 9i.
    I have a menu that has an option on it to run a report for each menu item selected using RUN_PRODUCT.
    9i is making this obsolete, so how can I call a report from a menu (not a form) now then ?
    In a form it is fine cos I just use the Report Object - a menu does not have this facility.
    Thanks in advance.

    Hi,
    so here is how this should be done:
    1. Create a Reports node in the Forms module that uses the menu (you don't have to create one Reports Object for each report that you want to run)
    2. From the menu, before calling Run_Report_Object() use Set_Report_Object_Property() to set the phsical file name of the Reports that should be executed. This is kind of best practice and does not have a performance hit.
    There is a bug filed against Forms to extend the menu files with a reports Object node. This could require a change to teh file structure which is why we looking for Forms 10i to implement this. (If it turns out that we can have it without recompiling the menu modules then it may go into a patch set - however this seems unlikely from my point of view)
    Fran

Maybe you are looking for

  • Running a Java program over and over.........

    I'm new to java development, so forgive me if this is the wrong forum, or just a stupid question. What I have is a java program that reads messages from an IBM MQseries queue using the MQseries AMI interface, makes a connection to an oracle database,

  • Adobe Captivate 7 will not open after successful installation

    After successful installtion of Captivate 7, I am unable to open/run the program.  The error message below is received when attempting to open the program.  I've installed/uninstalled the program twice both with the same results.  Any thoughts on why

  • Can't install cc-patches after upgrading to windows 8.1

    Hi Adobe-Team, after upgrading to windows 8.1. I can't install updates and patches of the creative cload programms. I'm able to uninstall programms. I'm able to install programms, but i cant't patche them. Got this message: "Installation erfolgreiche

  • If i buy an album on itunes will i get the album only songs 2?

    I want 1 song but i can't buy it because it says album only

  • Cannot Business Component for Jdev9040

    I cannot fined Cannot Business Component for Jdev9040 as it was present in jdev9010.? When i install bibeans9032 into the jdevhome (jdev9040) it gives message that jdevloper903 or higher should be installed... Although i have instaled jdev9040??? Is