How to restrict running of report in foreground

My requirement is that, the user should not be allowed to run the report in foreground. Since there is a high possibility for the report  to go to time-out.. I want to force the user to run it in background only.. How can we do that ? IS it Basis related or .. can it be done in abap ?
Thanking you..
Shankar

Hi Shankara,
Here is what is happening with your logic.
1. User is running the program and got to the selection screen.
2. User enters the selection values and then presses execute.
3. User gets the diaolog box asking him whether the program should be run in the background.
4. User says yes and you are doing the submit of your program.
The problem lies in the step 4 where you are submitting your program.
Remember, when you submit a program, you are supposed to have passed the selection screen data in one of the standard ways of passing the data which is either creating a variant and passing the variant to the job, or use SPA/GPA parameters if relevant or any other method.
Since you are calling your program again within the same program, but without passing the selection screen values, your program is failing. Here is a sample program to achieve what you are trying to achieve.
REPORT ztest.
PARAMETERS: p_vbeln LIKE vbak-vbeln,
            p_bkrun NO-DISPLAY.
DATA: ls_vbak LIKE vbak.
DATA: v_answer,
      v_jobcount LIKE tbtcjob-jobcount.
  IF p_bkrun IS INITIAL.
*-- not background processing
    CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
         EXPORTING
              textline1      = 'This may time out.'
              textline2      = 'Do you want to run in background?'
              titel          = 'Warning!!!'
              cancel_display = space
         IMPORTING
              answer         = v_answer.
    IF v_answer = 'J'.
*-- run in the background
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                jobname          = 'ZTEST'
           IMPORTING
                jobcount         = v_jobcount
           EXCEPTIONS
                cant_create_job  = 1
                invalid_job_data = 2
                jobname_missing  = 3
                OTHERS           = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.
      ENDIF.
*-- submit the program in the background
      SUBMIT ztest
        WITH p_bkrun = 'X'
        WITH p_vbeln = p_vbeln
        USER sy-uname
        VIA JOB 'ZTEST' NUMBER v_jobcount AND RETURN.
*-- close the job
      CALL FUNCTION 'JOB_CLOSE'
           EXPORTING
                jobcount             = v_jobcount
                jobname              = 'ZTEST'
                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.
        MESSAGE ID sy-msgid TYPE 'W' NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      EXIT.
    ELSE.
      CLEAR v_answer.
    ENDIF.
  ENDIF.
  CHECK v_answer IS INITIAL.
  SELECT SINGLE * FROM vbak
                  INTO ls_vbak
                 WHERE vbeln = p_vbeln.
  IF sy-subrc <> 0.
    WRITE:/ 'Invalid Order Id.'.
  ENDIF.
END-OF-SELECTION.
  CHECK v_answer IS INITIAL.
  IF p_bkrun IS INITIAL.
    WRITE:/ 'Here is the result running the program in foreground.'.
  ELSE.
    WRITE:/ 'Here is the result running the program in background.'.
  ENDIF.
  WRITE:/ ls_vbak-vbeln,
          ls_vbak-vkorg.
Let me know if you have any questions.
Srinivas

Similar Messages

  • How can I run the report for different input values at the same time?

    Reports version: Report Builder 6.0.8.13.1
    Oracle version: Oracle8i Enterprise Edition Release 8.1.7.0.0
    I want to run the same report for different input parameter values and spool each o/p to different file and ftp to a server. For this, as a first step, I am spooling different input values in to a file, reading those values through a loop and calling the report for that input values. Each report run/execution is taking 15 minutes. Total report execution is taking approximately 4 hours (assuming 16 different input values) to complete. So I have to wait 4 hours to see ALL outputs.
    I would like to run the report parallel for ALL the input values and I should be able to see the ALL outputs with in 15 or 16 minutes.
    In my shell script, I added & symbol at the end of the report call to start/run the job in the background. Due to this the control passed to the next step after the report call. At this place I have an ftp command to send the output file to a different server and it is giving error some thing like “o/p file is not available/created yet". This is due to the fact that report writer is NOT yet completely started/initiated or it is NOT completed the spooling.
    How can I run the report at the same time for all the input values and save the time?
    Thanks in advance.
    Kishore.

    Increase the number of server engines running right now it seems there is only one engine running ,increase it to 4 or 6
    and then atleast 4 or 6 reports will run simultaneously.
    For FTPing the output add to your sript to check whether it is locked and if not then only try to ftp .
    Also for more better functionality read the document (chapter 15 ) for 10g reports for its new fuinctionality.
    http://download.oracle.com/docs/cd/B14099_17/bi.1012/b14048/toc.htm
    Thanks
    Subodh

  • How do I run Recruitment reports in backend

    Hi,
    Please can anyone help me to know how to run eRecruitment reports (eg: HRRCF_CS_EXA_CONF_REGISTRATION) from backend (SAP GUI) ?
    Thanks in advance,
    Regards,
    Prabhakara M

    Dear,
    Fix a time which not affect the normal working hours and load on servers.. Like schedule the execution of reports before start of work hours of the day or midnight. Allot the manpower if requried accordingly to finish the task. Check the possibilties of reports execution one after another using SQL.
    Check the possibilties through Infoview and also BOXI premium.
    Check the links may be helpful: http://help.sap.com/saphelp_nw04/helpdata/en/46/dfd33b1ed4b47de10000000a114084/content.htm
    http://www.sap.com/solutions/sapbusinessobjects/sme/reporting-dashboarding/reporting/crystalreports/index.epx
    Regards,
    Syed Hussain.

  • How can I run a report in a jsp page?

    I've made reports using Reports 9i and i want execute these reports from a jsp page.
    When i run a report in a jsp page the following error :
    Any Advice?
    ========================
    Internal Servlet Error:
    javax.servlet.ServletException: oracle/reports/RWException
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:508)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Thread.java:484)
    Root cause:
    java.lang.NoClassDefFoundError: oracle/reports/RWException
         at java.lang.Class.getMethods0(Native Method)
         at java.lang.Class.getDeclaredMethods(Class.java:1039)
         at java.beans.Introspector$1.run(Introspector.java:852)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:850)
         at java.beans.Introspector.getTargetEventInfo(Introspector.java:556)
         at java.beans.Introspector.getBeanInfo(Introspector.java:294)
         at java.beans.Introspector.(Introspector.java:271)
         at java.beans.Introspector.getBeanInfo(Introspector.java:81)
         at org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:104)
         at org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:136)
         at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspParseEventListener.java:759)
         at org.apache.jasper.compiler.JspParseEventListener.addGenerator(JspParseEventListener.java:138)
         at org.apache.jasper.compiler.JspParseEventListener.handleTagBegin(JspParseEventListener.java:909)
         at org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListener.java:194)
         at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:825)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:209)
         at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
         at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
         at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)

    Hi Raul
    A better option would be to switch to Reports 9i because it natively supports Reports JSP tags. Your JSP then becomes seamless. And much more...
    With 6i, you can look at using Reports Servlet.
    Regards
    Sripathy

  • How can i run a reports from forms

    Oracle forms 9i
    Hai All
    I am using oracle forms 9i.
    From the forms i need to generate a reports how can i generate a reports from there
    Regards
    Srikkanth.M

    there are hundreds of examples in this forum. Do a search

  • How to restrict data in reports for different users...

    i created a monthly_sales report on XYZ_SALES_FACT table
    i have to give restriction on reports based on the users.
    i.e. user_1 will access only NORTH region sales info on monthly_sales report
    user_2 will access only SOUTH region sales info on monthly_sales report etc.
    Note: my client is not agreeing to create multiple reports based on the user/region.
    how i have to give user restriction on report based on the users?

    Hi,
    You can create a VPD policy and then create a login trigger and pass SSO client_indentifier or database session_user (use if/then/else to protect both)
    You can check here for the VPD/login trigger.
    Disco Config Guide
    http://download.oracle.com/docs/html/B13918_03/security2.htm#sthref1002
    OTN articles
    http://www.oracle.com/technology/obe/10gr2_db_vmware/security/vpd/vpd.htm
    http://www.oracle.com/technology/oramag/oracle/04-mar/o24tech_security.html
    You can also use secure views, mandatory conditions in the EUL, etc.
    Some other related forums entries:
    Re: Using VPD with Oracle Discoverer without SSO
    Re: Restrict Data for a user without VPD
    May want to search, likely many others on the subject.
    Should give you a good place to start.
    Regards,
    Steve.

  • How to Run a Report for Blanket PO that have been OVER Invoiced (over limit

    Hi All,
    How do I run a report in ME2N, where I would want to see all the Blanket POs (Framework Orders) that has a "Actual Value" (the amt invoiced so far) which is Greater than the Overall Limit (specified in the "Limits" tab)?
    Are there any fields in the Dynamic Selection in ME2N? I coudn't Find any......How can I compare two fields in the Blanket PO, for example "Overal Limit' > "Actual Value"?? How to put this selection criteria in ME2N
    Edited by: Duke Dukester on Sep 17, 2008 10:31 AM

    You will not get this information via ME2N but you can get via ME2S
    once you execute the ME2S you will see the PO lines and if oyu double click on it than you will get the all information you are looking but the exact query directly not possible with ME2S
    The best way is write the query using table ESUH and EKPO
    joint EKPO to ESUH and do the query based on your requirements.
    you can get the package number from EKPO and based on the package number you can retrive the data form ESUH table

  • How to run  multi reports at a time using button

    dear all
    i have a button on form, that call a report abc.rep. when i press the button report is displayed. now i want to show another view of that report when i press button second time. but it doesn't appear. when i close the first report that it gets run.
    how can i run same report multiple time using this button.
    regards.
    Asif iqbal
    Software Engineer
    (Karachi, Pakistan).

    HI
    Call you report using this code then you can run more then 1 report at the same time
    declare
    AppID PLS_INTEGER;
    begin
    AppID := DDE.App_Begin('RWRUN60 module=d:\reports\LEDGER_NEW.Rep userid='||:global.the_username||'/'||:global.the_password||'@'||:global.the_Connect||' maximize=yes user_id='||:global.the_username||' user_password='||:global.the_password||' user_connect='||:global.the_connect, DDE.App_Mode_Maximized);
    end;
    Rizwan
    www.rizwanshafiq.blogspot.com

  • How to run a report to a file ascii in forms/report 10G

    We have an application in form an report 6i and we are going to translate it in 10G dev suite.
    We have a problem with any forms modules which run report to file ascii with particular format.
    After these files are send to printer o machine with host comand (we use the webutil for the host comand).
    How can we run tese reports to file ascii ?

    Hi,
    if you print a Reports to the file system then this happens on the server. Your options are
    a) Run the Reports with destype=cache and have the user printing it from the Browser
    b) Print the Reports to the file system as before and make the directory accessible on the Web so that you can call the file using web.show_document()
    c) You use Run_Report_Object() and print the reports to a network printer next to the user
    d) check otn.oracle.com/products/forms for orarrp (an unsupported utility but working)
    Frank

  • I want a PPT for how user run their reports on SAP  BW

    Hai guys,
         For our end-users we need one slide that gives them some hints/tips on how they should run the reports for best performance (e.g. extract as few records as possible).
    I know there is some SAP material in relation to this on sdn.sap.com.
    Plz help me out guys.......
    thanks
    prasanna

    Hi Prasanna,
    Check for docs/ppt in http://help.sap.com/bp_biv335/BI_EN/index.htm
    Bye
    Dinesh

  • How can i run Report in Web (Oracle 9i)

    I working with Report Developer 9i,
    How Can i run my report to web ?

    [    All Docs     ]
    http://otn.oracle.com/documentation/reports.html
    [     Publishing reports to web  - 10G  ]
    http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
    http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
    [   Building reports  - 10G ]
    http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
    http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
    [   Forms Reports Integration whitepaper  9i ]
    http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
    Thanks
    Ratheesh

  • How run JSP report from my directory on 9iDS & 9iAS

    How i can run .jsp report(web layout) from my directory now i have to copy jsp file in ORACLE_HOME\reports\j2ee\reports_ids\web directory then it is called by browser.
    Regards,
    Neeraj

    Hi Neeraj,
    There are two ways you can deploy your JSP-based Web reports: through the existing Reports application, and through a J2EE application you create yourself. Using an existing application is particularly useful when you are developing and
    testing your JSP-basedWeb reports.
    What you are doing is using the existing Reports application. In both methods you will have to do some manual work (copying the file into a directory where an existing Reports application is deployed, or packaging it and deploying it as a new application). It may not be possible to run the JSP reports (web layout) from your own directory.
    Navneet.

  • How to Run Oracle Reports from the web.

    How can we run Oracle Reports from the web - for example from a portal such as "Gateway"
    This is a univeristy that implements Banner - so can we run them from within Banner?

    Yes, of course. And for running the reports-server you need an OAS. Maybe here is a good starting point http://www.oracle.com/technology/documentation/reports.html

  • Difference in report of foreground n background

    Hi gurus,
       If a run a report in foreground a report is getting generated and after that in the report there is a checkbox if i click it and press a item in the menu bar which i have designed using menu paniter further processing happens but if i run it in background the checkbox is disabled.How to make it enabled .Please help

    Try to execute the program by using a variant.

  • Running a Report on Reports 10g

    Hello,
    I am new to developersuite10g and trying to create a simple report based on below query
    select * from dept;
    I have saved the report as "test.jsp"
    Now I am trying to run the report on web but for some reason its not displaying any browser.I have started the OC4J instance.
    I want to know as to how do you run the report from report builder on web.
    Thanks

    You can call the report as
    http://web_server.domain_name:port/alias/myreport.jsp?parameters
    Just refer
    http://download.oracle.com/docs/html/B13673_01/pbr_run.htm
    Nilaksha.

Maybe you are looking for

  • Windows no longer recognizes my ipod.

    i plug my ipod into the usb port of my toshiba laptop it's an ipod click wheel 20g. the ipod says: charging. it does not say do not disconnect, it just charges as if i plugged it into power. my computer refuses to recognize the ipod i have done every

  • Bundle Patch1 is now available for Solaris (SPARC), Solaris (x86-64), AIX

    [OTN |http://www.oracle.com/technetwork/oem/enterprise-manager/downloads/index.html?origref=http://www.oracle.com/technetwork/oem/grid-control/index.html] Hi All, EM Binaries updated with bundle patch1 are now available on OTN OMS and Management Agen

  • External interface memory leak?

    Hello, I am embedding the flash player inside a Visual C++ application. My program uses the external interface extensively. The external interface is called several times a second ( ~20 fps ) each time a ~1k XML string is passed to the flash player.

  • Why i can't download on Nokia C2-03?

    I try to download files such as games or applications, but i got the errorr 006. What is that

  • Remote App with ATV died

    I just updated my Ipod Gen 1 with 3.0, and updated remote...along with updating my ATV to 2.4. Now, my Apple TV will not see the ipod remote! It used to work fine before, I changed nothing on my network. I use a TC on N for my macbooks and ATV. I use