Execute in Background with two variants

Hi,
Is it possible to execute a report in background if we assign two variants for a single job?
Regards,
Akula

Hi,
I successfully created two variants in single job and after executing my job has been failed giving a message "DATASET_NOT_OPEN" and type of Message is 'A'.
In my program i have used datasets to download the report data into application server.
Can you please suggest to me how to solve this problem.
Regards,
Vinay.

Similar Messages

  • Submit a program with two variants

    Hi all,
    There is one program which needs to run everyday with two different variants
    ( For this i need to have two jobs ).
    Now, i need to write a new program which submits the above program with two variants. How do i do it?
    Thanks
    Abhijith H

    You don't need two jobs, you can have 1 job with two steps,  each step would call the progam with the different variant.
    If you want to write a program which submits the program twice with two different variants, you can use the SUBMIT statement.  Here VARIANT1 is the name of a variant.
    SUBMIT ZREPORT01
           USING SELECTION-SET 'VARIANT1'
           AND RETURN.
    Regards,
    Rich Heilman

  • Regarding ALV outputs ( with layout variants)

    Hi,
    I have a problem where in an ALV report when it is executed with a variant (there is one layout parameter in the screen which is also filled. This layout is set with a filter),
    displays the output. But the displayed output doesn't filter the output as per the required criteria set in the layout filter.
    When I execute the report with the same variant but now if I select the layout by pressing F4 on the layout field and select the same layout as earlier (which is having the filter criteria), now it displays the output as per the required criteria set in the filter.
    I don't understand why if I execute the report with a variant with the layout value also filled, it is not able to give the required output as per the filter criteria set for the layout.
    When the report is executed with the same variant but the layout value selected from F4, it dispalys the correct output with the filter criteria set for the layout.
    In general, I mean why the program is not able to load the layout with filter when it is called from a variant?
    Regards,
    Rajesh

    It depends on your Layout, How you saved it .
    And one more question are you passing the layout parameter and Filter parameter to the Function module

  • Creating a background job with out Variant.

    Hi Experts,
    I'm developed one ALV report which is not having any selection-screen and Variant.
    We can execute the program in fore ground but the user wants to be run in back ground and he wants to be created a spool requet for that report.
    My Question is ...the above requirement is possible or not.
    if your answer is yes then
    How to create a variant for a report which is not having any selection-screen?
    Can we creat a spool request manually ..means with in the report only through coding?
    Thank you ,
    Venky.

    try this one...
    you can submit your report in background and create spool...
    An ALV report can be executed in background.. but if its an ALV Grid then spool will contain ALV list output. You can directly select execute in background even if you dont have any parameter on selection screen. or try below code...... if you want to create a spool from the report itself.....
    I hope its useful
    DATA: number           TYPE tbtcjob-jobcount,
          name             TYPE tbtcjob-jobname VALUE 'JOB_TEST',
          print_parameters TYPE pri_params.
    CALL FUNCTION 'JOB_OPEN'
      EXPORTING
        jobname          = name
      IMPORTING
        jobcount         = number
      EXCEPTIONS
        cant_create_job  = 1
        invalid_job_data = 2
        jobname_missing  = 3
        OTHERS           = 4.
    IF sy-subrc = 0.
      SUBMIT report TO SAP-SPOOL
                        SPOOL PARAMETERS print_parameters
                        WITHOUT SPOOL DYNPRO
                        VIA JOB name NUMBER number
                        AND RETURN.
      IF sy-subrc = 0.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            jobcount             = number
            jobname              = name
            strtimmed            = 'X'
          EXCEPTIONS
            cant_start_immediate = 1
            invalid_startdate    = 2
            jobname_missing      = 3
            job_close_failed     = 4
            job_nosteps          = 5
            job_notex            = 6
            lock_failed          = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    ENDIF.

  • Runtime Error setting the 'Environment' when running with TWO executables

    Hello,
    I'm using XML DB for the very first time, so this problem may be easy to solve.
    I'm currently running a test with TWO separate C# Console executables.
    One executable correctly sets up the Xml Environment, Manager, and Container and simply adds XML documents to the database.
    The second executable simply is supposed to run some XQuery commands. I use the same Environment, Manager, and Container code to do the initialization. However, I'm having trouble with setting up the 'Environment' in this executable. I get the following error:
    DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery, exception code = DATABASE_ERROR
    On this line of code:
    Sleepycat.Db.Environment env = new Sleepycat.Db.Environment(envdir, envconf);
    I've only seen code examples that run in a SINGLE executable. I'd really like to access the XML DB from multiple threads/executables, but am having trouble.
    Can there be multiple 'Environments' and 'Managers' for the one XML Db?
    Will provide more data if needed, and thanks for any help!
    Matt

    I guess you addressing this in the wrong forum. I see tags like "sleepycat" and "C#", probably thats why nobody replied.

  • Start up times vary - why?  (MBP 10.8.3 with two drives)

    I have a new MBP with 10.8.3 and two drives, an SSD and an internal.
    Just curious as to why I get two varied startup times.
    1.  press startup button and within 3 seconds I hear the chime and the screen lights up.
    2.  press startup button and within about 12 seconds I hear the chime and the screen lights up.
    Any thoughts as to why?

    1 and 2 are both the same.  I'm assuming I am starting up from the SSD drive because that is where all my applications are.  The internal drive is just for storage.

  • Execute report RMMVRZ00 with variants

    Hi Experts,
    Could someone explain how to execute report RMMVRZ00 with variants.
    Report RMMVRZ00 is similar to transaction MM60.
    I am checking how to execute this report with variants.
    Thank you

    The following link would help in creating variants
    [Creating Report Variants|http://help.sap.com/saphelp_45b/helpdata/en/73/69ee7d55bb11d189680000e829fbbd/content.htm]
    If you have any specific requirement with variant, please post again

  • Hi! when starting my computer the background went gray with two hard drives in the middle. One is named macintosh HD and the other recovery 10.9. I have my whole life on my computer, and i don't know which of them i should start up? Please i need help!

    Hey!
    when starting my computer the screen is gray with two harddrives. One is named Macintosh HD and the other Recovery 10.9. My computer has never done this before! I am really worrid that my files will be lost if i choose to start the wrong harddrive. Which one should i choose? HELP!!

    You probably held down the Option or Command R keys when you heard the startup tone. Simply choose the HD. To learn what the Recovery partition is please read OS X: About OS X Recovery

  • Issue in Foreground Report executing as background

    I have developed a Report in ABAP which has a selection screen and 2 radiobuttons
    Foreground
    Background
    The report basically reads a TXT file from Desktop and calls a standard BAPI.
    In foreground, I have no issues i.e. I browse the call from desktop and call GUI_UPLOAD and so on
    However, in background, I am confused how to proceed??
    Please note: Report is still running in foreground mode i.e. i am browsing the file. Its just that i have selected background Radiobutton
    Can anyone tell me how to proceed i.e. to execute in background.
    Do I need to submit the same program via JOB_OPEN JOB_CLOSE in background and then exit??
    Please advice

    Hi Razdan,
    If want to schedule the background job through the program, then you can try method explained in below links. Here you might have to create a separate program to submit.
       https://help.sap.com/abapdocu_70/en/ABAPSUBMIT_VIA_JOB.htm
       http://scn.sap.com/thread/590077
      Another approach would be like below
    Add an additional field apart from the radio button, say “ip_file” in the selection screen. This you can show while selecting the radio button “background”
    Suppose if you have updated the file in app. Server(AL11 ) , in a location , say ( “home/myfile/test.txt” ) .
    Save a variant with the radio button “background” selected and input field ip_file value as   “home/myfile/test.txt”.
    Now from the SM36 you can schedule the background job to run the report with the same variant.
    Please note that , here you need to upload the file separately to app. Server using , tcode - CG3Z or any other FM. And in the program you can use open dataset to access the file in the app. Server.

  • Block list display when report is executed in background?

    Hello all,
    when i execute the report program in foreground ,output is displayed as block list with two blocks say success table and failure table.
    when i execute the same report program in background, i could see only a single block which is success table. Why is this?
    Thanks,
    Sindhu.

    Did you check all the pages in spool? If the report has a output which runs multiple pages, then spool might not display everything unless you change the setting to display more than certain pages. Kindly check the same.

  • MAXL SCRIPT TO EXECUTE IN BACKGROUND THE DATA LOAD

    Hi,
    I have problem with a MaxL script, I don´t know the command to execute a data load in the background, someone knows??? it would be very grateful if you can help me because now I have to load the data manually and then tick execute in background.
    Thanks for your help
    Regards,

    If the two processes are in no way dependent on each other, why not just use two separate MaxL scripts and run / schedule them separately?
    If you really need to launch multiple MaxL operations against different cubes to run in the background from a single script you can only do this with a shell / command script, not 'natively' in MaxL. If you're on Windows and using CMD, for example, see the 'START' command.
    --EDIT: Crossed over with Sunil, think he pretty much covers it!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to save background job in variant

    Dear all,
    I have scheduled one report programme in background and its moved to quality. But in quality they are not able to see the background job which i scheduled in test server. While saving the job in test server, its not asked for any request. Is this the problem? (or) They have to create the background job in quality server ?  (Or) any other problem? Please let me know asap pls.
    Regards
    SRee

    Request security team to give you access to SM36.
    I believe you should have your manager approval before.....
    Only ABAP Programs along with the variants can be transported between development , testing(quality) and production severs.
    You need to create a job in the quality/production by giving the program name.
    Also, you can execute the program in background by going to se38->Execute in background.
    Hope it helps

  • PDF document first page is blank when executing in background

    Hi,
    I am creating spool before displyaing report output by using GET_PRINT_PARAMETERS and NEW PAGE PRINT ON option and displaying report header and report final internal table. calling NEW PAGE PRINT OFF
    finally i am sending mail, by using SO_NEW_DOCUMENT_SEND_API1 function module in foreground executing and background execution.
    When we execute in foreground i am recieveing mail and pdf is perfect.
    when we  execute in background i am recieveing mail. But when i opend the pdf document in mail, PDF doucment first page is balnk and second page onwards i am able to see the report output
    why the PDF first page is blank when i execute the same report with same variant in back ground.
    Please help me in this issue.
    Thanks in advance
    Raju

    Hi Raju,
    <li> Call ABAP4_COMMIT_WORK function module after NEW-PAGE PRINT OFF command.
    NEW-PAGE PRINT OFF.
    CALL FUNCTION 'ABAP4_COMMIT_WORK'.
    Thanks
    Venkat.O

  • How to extract the column width in ALv report if its executed in background

    I am executing an ALV report in background , in front end i am getting data properly, in back end for some columns some of the digits are missing.For example if PO no is of 10 digits it will display only 8 becos column size is like that , how to extract coulmns in back ground.
    I have executed in background and checked the spool and  for some of the columns width is not sufficient to display comeplete data so please suggest how to extract the columns sizes if executed inj background for an ALV

    Hi Deepthi,
    you can try with the above mentioned suggestions ,if its worked its fine ,
    If not use Docking container instead of custom container, For ALV in back ground jobs, its suggest to use docking container instead of custom container , below you can find the declaration for docking container and code to use docking and custom container in your program for fore and back ground.
    or you can use docking container alone for both operations.
    Data : G_DOCK1 TYPE REF TO CL_GUI_DOCKING_CONTAINER,
    IF CCON IS INITIAL. (ccon is container name )
    *Check whether the program is run in batch or foreground
        IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.
    *Run in foreground
          CREATE OBJECT CCON
            EXPORTING
              CONTAINER_NAME = 'CON1'.
        CREATE OBJECT GRID1
            EXPORTING
              I_PARENT = parent_1.
    ELSE.
    *Run in background
          CREATE OBJECT GRID1
            EXPORTING
              I_PARENT = G_DOCK1.
        ENDIF.
      ENDIF.
    B&R,
    Saravana.S

  • Report is executing in background and need data(output) in excel format

    Report is executing in background and need data(output) to get downloaded in excel format in my PC from an internal table;;in any drive i.e. C: or D: .When executing in backround it prompt to user with which location excel file to be saved and the name of file.How to download in background in excel format?
    Edited by: PRASHANT BHATNAGAR on Aug 26, 2008 6:24 AM

    Hi
    Download a report to excel with format (border, color cell, etc)
    Try this program...it may help you to change the font ..etc.
    Code:
    REPORT ZSIRI NO STANDARD PAGE HEADING.
    this report demonstrates how to send some ABAP data to an
    EXCEL sheet using OLE automation.
    INCLUDE OLE2INCL.
    handles for OLE objects
    DATA: H_EXCEL TYPE OLE2_OBJECT,        " Excel object
          H_MAPL TYPE OLE2_OBJECT,         " list of workbooks
          H_MAP TYPE OLE2_OBJECT,          " workbook
          H_ZL TYPE OLE2_OBJECT,           " cell
          H_F TYPE OLE2_OBJECT.            " font
    TABLES: SPFLI.
    DATA  H TYPE I.
    table of flights
    DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
    *&   Event START-OF-SELECTION
    START-OF-SELECTION.
    read flights
      SELECT * FROM SPFLI INTO TABLE IT_SPFLI UP TO 10 ROWS.
    display header
      ULINE (61).
      WRITE: /     SY-VLINE NO-GAP,
              (3)  'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (4)  'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (8)  'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
      ULINE /(61).
    display flights
      LOOP AT IT_SPFLI.
      WRITE: / SY-VLINE NO-GAP,
               IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
      ENDLOOP.
      ULINE /(61).
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-007
           EXCEPTIONS
                OTHERS     = 1.
    start Excel
      CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
    PERFORM ERR_HDL.
      SET PROPERTY OF H_EXCEL  'Visible' = 1.
    CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'
    PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-008
           EXCEPTIONS
                OTHERS     = 1.
    get list of workbooks, initially empty
      CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP.
      PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - start
    CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP  EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    tell user what is going on
      SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - end
    disconnect from Excel
         CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING  #1 = 'C:\SKV.XLS'.
      FREE OBJECT H_EXCEL.
      PERFORM ERR_HDL.
          FORM FILL_CELL                                                *
          sets cell at coordinates i,j to value val boldtype bold       *
    FORM FILL_CELL USING I J BOLD VAL.
      CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_ZL 'Value' = VAL .
      PERFORM ERR_HDL.
      GET PROPERTY OF H_ZL 'Font' = H_F.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_F 'Bold' = BOLD .
      PERFORM ERR_HDL.
    ENDFORM.
    *&      Form  ERR_HDL
          outputs OLE error if any                                       *
    -->  p1        text
    <--  p2        text
    FORM ERR_HDL.
    IF SY-SUBRC <> 0.
      WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
      STOP.
    ENDIF.
    ENDFORM.                    " ERR_HDL
    Regards
    Murali Papana

Maybe you are looking for

  • Mac shuts down after 10 Min.

    My mac shuts down automatically after 10 Min., I must sign in again and the movie or whatever I just watch is still on in the back. How can I prefend this cutoff? I read all the comments, but no help. Even if I turn off the Mac or unplug it, it does

  • Is TC a wireless router?

    I have been at this for hours. Everything is working on the Mac as it should but neither of my PC's see the network that I have supposedly created. I have called Apple 3 times and each time they don't have an answer. I was led to beleive it was a wir

  • Multiple tasklist on single maintenance item

    Hi gurus, How can I attach multiple task list to a maintenance Item. - I want to attach a general task list and a equipment/functional location tasklist to a equipment/functional locations in a maintenance Items - Is there any way to attach permit to

  • "Execute Explain Plan" button disabled

    I'm using the 1.1.3 version of SQL Developer included in the Oracle 11g distribution for Windows. After connecting to a database and executing a query, I am unable to view its execution plan because the explain plan button is greyed-out. The connecte

  • AIDocument- GetDocument Fails with AIErr DOC?

    Hi I am trying in Illustrator 64 on Windows through a plugin to open  document and get the documents setup. My code is as follows. I first acquire the required Suites ( AIDocument, AIDocumentList, AIFilePath etc ) and all the Suites are acquired with