Report Execution in background at user command.

Hi,
I want my program to run in background when the user selects a checkbox to run the program in background. can you please tell how to execute the program in background?
regards,
ravi.

Hi Ravi,
Follow below logic.
If check box is selected
AND sy-batch IS INITIAL.   "Means currently u r running report in foreground
CALL FUNCTION JOB_OPEN.
SUBMIT ur program using SUBMIT statement.
CALL FUNCTION JOB_CLOSE.
ELSE.
Normal processing.
ENDIF.
Thanks,
Vinod.

Similar Messages

  • COPA Report - Execution in Background

    Friends,
    We have a COPA report that takes very long time to execute. For this reason the user wants to schedule the report such that it executes in the background at month-end.
    In order to test the scheduling of the report execution in background in Development system, I followed the following steps:
    1) Selected the report to be executed using the t-code KE30.
    2) Clicked on Report - Execute in background.
    3) Filled in the execution parameters and since I did not want the print of the report, I ticked the checkbox 'Rebuild frozen report data' (I was getting the error message "Select either 'Print' or 'Save'".
    4) Executed the report by pressing F8. I got the message 'Report data for the report saved'.
    My question is how to view the report on screen when the report is executed in background?
    Please advise at the earliest.
    Thanks & Regards,
    Sameer S. Gupte
    Office: +91 22 66452730
    Cell: +91 93232747801

    Sameer
    You cannot see this data as it is.
    When you see the message 'Report data for the report saved'. It means that the system has performed a kind of summarization for the selection criteria you have entered. This is performance enhancement tool.
    So you have to run the report again to view this report; but  this time choose the option Read saved Data for the Read Mode under Status of Data. You can get to the see report output fairly quick.
    SAP documnetation reads thus " <b>You create report-specific frozen report data by executing the report in the background and by choosing the Rebuild frozen report data option in the selection.  When you call up the report again using the same selection, you have the option of displaying this frozen report data. If you would like more up-to-date frozen report data, you need to create this data again."</b>
    Good luck.
    Sridhar

  • Report Execution in Background

    Hi
    Our clients wants to know if this can be done in BI
    Can we execute reports automatically in background at every morning 8:30am and then automatically email then to the users?
    We are on BI 7.0 version.
    I think in earlier version we had something called "Reporting Agent" but now we dont have that option...So how to achieve this functionality?
    Regards
    Annie

    Hi......
    check this link :
    Executing queries automatically
    Regards,
    Debjani..........
    Edited by: Debjani  Mukherjee on Sep 30, 2008 5:37 AM
    Edited by: Debjani  Mukherjee on Sep 30, 2008 5:38 AM

  • At line-selection & at user-command event issue

    hi
    i am working on a interactive report,with at line & at user command event,on list 3 i have used a pf status,to trigger the at user command event,till that i was working with at line selection,which are working fine,but on list 3,i am able to see my pf status,but at user command event is not working properly,its still working like at line selection event,if i clk on record,it take to for nxt action,which i want to do through the action button of pf status.
    In debugging i checked that it coming to at user command,but the action in sy-user is 'PICK' & its doing the operation.
    WHEN '3'.
          IF itab4[] IS NOT INITIAL.
            SET PF-STATUS 'Z203'.
            LOOP AT itab4.
              AT FIRST.
                WRITE:/1 'Material' ,18 'Name'.
              ENDAT.
              WRITE:/1 itab4-matnr,8 itab4-maktx.
              HIDE:itab4-matnr.
            ENDLOOP.
          ELSE.
            WRITE:/ 'No Data Found'.
          ENDIF.
      ENDCASE.
      BREAK-POINT.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'CALL'.
          PERFORM bdc_mm02.
      ENDCASE.
    pls tel me how to use at line selection & at user command in same report to make both events working efficiently.
    regds
    vipin

    Check whether you have assigned Function Key F2 to your function code 'CALL'. If so change that function key. The function key F2 is always linked to function code 'PICK'.
    Regards
    Sathar

  • OBI report execution priority.

    Hi,
    Is there any way to set report execution priority based on user groups? For example if group with higher priority needs to execute a report, then server will free the stock or limit execution for groups with lower priority.
    Thanks,
    Adam

    No. If you query comes in less that 1 second then you got nothing to worry about. I haven't seen a single DWH where users would worry about queries returning in milliseconds.

  • Report Execution - Background Process

    Hi Friends,
    I have developed a report program.
    I have also created a transaction code for executing it.
    Now the user needs to execute this program as a background job.
    I have tried with SM36 and SM37 transactions. Here, you need to set the variants and time for execution.
    But the user has lots of selection criteria and setting the variants for this requirement is highly impossible.
    Kindly let me know whether I can add any additional statements in the program so that the program executes as a background process when initiated th' the selection screen / transaction code.
    Kindly provide your suggestions.
    Thanks in advance.

    Hi Karthik,
    Looks like a wrapper ABAP program is required to meet your requirement. This program can be called in the background and in turn can submit the report program that you have created to achieve the actual functionality.
    In this wrapper program, you need to create a dynamic variant using FMs (search RSVARIANT in SE37). Here you can populate the fields of the selection screen based on any complex criteria as you mentioned using ABAP statements. The dynamic variant is similar to the variants created on the selection screen.
    Once you have the variant (dynamic) ready you can create a background job and submit it within this wrapper program, for which you again have to use the FMs (search createjob*, and go to the function group).
    You have to release the submitted job and you can get the status of the job while it is running using the standard FMs provided for this.
    Finally, you can create a spool list for the wrapper program that can detail the status of the submitted job.
    It is a good idea to delete the dynamic variant once it ahs been used because if required again, it can be created again. If the dynamic variant is created daily or several times a day, it is definitely good to delete it after the use. The right place to do deletion is at the end of the wrapper program after confirming that the job submitted has completed. Or as an alternate strategy, all variants prior to a week can be deleted when the wrapper program runs today (we are using this strategy).
    I have used this successfully.
    Hope this helps.
    Thanks
    Sanjeev

  • How to use AT LINE-SELECTION and AT USER-COMMAND in one report????

    Dear all,
    I have a problem in reports I want to use AT USER-COMMAND.and AT LINE-SELECTION.both in the one report.
    But as soon as I use SET PF-STATUS my AT LINE-SELECTION event stop workingand only AT USER-COMMAND is working.
    How can I use both of them in one report for your reference I am giving my test program below.
    REPORT ZTEST111 .
    SET PF-STATUS '100'.
    DO 10 TIMES.
    WRITE:/ SY-INDEX.
    HIDE SY-INDEX.
    ENDDO.
    START-OF-SELECTION.
    AT LINE-SELECTION.
    MESSAGE I002(SY) WITH SY-INDEX.
    AT USER-COMMAND.
    MESSAGE I002(SY) WITH 'USER COMMAND'.
    END-OF-SELECTION.
    Thanks in advance
    Sachin Gautam

    hi
    Syntax
    AT USER-COMMAND.
    Effect
    This statement defines an event block whose event is triggered by the ABAP runtime environment if, during the display of a screen list, a function with a self-defined function code was chosen.
    Note
    Self-defined function codes are all those that include character combinations, except for the following:
    The function codes PICK and PF## ("##" stands for 01 to 24) do not cause the event AT USER-COMMAND, but the events AT LINE-SELECTION and AT PF##.
    All function codes that start with the character "%" are interpreted as system functions and do not cause the event AT USER-COMMAND. The system functions for lists are listed in the following table 1.
    The function codes in the following table 2, likewise, do not cause the event AT USER-COMMAND, but are handled by the list processor.
    Table 1
    Function code Function
    %CTX Call a context menu
    %EX Exit
    %PC Save to file
    %PRI Print
    %SC Search for ...
    %SC+ Find next
    %SL Search in office
    %ST Save to report tree
    Table 2
    Function code Function
    BACK Back
    P- Scroll to previous page
    P-- Scroll to first page
    P+ Scroll to next page
    P++ Scroll to last page
    PFILE name Store list lines in a text file named abap.lst in standard character representation in the standard directory of the application server. If a name is entered using name, this is converted to lowercase letters and used as the file name.
    PL- Scroll to first line of the page
    PL-n Scroll n lines back
    PL+ Scroll to last line of the page
    PL+n Scroll n lines up
    PNOP No effect
    PP- Scroll back one page
    PP-n Scroll n pages back
    PP+ Scroll one page forward
    PP+n Scroll n pages forwad
    PPn Scroll to beginning of page n
    PRI, PRINT Print
    PS-- Scroll to first column
    PS++ Scroll to last column
    PS- Scroll one column to the left
    PS-n Scroll n columns to the left
    PS+ Scroll one column to the right
    PS+n Scroll n columns to the right
    PSn Scroll to column n
    PZn Scroll to line n
    RW Cancel

  • Problem with User Command in alv report

    Hi
    I have developed a ALV grid report with drill down capability to transaction code for user command. I am having a trouble with this.
    CASE ucomm.
        WHEN '&IC1'.
          CLEAR: wa_import.
          IF selfield-fieldname EQ 'ANLN1'.
            READ TABLE t_import INTO wa_import INDEX selfield-tabindex.
            SET PARAMETER ID 'BUK' FIELD wa_import-bukrs.
            SET PARAMETER ID 'ANl' FIELD wa_import-anln1.
            CALL TRANSACTION 'AW01N'.
          ENDIF.
    here my parameter ids are showing the values but when i call the transaction i am not getting the actual asset numbers.
    Can someone help me out this
    Thanks

    Hi,
    add the AND SKIP FIRST SCREEN...addition..
    CALL TRANSACTION 'AW01N' AND SKIP FIRST SCREEN.
    Thanks
    Naren

  • AT USER-COMMAND IN NORMAL REPORT

    Please do not have your subject in ALL CAPITALS
    Hi Experts,
    Please advice,
    I am having three fields in output first one  is directly fetched from table and other two are variables.
    ITAB-MENGE = fetched data.
    ITAB-UCOMM =   user command.
    AT SELECTION-SCREEN OUTPUT
    when the user press ENTER
    ITAB-SUM = ITAB-MENGE + ITAB-UCOMM.
    For eq:
    Suppose if:
    ITAB-MENGE = 100
    and if the user enters the value in ITAB-UCOMM = 200
    and when the user press enter the sum should display on the other field ITAB-SUM
    Note: I am using normal write statement ( not ALV ) & I am not using any parameters in selection screen all these has to fired on output screen
    Thanks
    R.Karthik
    Edited by: Karthik R on Feb 28, 2009 3:34 PM
    Edited by: Matt on Mar 1, 2009 7:18 PM

    Hi,
    Refer code:-
    REPORT  Z19TG7_1 NO STANDARD PAGE HEADING.
    TABLES : LFA1.
    TYPES : BEGIN OF VENDOR,
            LIFNR LIKE LFA1-LIFNR,
            NAME1 LIKE LFA1-NAME1,
            END OF VENDOR,
            BEGIN OF VENDOR1,
            LIFNR LIKE LFA1-LIFNR,
            NAME1 LIKE LFA1-NAME1,
            ORT01 LIKE LFA1-ORT01,
            LAND1 LIKE LFA1-LAND1,
            BUKRS LIKE LFB1-BUKRS,
            END OF VENDOR1.
    DATA : VENDOR_TAB TYPE STANDARD TABLE OF VENDOR INITIAL SIZE 20 WITH HEADER LINE,
           VENDOR1_TAB TYPE STANDARD TABLE OF VENDOR1 INITIAL SIZE 20 WITH HEADER LINE,
           CB.
    *       WAS_USED.
    TOP-OF-PAGE DURING LINE-SELECTION.
      WRITE SY-LSIND.
    START-OF-SELECTION.
      SET PF-STATUS 'Z19TG7_1_PF'.
      SELECT LIFNR NAME1
      FROM LFA1
      INTO TABLE VENDOR_TAB.
    AT USER-COMMAND.
      CASE SY-UCOMM.
        WHEN 'VL'.
          IF SY-LSIND = 1.
            SET PF-STATUS SPACE.
            DO.
              CLEAR CB.
              READ LINE SY-INDEX FIELD VALUE CB.
              IF SY-SUBRC <> 0.
                EXIT.
              ELSE.
                CHECK CB = 'X'.
                MODIFY CURRENT LINE : FIELD VALUE CB FROM SPACE.
                SELECT A~LIFNR A~NAME1 A~ORT01 A~LAND1 B~BUKRS
                FROM LFA1 AS A
                LEFT OUTER JOIN LFB1 AS B
                ON A~LIFNR = B~LIFNR
                INTO TABLE VENDOR1_TAB
                WHERE A~LIFNR = VENDOR_TAB-LIFNR.
                LOOP AT VENDOR1_TAB.
                  WRITE : / 'Vendor ID:' NO-GAP, VENDOR1_TAB-LIFNR,
                          / 'Vendor Name :' NO-GAP, VENDOR1_TAB-NAME1,
                          / 'City :' NO-GAP, VENDOR1_TAB-ORT01,
                          / 'Land :' NO-GAP, VENDOR1_TAB-LAND1,
                          / 'Country Code :' NO-GAP, VENDOR1_TAB-BUKRS.
                  ULINE.
                ENDLOOP.
              ENDIF.
            ENDDO.
          ENDIF.
      ENDCASE.
    END-OF-SELECTION.
      WRITE : /1 'CB', 5 TEXT-001, 18 TEXT-002.
      ULINE.
      LOOP AT VENDOR_TAB.
        WRITE : /1 CB AS CHECKBOX, 5 VENDOR_TAB-LIFNR, 18 VENDOR_TAB-NAME1.
        HIDE : VENDOR_TAB-LIFNR.
      ENDLOOP.
      ULINE.
    Hope this helps you.
    Regards,
    Tarun

  • PROBLEM WITH USER COMMAND AT SIMPLE REPORT

    HII FRNDS
    MY PROBLEM IS
    WHEN I AM BRANCHING TO A LIST REPORT FROM MY ALV REPORT BY USING LEAVE TO LIST-PROCESSING . THEN IN MY LIST REPORT I AM HAVING 2 MORE CUSTOMIZED BUTTON . BUT THE THING IS THAT I AM NOT ABLE TO MAKE THAT BUTTON  FUNCTION .
    CAN ANY BODY HELP ME WITH HOW TO MAKE THAT BUTTON WORK IN THE SIMPLE REPORT . I HAVE USED AT USER COMMAND IN THE BEGINING OF REPORT BUT STILL ITS NOT WORKING .
    THANKING YOU
    ROHIT

    HII FRNDS THIS IS THE CODE
    CASE R_UCOMM.
        WHEN 'DISPLAY1'.
          LOC_INDEX = 1 .
          SET PF-STATUS 'STATUS' EXCLUDING 'DISPLAY1'.
          LOOP AT INT_OUTPUT INTO WA_OUTPUT
                             WHERE CHECKBOX = WC_MARKED.
            APPEND WA_OUTPUT TO INT_DISPLAY .
          ENDLOOP.
          LEAVE TO LIST-PROCESSING .
          PERFORM F9100_DISPLAY_DETAILS USING LOC_INDEX.
    ENDCASE.
    AT USER-COMMAND .
    CASE SY-UCOMM.
    WHEN 'BACK'.
    BREAK-POINT.
           PERFORM F9100_DISPLAY_DETAILS USING LOC_INDEX.
      ENDCASE.
    THE PERFORM F9100 DISPLAYES THE LIST REPORT . THERE ARE NO SPELLING ERRORS FRNDS .

  • AT LINE SELECTION AN AT USER-COMMAND IN ONE REPORT

    hiiii friends.....
    hw  can i go for both at line selection an at user comond in one report....
    ie if double click on basic list it should shw sm output an when i choose menu optoin it should perform sm other output......

    You need to crate a PF-Status and in the PF-staus you need to include some essentials buttons and the button for your list on the USER-COMMAND.
    Say,
    BACK
    EXIT
    CANC
    PICK ... should be assigned to F2 .. to work with LINE-SELECTION.
    NEW_LIST ... for USER-COMMAND
    In your report:
    START-OF-SELECTION.
      SET PF-STATUS 'Z_OWN'.
    AT LINE-SELECTION.
      WRITE : 'I AM LINE SELECTION'.
    AT USER-COMMAND.
      CASE SY-UCOMM.
        WHEN 'NEW_LIST'.
           WRITE / 'I AM CALLED FROM USER COMMAND'.
      ENDCASE.
    Regards,
    Naimesh Patel

  • AT USER COMMAND event in interactive reports

    hi experts,
    Can anyone explain me about AT USER COMMAND event with one practical ex.
    thanks in advance
    R.vijai

    Hi vijaya kumar,
        If the user chooses a function code during list processing that is neither processed by the system, or PICK or PF<nn>, the system triggers the event AT USER-COMMAND. For this event, you must define your own GUI status for a list. To react to your own function codes in a program, you must define the following event block:
    AT USER-COMMAND.
    <statements>.
    In this event block, you can use an IF or CASE structure to tell the function codes apart. They are available in the system field SY-UCOMM. There are further system fields that are filled in list events, such as SY-LSIND and SY-PFKEY, that allow you to make further case distinctions.
    REPORT Test_program.
    START-OF-SELECTION.
      SET PF-STATUS 'TEST'.
      WRITE:  'Basic list, SY-LSIND =', sy-lsind.
    AT LINE-SELECTION.
      WRITE:  'LINE-SELECTION, SY-LSIND =', sy-lsind.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'TEST'.
          WRITE:  'TEST, SY-LSIND =', sy-lsind.
      ENDCASE.
    With this code double click on 'TEST' and define your own PF status and give user command as TEST and check out this useful programe.
    All the very best to you.
    Regards,
    Mohan Vamsi Krishna.A

  • 'PICK' and User commands in reports

    I'm a bit confused about 'PICK' in PF_STATUS.
    I fI define it, does that mean It can only be recognised in LINE-SELECTION , and not in AT USER-COMMAND.
    I've defined a small program and thats what seems to be happening?

    You can see here that the function code PICK is automatically fired when a hotspot is involved and hence the AT LINE-SELECTION event is fired to handle it.
    report zrich_0001.
    data: itstc type table of tstc with header line.
    select-options : s_tcode for itstc-tcode.
    at line-selection.
      check sy-ucomm = 'PICK'.
      call transaction itstc-tcode.
    start-of-selection.
      select * into corresponding fields of table itstc
                 from tstc
                      where tcode in s_tcode.
      loop at itstc.
        format hotspot on.
        write:/ itstc-tcode.
        hide itstc-tcode.
        format hotspot off.
      endloop.
    Regards
    Rich Heilman

  • Refresh Report and At Line-Selection and At User-Command

    Hi All
    I have 2 querries
    1) I want to use At Line-selection and At user-command in the same report. But At line-selection is not getting triggered why? When I remove Set pf-status 'xxx' and at user command , then at line selection works . I want to user both at a time.
    2) I am giving user ability to edit the report shown and when he comes back by exiting the editing I want to refresh the report which is shown already to him to give effect of his editing.
    Thanks in anticipation
    pM.

    i just tried, and no problem at all.
    In the <b>Recommended Function Key Settings</b>  for  F2 key add command "PICK"
    Regards
    Raja
    since you are new to the forum, have a look at this weblog.
    /people/mark.finnern/blog/2004/08/10/spread-the-love

  • USER COMMAND FOR INTERACTIVE ALV REPORT

    Hi Frens
    I am making an interactive alv report showing a cost center hierarchy. I could scuccessfully capture the first click event in the user command using  '&IC1'. Now i want to capture the second click event for the third hierarchy.
    When i try to do that, the program flow keeps hitting the same user command time n again. I want to put in a different code for the different click events. What is the way to achieve this?
    I searched ....there is nothing like '&IC2'. It does not work.

    hi,
    You can try this for the first click
    READ TABLE IST_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'USER_COMMAND'.
        MODIFY IST_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME = WA_EVENT-NAME.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM       = G_REPID
          I_CALLBACK_PF_STATUS_SET = C_PF         "'SET_PF_STATUS'
          I_CALLBACK_USER_COMMAND  = 'USER_COMMAND'
          I_CALLBACK_TOP_OF_PAGE   = 'TOP_OF_PAGE'
          I_GRID_TITLE             = G_TITLE
          IS_LAYOUT                = IST_LAYOUT
          IT_FIELDCAT              = IST_FIELDCAT[]
          IT_SORT                  = IST_SORT
          I_SAVE                   = 'A'
          IT_EVENTS                = IST_EVENTS
          IS_PRINT                 = IST_PRNT
        IMPORTING
          E_EXIT_CAUSED_BY_CALLER  = G_EXIT
          ES_EXIT_CAUSED_BY_USER   = IST_EXIT
        TABLES
          T_OUTTAB                 = IST_FINAL "sodtl
        EXCEPTIONS
          PROGRAM_ERROR            = 1
          OTHERS                   = 2.
    FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM
      RS_SELFIELD TYPE SLIS_SELFIELD.
    your code....
    ENDFORM.
    for second click
    READ TABLE IST_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND1'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'USER_COMMAND1'.
        MODIFY IST_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME = WA_EVENT-NAME.
      ENDIF.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM       = G_REPID
          I_CALLBACK_PF_STATUS_SET = C_PF "'SET_PF_STATUS'
          I_CALLBACK_USER_COMMAND  = 'USER_COMMAND1'
          I_CALLBACK_TOP_OF_PAGE   = 'TOP_OF_PAGE'
          I_GRID_TITLE             = G_TITLE
          IS_LAYOUT                = IST_LAYOUT
          IT_FIELDCAT              = IST_FIELDCAT[]
          I_SAVE                   = 'A'
        TABLES
          T_OUTTAB                 = IST_FINAL1.
    hope this solves.

Maybe you are looking for

  • Want to install Windows 8 on my early 2011 13" MacBook Pro?

    Hi guys, I am planning to install Windows 8 but unsure of a few things, particularly with the version I have to get. I have an early 2011 13" MacBook Pro, running 10.9.3 and it has never had any previous versions of Windows on it before. Can I simply

  • Cannot place a signature on a PDF document

    I just encountered an issue with a specific PDF issued to me by a vendor. I am normally able to "place signature" on any PDF document. This one however, only allows me to place a certificate-based digital signature. How can I go about simply placing

  • D20 Marvell raid bios update.

    Ok i have a pair of Lenovo D20's here one is a 4158-W5K & the other is  a 4158-B6U I just noticed that one unit has a different Marvell bios than the other one.  Is there any way to update them to the newest raid bios?  Any help would be appriciated.

  • What's best for my battery.

    I use my macbook alot, like 8 hours a day. So I was wondering what would be the best for my battery. Should I always connect it to the adapter. Or should I use it on the batterypower and charge it when its underneath 20%. Thanks in advance.

  • More read-mostly pattern & JNDI Lookup.

    Hi all, I'm still having problems with the read mostly pattern implementation. I get the following: weblogic.utils.AssertionError: ***** ASSERTION FAILED ***** - with nested exception: [javax.naming.NameNotFoundException: Unable to resolve UserRO. Re