How to create a report with selection screen that can run in background

Sorry to ask these basic questions but I am knew to ABAP Programming.
To keep it simply, I am attempting to create a report that has a simple parameter driven selections screen with one field.  That field takes in a folder path from the user.  The user executes the report.  The report creates a simply BDC that goes into SE16, gathers data from a table, and exports the results to a text file using the folder path provided.  I created a variant for the folder path field in the selection screen hoping to use it while executing the report in the background.  The report is not exporting the file as it did when run in the foreground for some reason.
I am wondering what event is triggered when a report is executed in the background.  In the foreground (or when I execute the program via SE38->Execute->With Variant) the user needs to execute the program by hitting the execute button once the variant has populated the folder path field.  It works then, so I am trying to get the same to work in the background.  I am thinking I didn't put the program together correctly to accommodate the running in the background.  How can you create a report that can accept user input via variant into a selection screen and then run in the background?
Please, any information would be greatly appreciated.
Thanks you all for reading this!!!

Ok, finally I understand what you're doing. Initially you lost me with the SE16 reference...
Not sure what you're trying to achieve overall, but apart from the fact that you cannot export/download a file to a user's PC via background job (unless you have a mapped network share on the server or something like an FTP server on the user's PC, but both are pretty hypothetical scenarios and unlikely to occur).
Also, the BDC approach to get data via SE16 is pretty awkward. Note that SE16 is guarded by some authorization checks and often users won't have access in production (which might not matter if you intend to always run your program in background via dedicated batch user). However, I have no clue why you wouldn't want to use [open SQL|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_READING.htm] to read the data. You could then save it on the application server or if you really have to get it to the user you can consider e-mailing the file (extracts should be compressed before sending). For the latter you'll find plenty of references here, basically it's the [business communication services|http://help.sap.com/saphelp_nw2004s/helpdata/en/2d/1c5d3aebba4c38e10000000a114084/frameset.htm] that you'd need to look at.

Similar Messages

  • How to fill internal table with selection screen field.

    Hi all,
    i am new to sap . pls tell me how to fill internal table with selection screen field.

    Hi,
    Please see the example below:-
    I have used both select-options and parameter on the selection-screen.
    Understand the same.
    * type declaration
    TYPES: BEGIN OF t_matnr,
            matnr TYPE matnr,
           END OF t_matnr,
           BEGIN OF t_vbeln,
             vbeln TYPE vbeln,
           END OF t_vbeln.
    * internal table declaration
    DATA : it_mara  TYPE STANDARD TABLE OF t_matnr,
           it_vbeln TYPE STANDARD TABLE OF t_vbeln.
    * workarea declaration
    DATA : wa_mara  TYPE t_matnr,
           wa_vbeln TYPE t_vbeln.
    * selection-screen field
    SELECTION-SCREEN: BEGIN OF BLOCK b1.
    PARAMETERS : p_matnr TYPE matnr.
    SELECT-OPTIONS : s_vbeln FOR wa_vbeln-vbeln.
    SELECTION-SCREEN: END OF BLOCK b1.
    START-OF-SELECTION.
    * I am adding parameter value to my internal table
      wa_mara-matnr = p_matnr.
      APPEND wa_mara TO it_mara.
    * I am adding select-options value to an internal table
      LOOP AT s_vbeln.
        wa_vbeln-vbeln =  s_vbeln-low.
        APPEND  wa_vbeln TO  it_vbeln.
      ENDLOOP.
    Regards,
    Ankur Parab

  • How to create a report with survey data

    Hi All,
    I need to create a report with survey data in below format. Can anyone help me how to display the summary in this format.
    Swapna

    Hi Swapna,
    According to your description, you want to create a report with survey data and display the summary.
    Reporting Services is used for rendering the report with data retrieved from datasource. In Reporting Services, we can retrieve data from the datasource then design a report, after the report processed, data is fixed on the report. So it’s not supported
    to have the end users selection and do summary. For your requirement, it’s can’t be achieved currently.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Call a report with selection screen as subscreen.

    Hi all,
    i need to Submit And Return a Report having some parameters and Select options, from a Function Module.
    all i want that the Selection Scrren of Report should appeared as Subscreeen, so that Calling Screen sould be visible in Background.
    Is this Possible , if yes then How ?
    thanks in advance,
    Nitin

    Running new report means opening new internal session. This can't be embeded within the current internal session where your function group (function module specifically) runs. So there is no such a way which you could run a report inside a subscreen area.
    If you however want only selection screen of the report to be embeded inside your subscreen area (not run) you can use
    "report Z_SUBSCREEN_REPORT
    SELECTION-SCREEN BEGIN OF SCREEN 0200 as SUBSCREEN.
      PARAMETERS pa type c.
    SELECTION-SCREEN end of SCREEN 0200.
    "main screen's flow logic in function group with subscreen area
    PROCESS BEFORE OUTPUT.
      call SUBSCREEN area INCLUDING 'Z_SUBSCREEN_REPORT '0200'.
    Regards
    Marcin

  • How to create a report with data using the Crystal Reports for Java SDK

    Hi,
    How do I create a report with data that can be displayed via the Crystal Report for Java SDK and the Viewers API?
    I am writing my own report designer, and would like to use the Crystal Runtime Engine to display my report in DHTML, PDF, and Excel formats.  I can create my own report through the following code snippet:
    ReportClientDocument boReportClientDocument = new ReportClientDocument();
    boReportClientDocument.newDocument();
    However, I cannot find a way to add data elements to the report without specifying an RPT file.  Is this possible?  I seems like it is since the Eclipse Plug In allows you to specify your database parameters when creating an RPT file.
    is there a way to do this through these packages?
    com.crystaldecisions.sdk.occa.report.data
    com.crystaldecisions.sdk.occa.report.definition
    Am I forced to create a RPT file for the different table and column structures I have? 
    Thank you in advance for any insights.
    Ted Jenney

    Hi Rameez,
    After working through the example code some more, and doing some more research, I remain unable to populate a report with my own data and view the report in a browser.  I realize this is a long post, but there are multiple errors I am receiving, and these are the seemingly essential ones that I am hitting.
    Modeling the Sample code from Create_Report_From_Scratch.zip to add a database table, using the following code:
    <%@ page import="com.crystaldecisions.sdk.occa.report.application.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.document.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.definition.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
    <%@ page import = "com.crystaldecisions.report.web.viewer.*"%>
    <%
    try { 
                ReportClientDocument rcd = new ReportClientDocument();
                rcd.newDocument();
    // Setup the DB connection
                String database_dll = "Sqlsrv32.dll";
                String db = "qa_start_2012";
                String dsn = "SQL Server";
                String userName = "sa";
                String pwd = "sa";
                // Create the DB connection
                ConnectionInfo oConnectionInfo = new ConnectionInfo();
                PropertyBag oPropertyBag1 = oConnectionInfo.getAttributes();
                // Set new table logon properties
                PropertyBag oPropertyBag2 = new PropertyBag();
                oPropertyBag2.put("DSN", dsn);
                oPropertyBag2.put("Data Source", db);
                // Set the connection info objects members
                // 1. Pass the Logon Properties to the main PropertyBag
                // 2. Set the Server Description to the new **System DSN**
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, oPropertyBag2);
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_SERVERDESCRIPTION, dsn);
                oPropertyBag1.put("Database DLL", database_dll);
                oConnectionInfo.setAttributes(oPropertyBag1);
                oConnectionInfo.setUserName(userName);
                oConnectionInfo.setPassword(pwd);
                // The Kind of connectionInfos is CRQE (Crystal Reports Query Engine).
                oConnectionInfo.setKind(ConnectionInfoKind.CRQE);
    // Add a Database table
              String tableName = "Building";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
        catch(ReportSDKException RsdkEx) {
                out.println(RsdkEx);  
        catch (Exception ex) {
              out.println(ex);  
    %>
    Throws the exception
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed
    There was other sample code on SDN which suggested the following - adding the table after calling table.setDataFields() as in:
              String tableName = "Building";
                String fieldname = "Building_Name";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setAlias(tableName);
                oTable.setQualifiedName(tableName);
                oTable.setDescription(tableName) ;
                Fields fields = new Fields();
                DBField field = new DBField();
                field.setDescription(fieldname);
                field.setHeadingText(fieldname);
                field.setName(fieldname);
                field.setType(FieldValueType.stringField);
                field.setLength(40);
                fields.add(field);
                oTable.setDataFields(fields);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
    This code succeeds, but it is not clear how to add that database field to a section.  If I attempt to call the following:
    FieldObject oFieldObject = new FieldObject();
                oFieldObject.setDataSourceName(field.getFormulaForm());
                oFieldObject.setFieldValueType(field.getType());
                // Now add it to the section
                oFieldObject.setLeft(3120);
                oFieldObject.setTop(120);
                oFieldObject.setWidth(1911);
                oFieldObject.setHeight(226);
                rcd.getReportDefController().getReportObjectController().add(oFieldObject, rcd.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0), -1);
    Then I get an error (which is not unexpected)
    com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The field was not found.---- Error code:-2147213283 Error code name:invalidFieldObject
    How do I add one of the table.SetDataFields()  to my report to be displayed?
    Are there any other pointers or suggestions you may have?
    Thank you

  • How to create a report with different page sizes

    Hi,
    I would like to create a report with different page sizes, it's possible to do it with diadem?
    When I change the layout parameters, changes afect to all sheets...
    Is there a way to change page size individually for each sheet?
    Thanks in advance.
    Marc

    Hi Marc,
    You can use the DocStart and DocEnd commands along with the PicPrint command to spool multiple print commands to the same output PDF file using the direct printer approach.  This should enable you to programmatically specify the page size differently for each sheet that you add to the print job.
    ' Print PDF Page by Page.VBS
    OPTION EXPLICIT
    Dim i, Path, OldPrintName
    Path = AutoActPath & "2D Stacked"
    Call DataDelAll
    Call DataFileLoad(Path & ".TDM")
    PDFFileName = Path & " Page by Page.pdf"
    IF FileExist(PDFFileName) THEN Call FileDelete(PDFFileName)
    OldPrintName = PrintName
    PrintName = "winspool,DIAdem PDF Export,LPT1:" ' Set to PDF printer
    PDFResolution = "72 DPI" ' "2400 DPI" , "default"
    PDFOptimization = TRUE
    PDFFontsEmbedded = FALSE
    PDFJPGCompressed = "high"
    PrintOrient = "landscape" ' orient paper
    Call PrintMaxScale("GRAPH") ' auto-max, see alternative margin setting variables below
    PrintLeftMarg = 0.181
    PrintTopMarg = 0.181
    PrintWidth = 10.67
    'PrintHeigth = 7 (read-only)
    Call WndShow("REPORT")
    Call DocStart ' Begin multi-page document/print job
    FOR i = 1 TO 4
    Call PicLoad(Path & ".TDR")
    Call GraphSheetNGet(1)
    Call GraphSheetRename(GraphSheetName, "Page " & i)
    Call PicUpdate
    Call PicPrint("WinPrint") ' Add a page to be printed
    NEXT ' i
    Call DocEnd ' End multi-page document/print job
    PrintName = OldPrintName
    Call ExtProgram(PDFFileName)
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • How to create Webi Reports with SAP BW Objects

    Hi,
    I have no knowledge on creating webi reports with SAP BW Objects like (InfoCube, DSO, MultiProvider, Infoview, MasterData Infoobject).
    As per my understanding Webi reports can be developed with universe which is created on BEx Queries or OLAP BAPI interface, unfortunately i don't have BEx App installed. So, i have to create OLAP universe in this case.
    Here my question is can we create universe with all the available BW objects like InfoCube, DSO, MultiProvider, Infoview, MasterData Infoobject.
    Please, Can anyone suggest a solution
    Thanks,
    Siva
    Edited by: siva@chinni on Apr 25, 2010 4:45 PM

    Hi,
    Yes we can create WebI on the top of SAP Objects - InfoCube, DSO, Characteristics etc...
    But we have to keep in mind that for WebI we must create Universe.
    When we create universe we make direct connection with SAP Objects but we get less functionality - such Calculated Key Figures, Restricted Key Figures, formulas etc. Now you have to achieve all these missing components at Universe Level and at WebI level.
    If you are creating your universe on the top of DSO and InfoObject then make sure they set for reporting.
    There are some online documentation which tells that what functionality you can achieve.
    Check the following document to have a bird's eye view.
    [http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/100369a7-033e-2c10-94a4-f254f8578153?quicklink=index&overridelayout=true]
    There is another document in PPT which I could  not find online. It is very helpful document. It is:
    II. SAP BusinessObjects BI Solutions XI 3.1 and SAP NetWeaver BW 7 Current risks, approach, and mitigating strategies for Client Partners, License Sales, and Consulting Delivery Managers
    Partner Enablement Seminar
    Regards,
    Bashir Awan

  • ESS - Creating a Front End Selection Screen, that accesses SAP T-code

    Hi,
    We have an ESS Portal in our company.
    I have been given the following request:
    For a specific transaction, create a selection screen in the portal that would be a modified version of the selection screen that exists in the SAP system.
    From this front-end in the selection screen, the specific transaction within the SAP system would be accessed.
    How is this done? What do I need to know about the overall process?
    Please help.
    Thanks,
    John

    Just to clarify,
    Create the transaction and selection screen in the SAP system.
    Then ask the Portal team to create an iView for this transaction.
    What if I need to say get the Internal SAP employee number from the user's sign on information?
    Thanks,
    John

  • Is there a way to build an App with CS5.5 that can run in older iPods

    Hello
    Does anybody know if there is a way to build an app with flash CS5.5 that can run in older iPods?, just like with CS5?
    Each IPA I build with CS5.5 cannot be installed in my iPod 8GB with iOS 4.2 and before with CS5 I could install all the IPAs there and test.
    The lack of support to iPod 8GB would be limitating for the market and sales...
    Is there some setting to build IPA to older iPods?
    Thanks

    AIR 2.7 release notes:
    AIR runs on "iPodTouch 4th generation iPhone 3GS and iPhone 4iPad".
    But:
    AIR 2.7 runs on iPod Touch 3rd Generation, too - but only on the 32GB and 64GB models. The 8GB model is in fact only an older 2nd gen iPod Touch.
    We tested this and we even have some apps in the app store running on the iPod Touch 3rd gen.
    I posted about this, look here:
    http://forums.adobe.com/thread/892541?tstart=0

  • Background processing for ABAP report with selection screen

    Hi ABAP Gurus,
    I m facing a strange problem in scheduling a background job for my report with a selection screen. I have a variant for the report.
    I scheduled a job, but it seems to be not doing anything though all the system resources are available. The job overview shows "Acive" for the job. The job is neither stopping anything, it is just sitting there In SM50, the status shows "On Hold".
    Any ideas/comments on the problem and how this can be overcome?
    Qucik replies and solutions will be highly appreciated as this is a crucial part for a go-live project.
    Thanks in advance.
    Shivani.

    Yes. My report has a selection-screen which requires user input. But I have created  a variant for the report and trying to run it in background using this variant. But facing this problem.
    Strange thing is, instead of the usual SM36/SM37 option where we schedule and monitor background jobs, this option does not work for my report.
    But I tried through SE38, and from my selection screen I selected "Schedule background job" and "run immediately" option, and this works. Though I still use SM37 to monitor this background job.
    I have never faced such a situation before.
    Any hints/tips why this happens and how this can be overcome in the future?
    Thanks in advance.
    Shivani.

  • How to create a report with dynamic columns

    Hi all,
    I am using Apex 4.0 with Oracle 10g
    I am creating a report and I need to display columns dynamically based on the item values.
    example:
    I have a table employee with columns name, designation, sal
    In the report page i have a select list with designations and when I select a designation from the select list,
    I need to display the names of the employees horizontally,
    like each name as a new column in the report with that particular designation. and same has to continue when I select different designations.
    Can some one help me how we can do that.
    I appreciate your answer
    Thanks,
    Rik

    Essentially you want to write a pl/sql function which returns a varchar2 string. The contents of the string must be a valid sql statement.
    Once you have done this, you need to add a report region as type sql report and you will have the option of writing it as a query or as a function returning query. Choose function returning query and enter in the function call.
    Note your function must be valid, and must be executable by your apex parsing schema.
    example:
    create or replace
    function test_report(   p1_tablename       in varchar2)
    return varchar2
    is
    v_query varchar2(4000);
    begin
    v_query  :=
    'SELECT * from '||p_tablename;
    return v_query;
    end test_report;Edited by: Keith Jamieson on Aug 15, 2011 4:50 PM

  • Report with Selection screen

    I have a stupid report.
    In the initialization event I have put that
    initialization.
    set pf-status '123'.
    But in the start of selection/at user-command
    sy-ucomm is empty ... any idea is welcome
    REWARD PROMISED
    Message was edited by: STEPHAN KAMINSKI

    SELECTION-SCREEN PUSHBUTTON fmt name USER-COMMAND ucom.
    SELECTION-SCREEN FUNCTION KEY <Number>. "This is for displaying in Application Toolbar.
    Check the following help documentation..
    SELECTION-SCREEN PUSHBUTTON fmt name USER-COMMAND ucom.
    Addition: MODIF ID modid.
    Effect
    Generates a pushbutton on the selection screen. When you define the button, you also define a user command ucom (no inverted commas), up to 20 characters long, which is triggered when the user pushes the button. The rest of the syntax is the same as for SELECTION-SCREEN COMMENT
    You can define the name name either statically or at runtime (see also the BEGIN OF BLOCK, COMMENT and SELECTION-SCREEN BEGIN OF SCREEN variants).
    When you define a pushbutton, you must always specify a format fmt.
    By specifying a Modif ID, you can assign the pushbutton to a modification group.
    Notes
    The best way of reacting to the pushbutton is in the AT SELECTION-SCREEN event, or, for pushbuttons in the selection include, in the PAI routine (with FNAME = '*' and MARK = SPACE) in the database program SAPDBldb. The field SSCRFIELDS-UCOMM contains the user command ucom. (You need to declare the SSCRFIELDS table using the TABLES statement).
    You can create your own pushbuttons in the application toolbar using the FUNCTION KEY n addition.
    Within the selectoin include : Additions FOR NODE node ,FOR TABLE dbtab und ID id.
    Example
    TABLES SSCRFIELDS.
    SELECTION-SCREEN PUSHBUTTON /10(20) CHARLY USER-COMMAND ABCD.
    INITIALIZATION.
    MOVE 'My text' TO CHARLY.
    AT SELECTION-SCREEN.
    IF SSCRFIELDS-UCOMM = 'ABCD'.
    ENDIF.
    A pushbutton appears on the selection screen with the text 'My text'. In the AT SELECTION-SCREEN event, the field SSCRFIELDS-UCOMM has the contents ABCD after the button has been pushed.

  • How to create a report with dynamic no of columns

    Hi All,
    we have a report with 6 columns.
    and its been access by 10-20 people.
    the user dont want to have a fix report with 6 columns rather they want to have a flexibility to select the columns from the report they want to see.
    i.e. user one one time wasnt to see only one columns
    another time he want to see only column 2 and 4 of the report.
    its like there can be a multiple select option from where he can select the columns in the existing report and then see the same report with only that much column.
    Please tell me how to implement it.

    Abhip i thin you didnt get the problem.
    there is s exeiting report with 6 column
    Currently when i logging to OBIEE and see that report
    i will be getting report with 6 column
    but now i want a flexibility of selecting only 2 or 3 or 1 or 4 or 5 as i wish columns from this report and see the result only for that
    so is there by any chance i can have a check box for each column which i can check in dashborad to select that column
    and show the result were as by default it will show the report with 6 column.
    Thanks

  • How to create list box in selection screen

    Hi Experts,
                    I want to create 2 list boxes, each one is having 5 fields. suggest me the logic.
    Thanks.
    Tony

    Hi,
    Below is the link to help you.
    [List Box in Selection Screen;
    Or here is the sample code.
    TYPE-POOLS: vrm.
    DATA: name TYPE vrm_id,
    list TYPE vrm_values,
    value LIKE LINE OF list.
    PARAMETERS: ps_parm(10) AS LISTBOX VISIBLE LENGTH 10.
    AT SELECTION-SCREEN OUTPUT.
    name = 'PS_PARM'.
    value-key = 'scooby1'.  APPEND value TO list.
    value-key = 'tweety2'.  APPEND value TO list.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id = name
    values = list.
    Hope it will help you. Please revert back in case of any query.
    Regards
    Natasha Garg
    Edited by: Natasha Garg on Jan 8, 2009 6:28 AM

  • How to create a report with a PL/SQL Stored Procedure method

    Hi,
    We are working in oracle applications 11i on oracle database 9i.
    I have a custom procedure that is used to send Payslip SMS messages to staff.
    I am thinking about creating a request for that procedure so the HR user can run it himself at the end of every month from the HR responsibility.
    any hints , guidelines or references will be appreciated...
    thanks...

    See the example in MOS Doc 73492.1 (Creating a PL/SQL Concurrent Program in Oracle Applications)
    More details in the Developer Guide - http://download.oracle.com/docs/cd/B25516_18/current/acrobat/115devg.pdf - Chapters 16 and 17
    Srini

Maybe you are looking for

  • Process rule and provisioning workflow problem

    Hi, we have designed a workflow to provision groups from a database resource to ldap and AD resources. We use the process rule in the activesync process. These groups creation works without problem now, but the update/creation of users from database

  • Changing territory value

    Hi all, Has any one done something like in Segment Values screen -> Key flexfield -> Title: Territory flexfield -> Value, Country -> Values, Effective Currently there is a Value = 190 and Description = Malaysia. I would want to update All Tables (all

  • Process Flow Restart Logic OWB 11gr2

    Hi, I know OWB 11gr2 doesn't provide PF restart logic and one has to come up with his/er PFRL deisgn and implementation logic. Just wondering if any one has done it sucessfully and can refer me to a proper documentation or design. Thanks

  • M4V files do not display filename

    - Convert podcasts to m4v in iTunes. - Drag m4v from library to iPod - m4v file shows up in the Movie list under the main Videos list - without filename - all I see is a TV to the right indicating there is a video file there. Anyone know how I can ma

  • Install Solaris 5.10 64 bit with Raid 1

    Hi Oracle Support At present I have two server X2270 with information below : S erver 1 have 4 h ard d isk ( 1 h ard d isk = 1TB) S erver 2 have a h ard d isk ( 1 h ard d isk = 1TB) I want to Move one HDD from server list order no.1 to server list or