Pass parameter to background job from report

Hi All,
I have following requirement.
I am executing a Report. At end of report I am executing an event.
On the bases of event a background job runs.
Problem is that, I want to pass one field data from report to background job.
I already tested SET PARAMETER/GET PARAMETER is not working.
Is there any way any one can suggest, without using Tables.
Regards

Hi,
If you submit via job it will not be executing the program ..After SUBMIT statement the control will come to the program immediately..
Check this example..
DATA: p_jobcnt LIKE tbtcjob-jobcount,
      l_release(1) TYPE c.
Open the job
CALL FUNCTION 'JOB_OPEN'
     EXPORTING
          jobname          = 'ZMY_OBJ'
     IMPORTING
          jobcount         = p_jobcnt
     EXCEPTIONS
          cant_create_job  = 1
          invalid_job_data = 2
          jobname_missing  = 3
          OTHERS           = 4.
Submit the job.
SUBMIT ztest_program VIA JOB 'ZMY_OBJ' NUMBER p_jobcnt
       TO SAP-SPOOL WITHOUT SPOOL DYNPRO
       WITH destination = 'LOCL'
       WITH immediately = space
       WITH keep_in_spool = 'X' AND RETURN.
Close the job.
CALL FUNCTION 'JOB_CLOSE'
     EXPORTING
          jobcount             = p_jobcnt
          jobname              = 'ZMY_OBJ'
          strtimmed            = 'X'
          prdmins              = 15
     IMPORTING
          job_was_released     = l_release.
Thanks,
Naren

Similar Messages

  • Creation of background job from SE38

    hello all...
    In the selection screen of my report program, there are two radiobuttons - read mode or update mode.
    In read mode, the program reads an excel file and gives the output in teh form of errors, if at all, after some chekcs on this excel file.
    In update mode, the program should check the excel file, get an internal table with errors from the excel file as well as run BDC for the correct records in excel file. So the output here has two blocks, first one - errors in excel file, second one - errors in BDC update.
    But this update mode should run in background.
    HOW TO CALL THE BACKGROUND JOB FROM THIS REPORT PROGRAMME when the update mode is selected??
    Advance Thanks
    omkar

    Hi Vishal,
    1. How are u running the BDC ?
    2. If u are using call transaction syntax,
       then there is an extension to it.
        MODE mode
      (See help F1 on call transaction)
    The processing mode can take the following values:
    'A' Display screen
    'E' Display only if an error occurs
    'N' Do not display
    'P' Do not display; debugging possible
    3. We can use N
    4. N means, it won't display any screens
       of that BDC transaction.
    5. It does not exactly mean the BACKGROUND JOB
       generated thru sm36.
    Regards,
    Amit M.
    Message was edited by: Amit Mittal

  • Kicking off Background Job from Another SAP system

    Hi,
    Does anybody know how to kick off a background job from a separate SAP system?? 
    i.e I have a job on our CRM system that is dependant on a Job finishing from our ECC6 system first.
    Does anyone know how to do this?  I know I might be able to use events, is there anything else I should be making use of??
    Many Thanks

    Hi Daniel,
    Guess there is one more solution. In system A write a report (let us name it X) that would trigger a job in system B through an RFC call.
    Now in System A create a job with 2 steps. First step would be normal one, the second one for report X. Only when step 1 is over would step 2 start. So indirectly end of the existing Job A would trigger the required Job B.
    Regards.
    Ruchit.

  • How to trigger a background job from BADI method.

    hi friends,
    i need to trigger a background job from the badi method CHANGE_AT_SAVE for the BADI BOM_UPDATE.
    for this i think i need to create an event which i should give with parameters during job creation.
    can you pls help me solve this issue.
    thank u all.

    Hi Saravanan,
    Here is an example of what you have to do.
    Regards,
    Eric
    Reward any helpful sugestion.
    *&      Form  generar_job
    FORM generar_job .
    Generar Variante
      PERFORM generar_variante.
      w_fecha = sy-datum + 3.
      CALL FUNCTION 'DATE_COMPUTE_DAY'
        EXPORTING
          date = w_fecha
        IMPORTING
          day  = w_weekday.
    Si la fecha cae en sabado o domingo se debe continuar el lunes.
      CASE w_weekday.
        when '1'.
          ADD 2 TO w_fecha.
        WHEN '6'.
          ADD 2 TO w_fecha.
        WHEN '7'.
          ADD 1 TO w_fecha.
      ENDCASE.
      w_jobname = 'ZQM_CIERRE_LOTE_INSPECCION'.
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobgroup         = 'QUEUE'
          jobname          = w_jobname
        IMPORTING
          jobcount         = w_jobcount
        EXCEPTIONS
          cant_create_job  = 1
          invalid_job_data = 2
          jobname_missing  = 3
          OTHERS           = 4.
      IF sy-subrc EQ 0.
        CALL FUNCTION 'JOB_SUBMIT'
          EXPORTING
            authcknam               = sy-uname
            jobcount                = w_jobcount
            jobname                 = w_jobname
            report                  = 'ZQM_CIERRE_LOTE_INSPECCION'
            variant                 = w_var
          IMPORTING
            step_number             = w_stepnum
          EXCEPTIONS
            bad_priparams           = 1
            bad_xpgflags            = 2
            invalid_jobdata         = 3
            jobname_missing         = 4
            job_notex               = 5
            job_submit_failed       = 6
            lock_failed             = 7
            program_missing         = 8
            prog_abap_and_extpg_set = 9
            OTHERS                  = 10.
        IF sy-subrc EQ 0.
          CALL FUNCTION 'JOB_CLOSE'
            EXPORTING
              jobcount             = w_jobcount
              jobname              = w_jobname
              sdlstrtdt            = w_fecha
              sdlstrttm            = w_hora
            IMPORTING
              job_was_released     = w_rel
            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 EQ 0.
            IF w_rel EQ 'X'.
              WRITE:/ w_jobname, 'FUE LIBERADO. VER SM37.'.
            Guardamos los destinatarios
              PERFORM destinatarios_job.
            Guardamos la información a utilizar al ejecutar el job
              PERFORM guardar_datos_job.
            ELSE.
              WRITE:/ w_jobname, 'NO FUE LIBERADO'.
            ENDIF.
          ELSE.
            WRITE:/ w_jobname, 'NO FUE CERRADO'.
          ENDIF.
        ELSE.
          WRITE:/ w_jobname, 'NO FUE ENVIADO'.
        ENDIF.
      ELSE.
        WRITE:/ w_jobname, 'NO FUE CREADO'.
      ENDIF.
    ENDFORM.                    " generar_job

  • How to schedule the background job if report have Presentation server files

    Hi All,
    I have searched the forums and found , the way for the scheduling the background job if report selection screen have the presentation server file input.
    1. Using the Open data set method.
    And my client is not OK with Open dataset way, it there any other way to do this, As we are using the EXCEL file.
    Thanks and Regards,
    Bharani

    Hi,
    As said above it is generally not possible. Since your client most obviously doesn't like graphical background I would recomend storing data as till now, but show it with your own report in more userfriendly way. For example:
    - as ALV Grid
    - in excel with use of OLE either as embedded in SAP or new window (check transaction OLE for example)
    - with use of webdynpro
    BR
    Marcin Cholewczuk

  • Looking for a way to pass parameter to external list from infopath

    Hey, i have a Sharepoint 2010 list for which I want to create Infopath form. I have an external content type and external list based on it.
    I want to prepopulate some fields in my Sharepoint list with data from external list. I tried to use external list as a secondary data source and query it for needed values. The issue I encounter is that my ECT has a finder with filter and I can't figure
    out how to pass a value to this filter within infopath.
    How can it be done with infopath? How can I pass the filter value to the external list using Infopath?

    Hi,
    According to your post, my understanding is that you wanted to pass parameter to external list from infopath.
    You need to query the external list from InfoPath using coding and CAML Query.
    Here is a similar thread for your reference:
    http://sharepoint.stackexchange.com/questions/33575/filtering-sharepoint-external-list-bcs-from-infopath
    Thanks,
    Linda Li
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • Pass lock to background job

    Hi,
    I'm looking for ideas.
    We have an inbound process for special messages transfered from XI system via asynchrounous call. Messages are identified by a GUID.
    The inbound process will save the messages in a database table and create background jobs for processing big messages while small messages are processed directly.
    To avoid any interference, we want to lock messages as long as they are processed. For this we have a lock object and the Enqueue/dequeue modules.
    Now my question is: How can I pass a lock to the background job (created by SUBMIT VIA JOB) and have it released there after processing is done. The Job will run in a new LUW.
    And then, if any error in background (or online) processing occurs, how to make sure all existing locks are released?
    Thanks for some good ideas on how to proceed.
    Regards,
    Clemens

    resolved - we won't do it. We'll create some kind of queue: A fully-buffered database table where we put the lock entries and remoce them when it's time to do so. This way we can integrate an activity monitor watching the objects being processed.
    Thanks for reading
    Clemens

  • Table name for background job with report, variant and step user id list.

    Hello All,
    I need to generate the list of scheduled backgroung job with the list of Report Name, Variant, Step User Id called. Please any one tell the SAP Table name from which I can get these data.
    Thanks in Advance,
    Amit

    Hi Rohit,
    Thanks for your reply. But from TBTCO, i can't find program/report name and variant. Just the list of background job i can see.
    Regards,
    Amit

  • Creating a Step for Background Job from within ABAP Program

    Step-1: I have a Report in ECC, which is scheduled as Background Job, which writes the file to the Application Server(UNIX)
    Step-2:  Trigger a Unix Command to ftp the file to other server.
    Both Step-1 & Step-2 can be done from SM36. 
    Another Scenario:
    Users can run the report in background from SE38 or using the transaction code for the report, In this case we want to call the external command.
    Instead of calling the External Command as below in the report, I want to create a Step from within the program when it is scheduled in background mode.
    CALL 'SYSTEM' ID 'COMMAND' FIELD lc_unixcom.    [ Here lc_unixcom has the External Command ].
    Any ideas??? Appreciate help.

    Hi,
    For submitting a report step, you may use either SUBMIT ... VIA JOB ... or JOB_SUBMIT function module.
    For external commands, this should be done only by calling JOB_SUBMIT function module.
    Sandra

  • Close Reports Background Engine from reports

    Hi,
    I have a report that calls another report via SRW.run_report. Qhen the other report is called, Reports Background Engine opens and stays open, even after closing the called report.
    How to programmatically close Reports Background Engine when closing the report. I have read on the forum some procedure to close it from "Forms", but not from report.
    Thank you,
    J

    you can not close the RBE from reports as it would require a report to be executed ... i guess you get the problem.
    the only way to close the RBE is from forms.
    thanks,
    ph.

  • Starting Background Job from program...

    Hello I am using following to create a background job.
      DATA: number TYPE tbtcjob-jobcount,
            name TYPE tbtcjob-jobname VALUE 'METZ: INVOICING FROM SHIPMENT',
            print_parameters TYPE pri_params.
      data vari  LIKE varid-variant.
      data shipm    LIKE vttk-tknum.
      data use  LIKE   btch2170-username.
      vari = '3350_1' .
      shipm = p_shipment.
      use = 'K5_BATCH'.
      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 Z5L_START_INVOICING with p_shipm = shipm
                                   with p_vari = vari
                                   with p_submit = 'X'
                                   USER use 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.
    I am using the addition USER but the job gets started with user who is log on or who is using this trasaction.
    It should start with user 'K5_BATCH' but it is not...........
    Please help........
    Edited by: Alvaro Tejada Galindo on Apr 7, 2008 1:00 PM

    I found the following info:
    Open Job Scheduling Without Dialog (Including COMMIT WORK)
    Use JOB_OPEN to create a background job.  The function module returns the unique ID number which, together with the job name, is required for identifying the job.
    Once you have "opened" a job, you can add job steps to it with JOB_SUBMIT and submit the job for processing with JOB_CLOSE.
    I think you will first have to use the JOB_SUBMIT  statement like mentioned above

  • Pass parameter to a job when job is selected in a jobset

    Is there any way to pass a parameter to a job when the job is selected in a jobset?
    I have a jobset with a job twice, and I want to show in a textbox a X value for first job and Y value to second job.

    You can pass information between the jobs; for details refer to:
    Defining and Using Job Sets Supporting Input and Output Forwarding in Job Sets
    Using Parameters and System Properties
    Using System Properties
    SystemProperty (Oracle Enterprise Scheduler Service API Reference)
    So depending on your requirements you could define job set step parameters, input / output forwarding or name value pairs on the ENVIRONMENT_VARIABLES system property.
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • Pass parameter with blank space for report ver 6

    Hi,
    I face a problem that i willing to pass the acno where it's value with blank space, for example ' 9' as parameter into my report, and assign it as v_acno. Inside the report query i add a where condition, acno >= :v_acno. When i run the report and pass acno without ' , it do not show any record. But when i run the report and pass acno with ' then able to show the records.
    for example the value i key in
    with ' = ' 9'
    without ' = 9
    So how i can solve it by pass the acno without ' but the record still able to show?
    thks
    Message was edited by:
    user569740
    Message was edited by:
    user569740

    Hi Nick,
    It occurs because an argument of the DTExec commands must be enclosed in quotation marks if it contains a space. From the dtexe (SSIS Tool): Syntax Rules section of the
    dtexec Utility (SSIS Tool) document, we can see:
    All options must start with a slash (/) or a minus sign (-). The options that are shown here start with a slash (/), but the minus sign (-) can be substituted.
    An argument must be enclosed in quotation marks if it contains a space. If the argument is not enclosed in quotation marks, the argument cannot contain white space.
    Doubled quotation marks within quoted strings represent escaped single quotation marks.
    Options and arguments are not case-sensitive, except for passwords.
    So, you need to make the value of the variable @QUERY_STRING within double quotes in the value of the variable @Cmd or remove the space within the @QUERY_STRING value.
    Regards,
    Mike Yin
    TechNet Community Support

  • Unable to pass parameter to EBS Form from external system (OBIEE)

    I set up the OBIEE to EBS Navigation as per a metalink note to the form PA_PAXTRAPE_SINGLE_PROJECT. I tried to pass a PROJECT_ID parameter. The form opens up but I do not see any indication of the parameter being passed through.
    In general, when you pass a parameter to a EBS form from an external system, is it suppose to open the FORM with that specific value? In this case should it open up the Project for the PROJECT_NUMBER that I passed through?
    Any way for me to diagnose the issue?

    Hi,
    Rather than giving the name of the Block and Field name there create a parameter in the form itself and pass value to that parameter. You can use this values using :PARAMETER.<field_name>.
    Regards,
    Viral

  • Passing Parameter to Stored Procedure from Form

    Hello All,
    I have been stuck while passing a form parameter to a database Procedure.In the query data source arguments I have provided the parameter Value as :parameter.parameter_1...Is it right...
    Can somebody throw some more light on this...
    Regards,
    Kaps

    You can pass the parameters from Forms through the Query Data Source Arguments of this block.
    There are a little example on http://www.Friedhold-Matz.de/appl_plan.htm.
    I used in block B the Query Data Source Arguments property to fill the
    procedure input arguments with the :PARAMTER.P_name of this Form.
    Hope it helps
    Friedhold

Maybe you are looking for

  • Problem in getting opening balance for multiple GL Account

    Hi, I am working on a  Trail Balance Report in which i am trying to fetch the data for the opening balance for multiple GL Accounts but it is not coming accurate.. Here is the link to the code which i am using currently right now:- http://docs.google

  • Changing location of Iphoto library

    I am looking to change my Iphoto library to an external hard drive, as my 250GB internal drive is just not large enough, especially as I am now using itunes to watch movies and TV shows. Is this a simple operation? The help menu has instruction on ch

  • Moving hard drive with all of elements 11 to a new computer

    I've already installed the hard drive, and set up windows 8.1 on a separate 1 gig drive.  What's the easiest way to get Elements set up with all my tags etc.  Can i just install Elements, and point it to the hard drive i installed with all my photos,

  • Current date and time

    What is the simpliest call in Visual C++ with Measurement Studio to extract the current date and time? I am trying to have such info as 1315032804 for March 28th, 2004 at 1:15 pm. Thanks in advance for your advice.

  • Cross-refs don't convert when using DropDownCaption/DropDownBody

    Using TCS 2.5 (RoboHelp 8.0.2.208 / Frame 9). I am current with all updates for this version. I'm still in the process of setting up our templates for converting our books from Frame to RoboHelp using the "linking" ability in RH. I have run into a pr