Force Background processing with SUBMIT and keeping results in memory

Hi Everyone
I have a very tricky issue that i need some help with.
I have a developed an RFC that allows a NON-SAP front-end to execute reports in the SAP backend the result of the report is saved in memory and formatted to XML and passed to the front-end where the report is displayed.
Therefore for this to work i have added the following code
g_guid = cl_salv_export_db_storage=>create_guid( ).
  " Set ALV memory parameters
export l_mode = 'M' to memory id 'ALV_EXTRACT_MODE'.
  export l_guid = g_guid to memory id 'ALV_EXTRACT_GUID'.
  "Execute the selected report
  SUBMIT (wlv_report_name)
                     USING SELECTION-SET wlv_variant_name
                     WITH PNPTIMED EQ ' '
                     WITH PNPBEGDA EQ im_begda
                     WITH PNPENDDA EQ im_endda
                     WITH PNPPERNR IN wlr_employee
                     AND RETURN.
data: l_xstring type xstring.
            l_xstring = cl_salv_export_db_storage=>import_xmlstring(
                guid  = g_guid ).
This allows me to get the report results to be passed to the front-end.
This works quite good for most reports but in some cases the reports has a popup message. In this case the execution fails as the report is not executed as a background job (if the report is executed in the background then the popups are ignored).
The issue is that the reports cannot be executed in the background as the memory will then not contain the report results and secondly the client does not want to use the spool for the report results at all. The second constraint is that the client does not want to alter the reports in any form to remove the popups due to the large volumes of reports.
What i have noted is that if the report is executed and i set the SY-BATCH parameter to "X" then it works perfectly (via the debugger). I can change the SY-BATCH value in my code but obviously once the SUBMIT is executed the SY parameters are reset.
My question is: Is there a way to force the SY parameter values when i perform a SUBMIT? Or is there any other possible solution to this issue?

If you want to go with the option of spool, then you can use the following addition
SUBMIT <reportname> to SAP-SPOOL
  SPOOL PARAMETERS <print_parameters>
  WITHOUT SPOOL DYNPRO and RETURN.
and then read the spool,
if you want to go with the option of a background job, then you can use the following addition
SUBMIT <reportname> VIA JOB <name> NUMBER <num> AND RETURN.
<name> and <num> are generated using FM JOB_OPEN, and then you have to close it using JOB_CLOSE.
Thanks.

Similar Messages

  • Problems with SUBMIT and EXPORTING LIST TO MEMORY

    Hi,
    I have a program that executes another report using a submit call, then the output of this submit is retrieved to the program using the LIST_TO_MEMORY FM. Source code it's something like this:
    SUBMIT rptime00
                 EXPORTING LIST TO MEMORY AND RETURN
                 WITH SELECTION-TABLE t_params
                 USER 'my_user'.
    CALL FUNCTION 'LIST_FROM_MEMORY'
         TABLES
             listobject = t_table
         EXCEPTIONS
             not_found  = 1
             OTHERS     = 2.
    This code works fine if I execute the program in foreground. But when I try to execute the report in background (F9 instead of F8 for example), submit works fine but LIST_FROM_MEMORY returns a NOT FOUND exception instead of the output of submitted program.
    So, is it possible to retrieve the output of a program called via submit when the report that executes the submit is executed in background?, how can I retrieve the output of submit when the report is executed in background?
    thanks in advance

    try
    SUBMIT rptime00
                 EXPORTING LIST TO MEMORY AND RETURN
                 WITH SELECTION-TABLE t_params.
    without user
    hope that helps
    Andreas

  • Background Processing, Selection Screens and Variants

    Hi All,
    I am having a little trouble Background Processing with Selection Screens and Variants.
    When a user runs my report and selects the option of background processing, then they select a checkbox. Once this is checked, they should go and fill in details, press Execute and voila a background process is created. However what is happening is that when i execute it then it asks for a variant. I do not want this to happen. I want the values in the selection screens to be used as default. Here is my code for background processing
    FORM START_BACKGROUND_PROCESSING.
      CALL FUNCTION 'BP_JOBVARIANT_SCHEDULE'
        EXPORTING
          TITLE_NAME            = 'End Customer Report '
          JOB_NAME              = 'customer_report'
          PROG_NAME             = 'ZSE_SD_SALES'
      EXCEPTIONS
        NO_SUCH_PROGRAM       = 1
        OTHERS                = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "START_BACKGROUND_PROCESSING
    After the background process is started, all teh data is collated then written to the app server. this is the order
      ELSEIF R2 EQ 'X' AND SY-BATCH EQ 'X'.
        PERFORM INITIALIZE_DATA.
        PERFORM SELECT_DATA.
        PERFORM PROCESS_DATA.
        PERFORM GET_END_CUSTOMER_DATA.
        PERFORM WRITE_TO_APP_SERVER.
    Any ideas? Points given to those who are helpful

    done myeslf

  • Inbound process with WM and HU

    Hi Friends ,
    I am exploring different possibility Standard SAP supports for goods receipt process through Inbound deliveries.TO make things simple right now I am only finding possibilities for EXTERNAL Material receipt only.
    The steps I know invloved in Inbound delivery process are (with WM and HU)
    1) PR - Source assignment - PO - Release PO
    2) Advance shipment notification (ASN)
    3) Inbound delivery creation
    4) Packing of material on Goods receipt
    5.1) Put-away - Automatic TR creation
    5.2 ) Put-away - Automatic TO creation
    5.2 ) Put-away material - TO Confirmation
    6) PGR
    Now I am looking for different configurations by which can automate processes mentioned above from point 2 to 6.Like
    2 and 3 ) ASN / Inbound delivery : I know that ASN can be received from vendor (in the form of idoc) and can create Inbound delivery automatically.But what if Vendor doesn't provide ASN message , how can we create deliveries for expected material ? Do we need to use VL06I ??
    4) Once the Inbound delivery is created , I know we can automate packing process ... not sure about the configuration.I only know that this invloved condition technique where we create Conditions / schema / condition records ... BUT where do we assign that SCHEMA ( like pricing schema is attached to PORG group / Vendor grp )
    5.1 ) Do we always need to have a TR to get TO created against Goods receipt OR can we can ask system to create TO directly without any TR ?
    5.2 ) TO Creation - Automatic TO creation as soon as the packing is completed.
    Where is this setting ?  I understand there are two process 1) real time TO creation 2) Background TO Creation. For immediate TO creation I can see a configuration in IM-WM movement type assignment configuration , is that all ??
    5.3 ) TO Confirmation -.Like TO Creation , do SAP also provide functionality to CONFIRM TO immediately or through Background Jobs ?? What are the required settings ?
    6) How can we automate the PGR process ?
    Sorry for this long query , but I hope there are many other friends who are interested in knowing all such possibilities.
    Thanks in advance for all your help.
    Regards
    Shrey

    2 and 3 ) ASN / Inbound delivery : I know that ASN can be received from vendor (in the form of idoc) and can create Inbound delivery automatically.But what if Vendor doesn't provide ASN message , how can we create deliveries for expected material ? Do we need to use VL06I ??
        Option 1: You can use transaction VL34 to create inbound deliveries by PO, Plant and the delivery date.
        Option 2: You can use transaction VL31N and click the Purchase Orders to create inbound deliveries.
    4) Once the Inbound delivery is created , I know we can automate packing process ... not sure about the configuration.I only know that this invloved condition technique where we create Conditions / schema / condition records ... BUT where do we assign that SCHEMA ( like pricing schema is attached to PORG group / Vendor grp )
        First we have to create the packing instruction in POP1.
    --> Give a packing instruction name.
    --> Then in the line 1 - Enter P and the packaging material
    --> Then in the line 2 - Enter M and enter the material to pack and give the quantity to pack in the packaging material. Eg: In each pallet how much quantity to be packed.
      Second go to the transaction POF1.
    --> Enter RCPT and based on the combination Material/Plant/Vendor, select it and enter the Material and the Packaging Instruction you created before.
    --> Then you can do the autopack in VL32N.
    5.1 ) Do we always need to have a TR to get TO created against Goods receipt OR can we can ask system to create TO directly without any TR ?
    --> We can create the TO directly from the VL32N.
    *5.2 ) TO Creation - Automatic TO creation as soon as the packing is completed.
    Where is this setting ? I understand there are two process 1) real time TO creation 2) Background TO Creation. For immediate TO creation I can see a configuration in IM-WM movement type assignment configuration , is that all ??*
       SPRO - Logistics Execution - Warehouse Management - Activities - Transfers - Set Up Autom. TO Creation for TRs / Posting Change Notices
    5.3 ) TO Confirmation -.Like TO Creation , do SAP also provide functionality to CONFIRM TO immediately or through Background Jobs ?? What are the required settings ?
       SPRO - Logistics Execution - Warehouse Management - Activities - Transfers - Define Movement Types
       Then select the Warehouse and the movement type 101 and select the option "TO item can be confirmed immediately"
       This will confirm the TO as and when the TO is created.

  • How to send the idoc to 12 status, without processing with RSEOUT00 and RBD

    Hi All,
    How can I change the status of IDoc to 12 without processing with the programs RSEOUT00 and RBDMOIND programs, only with using the partner profiles.  Help needed ASAP.
    Thanks,
    sreenivas.

    Then you need to use fm
      call function 'MASTER_IDOC_DISTRIBUTE'
        exporting
          master_idoc_control            = wa_edidc
        tables
          communication_idoc_control     = i_edidc
          master_idoc_data               = i_edidd
        exceptions
          error_in_idoc_control          = 1
          error_writing_idoc_status      = 2
          error_in_idoc_data             = 3
          sending_logical_system_unknown = 4
          others                         = 5.
    then you want to change status
    try to submit the above said program

  • Share audio with screenshare AND keep the micropho...

    Hello,
    I need to use Skype for the following: I teach music production courses over Skype and I need to be able to share sound between our programs via screenshare. Yet I also need my microphone to work for communication. 
    I have found audio sharing possible via SoundFlower, however it disables my ability to use the microphone on Skype.
    Is there a way around it?
    Thanks.

    B33 wrote:
    i thought when you had Unlimited plans like i do and my Line is coming up for Renew in February as i was told to get a new phone and keep my Unlimited i would have to Pay full Price for it). If i want it at a subsidized price i would have to go with a different plan and drop my Unlimited) I'm just a little fuzzy on this that's why i'm asking b
    That's correct and has been discussed on this forum in tons of threads.  If you have unlimited data and want to keep it (at least for now), your choices are:
    pay full retail price for a new phone at Verizon
    buy a phone from somewhere like swappa or ebay (somewhere that doesn't require a new two-year Verizon contract)
    get a subsidized phone from Verizon, sign a new two-year contract, and switch to a tiered data plan (i.e., 2 GB for $30); this applies if you're currently on a Nationwide plan ... older plans may force a switch to the Share Everything plan
    if available, upgrade another line on the account and move that phone to the unlimited line (of course, if that line also has unlimited data, it will be lost)
    add a line to the account for a new subsidized phone, move the new phone to the unlimited line, and put a basic phone on the new line and drop the data plan (of course, that would involve paying a monthly fee for the additional line,and the ETF would be based on the smartphone purchased, not the basic phone on the line)

  • How to run background process with web application

    Hi,
    I have a web application , a servlet. I would like to have a background process that collecting data for my servlet.
    How can I achieve this? can someone point me to a tutorial or example?
    Also, would it be possible to share an object between the background process and myservlet?
    Thanks,

    Thanks for the idea.
    I had the background process running. :)
    But I'm still do not understand this part to share an object such as Java Map (<id,myobject>), what do you mean by "task a property of my ServletContextListener" ?
    BalusC wrote:
    If you make the task a property of your ServletContextListener implementation and put the implementation in the application scope, then you can access it from any servlet.Do you mind explain to me a bit more I'm still fairly new with this or maybe if you know an example.
    Here's my code snippet so far. How can I share myList to MyServlet?
    public class MonitorTimer extends TimerTask
           private Map<String, Channel> myList;
         @Override
         public void run()
              System.out.println("Monitor Timer times up");
              //Clear the map before fill with the new data
              if(myList!= null)
                   myList.clear();
              loadConfig();
            private void getData()
               //fill myList with data
    public class MyContextListener implements ServletContextListener
         @Override
         public void contextDestroyed(ServletContextEvent arg0)
              // TODO Auto-generated method stub
         @Override
         public void contextInitialized(ServletContextEvent arg0)
              System.out.println("Context Initialized");
              Timer timer = new Timer();
              //Run MonitorTimer every 2 minutes
              timer.scheduleAtFixedRate(new MonitorTimer(), 10*1000,2*60*1000);
    public class MyServlet extends HttpServlet implements Servlet
         @Override
         public void destroy()
              // TODO Auto-generated method stub
              super.destroy();
         @Override
         protected void doGet(HttpServletRequest request, HttpServletResponse response)
                   throws ServletException, IOException
    }Thank you so much for your help,
    Edited by: geek.shrek on Nov 4, 2009 1:50 PM

  • How to Create Excel File in Background processing with different colors

    HI All
    I am trying to create Excel file in background & send it to user through e-mail, this i could acheive using fucntion module SO_DOCUMENT_SEND_API1, but here my requirement is i want to put different colors to columns of excel & this should happen in Background processing,
    Initially i completed above requirement by using HTML type of document with attachment type 'ALI'  & formatted output using write statement & used colors, after that i took this o/p using save_list function module & then table compress...etc.
    but i don't know how to achieve same if we need o/p in excel as size of object of excel file is less than that of HTML
    I am thankfull to everybody who will help me.
    Regards
    Lokesh

    Lokesh,
    Iam also trying to populate my text file with colors as an attachment . If you know this please let me know.

  • Controlling a chemical process with LabVIEW and the SC 2075 board

    Hi,
    I am a degree student and one of my projects is to control a chemical process using LabVIEW and the SC2075 board. The process variables i must control are temperature, pH and also several motor. Is this viable using the SC 2075 board and if so does anyone know where i can attain information on using the board. Also if anyone has suitable sample vi's that may be of use to me it would be very much appreciated. My email is [email protected]
    Kind Regards,
    Derek

    Hi Derek,
    Bellow is a link the the user guide for the 2075.
    http://www.ni.com/pdf/manuals/371217a.pdf
    You should be able to aquire data from you sensors but you might need some signal conditioning depening on the voltage levels they return.
    For sample vi's try going to Help>>Find Examples... within LabVIEW or goto the following link to search our developer exachange.
    http://www.ni.com/devzone/dev_exchange/ex_search.htm
    For more information about Signal conditioning and Data Aquisition try:
    http://zone.ni.com/devzone/devzone.nsf/webcategories/4d58b1b80ec41ef70625683f006e1d6d
    I hope this helps
    Regards
    Jon Bowers
    Applications Engineer
    NIUK

  • HT201342 Help needed On sync process with devices and photo stream keeps multiplying pics ?

    Older generation trying to acquire a savvy touch for apple products needing lots of help!  Is there anyone out there interested in assisting in all phases of learning ....

    Older generation trying to acquire a savvy touch for apple products needing lots of help!  Is there anyone out there interested in assisting in all phases of learning ....

  • Issue with Submit and Return in passing string/values of longer length.

    Hi,
    I have a FM which has to submit a report as a job.
    I am required to send a string( length could be close to 1024 characters or more than that) to the report as the parameter.
    I am using Submit with Return.
    1.When I pass my string as parameters, in the report it gets truncated at 60 chars.( though i have defined the parameter of type char1024)I lose the data.
    2.When I split my string(aflter logical splitting the lenght is still equal to about 200 chars) and then pass as select options it gets truncated at 45 chars in the report ( though i have defined the parameter of type char1024)and i lose my data.
    3.I cannot use Export/Import as I found that it does not work with jobs.
    Please let me know how can i sumbit the report as a job while passing it a string of length 1024 characters.
    Regards,
    Sulakshana
    Edited by: Sulakshana Shinde on May 21, 2009 2:44 PM

    Option 3 should work, unless you are not using the EXPORT/IMPORT correctly.  I believe that you are going across work processes, which means you may need to use the shared buffer or shared memory when using the export/import statements.  
    Something like this.
    Data: lv_value type string.
    lv_value = 'SomeValue'.
    EXPORT lv_value = lv_value
           TO SHARED BUFFER INDX(ST) ID 'SomeUnigueKey'.
    See this.
    http://help.sap.com/abapdocu/en/ABAPEXPORT_DATA_CLUSTER_MEDIUM.htm
    Regards,
    Rich Heilman

  • Resizing text and images with actions and keeping it resized for the next slides, how to?

    Hello everybody,
    I searched over the net and in this support section for a solution to my problem, but i didnt find any, so...here I am asking you experts.
    Through a particular use of different actions I make a logo "compose" in the first slide of my presentation (the logo is composed by text and images that interact), then in the second slide i make it resize so it goes 50% of its size and moves down like a TV logo, in the corner of the slide, and I want it to stay there for all the lenght of the presentation.
    It might be a stupid problem, but I didnt understand how to keep it there, 50% of its size and always in that position. If i duplicate the slide I obviously duplicate the 100%-size-logo, not its 50%-size-version, and if i shrink it in order to make it be 50% of its size the text size doesnt shrink so i have to change the text size manually, but the visual effect is imperfect.
    Lets summarize:
    slide 1: text appears, image appears, the text and the image move and "compose" the logo
    slide 2: the complete logo reduces its size to 50% and moves in the lower corner of the presentation, in the place I want it to be for, lets say, 20 slides
    slide 3: i want to have this logo already reduced in size and in its position, in the right lower corner, but if i try to group the different parts of the composed logo and i try to squeeze them the font doesnt change its size, I only squeeze the area that the text occupies.
    Some help please guys?
    Thanks in advance,
    Dom-
    (add: the problem is kind of similar to this: https://discussions.apple.com/message/9179367#9179367 . the idea of making a slide that contains the logo and text in the exact positions they would be after the move and scale actions is good and that was my first attempt, the probem is that it looks impossible to me to create a second "little" version of the logo that looks exactly the same of the first one that i reduced, so i hope there is some way to tell the app to use "the first logo, only resized the way i want", and thats the point where the problem with the size of the text comes out)

    Hi pritam,
    The “maintain proportions of window for different monitor
    resolutions” property will maintain the proportional size of the front panel
    (its x and y sizes) when opened in a different resolution. The front panel
    objects will not be resized and will appear larger (and may not fit inside the
    front panel) when saved in a higher resolution, and moved to a lower
    resolution. You can use the “Keep window proportions” property to achieve the
    same results.
    To have both the front panel dimensions and front panel
    controls scale, you need to have both the above property and the “scale all
    objects on front panel as the window resizes” selected. The labels will not be
    resized by this.
    I tried using both properties on two monitors and noticed
    that the change does not occur when the resolutions between the monitors are
    different. I had to lower both monitors’ resolution to see the change work
    properly.
    Please post back if you have any questions. Have a great day!
    Ryan D.
    District Sales Manager for Boston & Northern New England
    National Instruments

  • Intracompany sales/stock transfer management processes with WBS and New G/L

    Hi all,
    we have a scenario in which we need to transfer project stock between two projects. Both belong to the same Company Code. The transfer must be conduct as if it was a sale.
    Basically the scenario is the following:
    1) Material A is in stock of Plant P1 under Project WBS1 (linked to Functional Area FA1).
    2) Plant 2 needs to "purchase" that stock and put it under WBS2 (linked to Functional Area FA2).
    We have new G/L with the Functional Area set as a balancing dimension so any transfer between the two Plants should generate a billing document to balance the two Functional Areas. The stock should be moved between the two Plants/Projects.
    How would you manage this scenario in SAP?
    I've read all the documentation related to Intercompany Business Processes in SD Billing and everything related to Transfer Prices with New GL however I've found no information on this particular scenario.
    In particular, the STO cannot be used since it allows only to move the stock between two Plants without having the WBS dimension on the receiving plant (i.e. I can move stock from Plant P1/WBS1 to Plant P2/WBS1 - which is not what I need since I need it on WBS2). Besides, but I'm not sure, the automated billing seems to be possible only in case the transfer is between Plants belonging to different company codes (I still need a FI document for balancing the Functional Areas).
    The transfer price scenario, which is the one recommended by SAP for Intracompany sales, is not applicable as well since we don't have Profit Centers and, as far as I've understood, it doesn't seem to allow stock transfer between different WBS as well.
    The only scenario I thought so far is to use a Purchase Order/Sales Order scenario:
    The PO would allow WBS2 to receive in Plant P2/WBS2 the stock purchased against internal vendor Plant P1.
    The SO would allow WBS1 to sell the stock (i.e. issue it from Plant P1/WBS1 to internal customer Plant P2).
    The billing would be done against the SO and the incoming invoice would be posted against the PO (hence recognizing internal revenues and internal expenses).
    This process, however, requires a lot of reconciliation activities and is error prone as there is no cross-check between SO and PO data.
    Do you have any hints or suggestions to manage this differently?
    Thank you in advance for your help.
    Ciao!
    Max

    Hi seesen_rs,
    thank you for your answer.
    We also thought of that but the issue is that the 301Q moves stock immediately while we need to monitor the order and the shipment of the material (the 301Q is posted when the goods arrive at P2/WBS2). Besides, we also need to consume budget upon order so the PO/STO would help us for the first part of the process (i.e. when the goods are requested from P2/WBS2), then we should do the 301Q and then the billing. In order to keep the whole document chain linked we should also make us of custom fields. An alternative would be to use direct Goods Issue and Goods Receipt however they would have no references for budget and material requirement tracking purposes, hence not very helpful.
    Also SAP said there is no easy way for managing this
    Ciao!
    Max

  • Background processing thru submit

    Dear All,
    I am using Job_open, Submit <> via Jobname <> and job_close option. but still I am unable to execute the report in background as the same doesn't get schedule. I wanted to konw how the name of the job should be specified as it is not creating any job with the name i am providing.
    regards
    ag

    Hello Friend,
    Try this code for example.
    Say you have two programs prog-1 and prog-2 may or may not have same selection-screen parameters. And you are calling prog-1 from prog-2.
    Write the below code in prog-2.
    Select-options:...................
    DATA:   jobnam TYPE btcjob value 'JOB1',
                 job_released TYPE c,
                 cnt LIKE tbtcjob-jobcount,
                 stpn LIKE tbtcjob-stepcount,
                 strim TYPE c VALUE 'X',
                 p_params like pri_params.
    initialization.         
    start-of-selection.
    CALL FUNCTION 'JOB_OPEN'
      EXPORTING
       JOBNAME                = jobnam
       SDLSTRTDT              = sy-datum
       SDLSTRTTM              = sy-uzeit
       JOBCLASS               = 'A'
    IMPORTING
       JOBCOUNT               = cnt
    EXCEPTIONS
       CANT_CREATE_JOB        = 1
       INVALID_JOB_DATA       = 2
       JOBNAME_MISSING        = 3
       OTHERS                 = 4
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          expiration             = 8
          immediately            = ' '
          new_list_id            = 'X'
          no_dialog              = 'X'
          release                = 'X'
        IMPORTING
          out_parameters         = p_params
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
      SUBMIT prog-1 TO SAP-SPOOL
      SPOOL PARAMETERS p_params
      WITHOUT SPOOL DYNPRO
      VIA selection-screen
      USER sy-uname
      VIA JOB jobnam NUMBER cnt AND RETURN.
    CALL FUNCTION 'JOB_CLOSE'
           EXPORTING
                jobcount             = cnt
                jobname              = jobnam
                strtimmed            = 'X' 
           IMPORTING
                job_was_released     = job_released
           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.
    end-of-selection.
    Hope this is helpful, if so reward.
    Regards,
    Vijay

  • Background process for CJ30 and CJ32

    Hello Experts,
    I would like to do the transaction CJ30 and CJ32 in background. Is there any Business object , BAPI or functional module to do this job.
    I would keep recording as last option. Please provide any information you might have for automating this process in background.  Any insight would be really helpful.
    FATMAN

    Thanks Sreenivas,
    Functional Module KBPP_EXTERN_UPDATE_CO  is working for my project.
    FATMAN

Maybe you are looking for