Code for Job  submit

Hi ,
I am trying to write code for open job , submit & close job.
I need to send 4 fields as parameters from program1 to the BGprogram.
Anyone please tell me the syntax for submit.I cun't find any syntax for this.
Thanks in advance,

..Create new job
    CONCATENATE lc_job_prefix l_pr_count
        INTO l_job_name SEPARATED BY '_'
    CALL FUNCTION 'JOB_OPEN'
      EXPORTING
        jobname                = l_job_name
      IMPORTING
        jobcount               = l_job_count
      EXCEPTIONS
        cant_create_job        = 1
        invalid_job_data       = 2
        jobname_missing        = 3
        OTHERS                 = 4
    IF sy-subrc <> 0.
....Error creating job
      IF NOT sy-msgid IS INITIAL.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        MESSAGE s000(zz) WITH
            'Failed to create job'(021)
            l_job_name
      ENDIF.
    ELSE.
....Submit job {
      MESSAGE s000(zz) WITH
          'Creating job'(022) l_job_name l_job_count '...'
          INTO l_msgtx
      PERFORM show_progress USING l_msgtx 0 1.
      IF v_sort = 'X'.
        SUBMIT (sy-cprog)
              WITH s_pernr BETWEEN l_pernr_min AND l_pernr_max
             WITH s_g_ctrl IN r_cs_ctrl
              WITH s_g_land IN r_cs_land
              WITH s_g_gs IN r_cs_gs
             VIA JOB l_job_name NUMBER l_job_count
              TO SAP-SPOOL SPOOL PARAMETERS   l_print_parm
                           ARCHIVE PARAMETERS l_archive
                           WITHOUT SPOOL DYNPRO
              AND RETURN
      ELSE.
        SUBMIT (sy-cprog)
              WITH s_pernr BETWEEN l_pernr_min AND l_pernr_max
              WITH s_g_lub IN r_cs_lub
              WITH s_g_pro IN r_cs_pro
              WITH s_g_pub IN r_cs_pub
              VIA JOB l_job_name NUMBER l_job_count
              TO SAP-SPOOL SPOOL PARAMETERS   l_print_parm
                         ARCHIVE PARAMETERS l_archive
                         WITHOUT SPOOL DYNPRO
              AND RETURN
      ENDIF.
....Start immediately
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount                          = l_job_count
          jobname                           = l_job_name
          strtimmed                         = true
        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.
        IF NOT sy-msgid IS INITIAL.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ELSE.
          MESSAGE s000(zz) WITH
              'Error releasing job'(023)
              l_job_name
              l_job_count
        ENDIF.
      ELSE.
        MESSAGE s000(zz) WITH
            'Job released'(024) l_job_name l_job_count
            INTO l_msgtx
        PERFORM show_progress USING l_msgtx 0 1.
      ENDIF.
....} Submit job
    ENDIF.
..Increment process count
    ADD 1 TO l_pr_count.
  ENDDO.
  MESSAGE s000(zz) WITH l_pr_count 'job(s) created.'(025).

Similar Messages

  • Code to write syntax for JOB submit ( Please answer ASAP)

    Hi,
    I need sytax to submit a job
    Right now I am using this code to send 4 parameters.
    I need to send these 4 in a structure.
    submit Ztestjob USER sy-uname
    via job p_jobnm
    number p_jobcount
    with afko-rsnum eq afko-rsnum
    with aufnr_d eq aufnr_d
    with sernr_d eq sernr_d
    with p_lmnga eq p_lmnga
    AND RETURN.
    So I have to pass a structure of values into the BGprogram through a submit and do a couple of loops in the BGPROGRAM.
    I need the syntax for submit .
    I also need to know how to catch the structure with values in the BGPROGRAM.
    Anyone please answer ASAP
    Message was edited by:
            ramana peddu
    Message was edited by:
            ramana peddu

    Hi,
    <u>SUBMIT</u>
    Calls an executable program of type 1.
    Syntax
    SUBMIT <rep> [AND RETURN] [VIA SELECTION-SCREEN]
                              [USING SELECTION-SET <var>]
                              [WITH <sel> <criterion>]
                              [WITH FREE SELECTIONS <freesel>]
                              [WITH SELECTION-TABLE <rspar>]
                              [LINE-SIZE <width>]
                              [LINE-COUNT <length>].
    Calls the program <rep>. If you omit the AND RETURN addition, the current program is terminated. Otherwise, the data from the current program is retained, and processing returns to the calling program when <rep> has finished running. The other additions control the selection screen and set attributes of the default list in the called program.
    Regards,
    Bhaskar

  • Pass structure of values for Job submit

    Hi,
    I need sytax to submit a job
    Right now I am using this code to send 4 parameters.
    I need to send these 4 in a structure.
    <b>submit Ztestjob USER sy-uname
          via job p_jobnm
          number p_jobcount
          with afko-rsnum eq afko-rsnum
          with aufnr_d eq aufnr_d
          with sernr_d eq sernr_d
          with  p_lmnga eq  p_lmnga
          AND RETURN.</b>
    So I have to pass a structure of values into the BGprogram through a submit and do a couple of loops in the BGPROGRAM.
    I need the syntax for submit .
    I also need to know how to catch the structure with values in the BGPROGRAM.
    Anyone please answer ASAP
    Message was edited by:
            ramana peddu
    Message was edited by:
            ramana peddu
    Message was edited by:
            ramana peddu
    Message was edited by:
            ramana peddu

    Hi,
    If want to pass an internal table...
    Then create a dummy select-options...
    And then pass the values in the select-options..
    Then in the submitted program you can use the select-options internal table..
    Thanks,
    Naren

  • E-Recruitment -- Reference Code for Job Posting

    When I create the Job Posting, SAP E-Rec create a system generated reference code. Can this code be changed / customizied?.

    Hello Vishal,
    there is a BAdI which you can use to implement your logic for generation a reference code. The name of this BAdI is HRRCF00_GET_EXT_CODE. Just create an implementation according to your needs and activate it.
    Kind Regards
    Roman

  • How to find out what are the interfaces used for Job and Job Codes

    HI All,
    I just wanted to know how do we find out what are the interfaces used for Job and Job codes .
    Thanks In Advance
    Sunny

    Hi,
    Here is an idea for your request.
    Basically you can create a simple query on multiprovider 0TCT_MC01.
    Filter: you can use a variable for restriction of time ( calday, or calmonth) since you should be interested for a time period.
    Choose following characters into your objects:
    InfoProvider ( 0TCTIFPROV )  - you can create a variable for choosing infoprovider before query runs.
    *Tp.[Type of BI Application Object] 0TCTBISOTYP  = filter this with 'QUERY' or whatever your need is.
    *BI Application Object 0TCTBISBOBJ,  ( this will give you the name of the queries)
    In key figures choose,  Count for BI Appl. (0TCTWTCOUNT).
    (number for query run)
    Create a condition , for top 20.
    Hope this helps.
    Derya

  • Transaction code for checking the capacity of  a job

    Hi,
      Can anybody tell me if there is a transaction code for viewing the capacity of Job.
    Thanks and regards,
    Avinash.S

    Hi Avinash,
    I am not geeting what you want normally CM01 for w/c vise Load you can use.
    Pls elaborate yr problem a little bit.
    Umesh

  • Record the NOC codes at Job level for a particular country

    Hi,
    How do we record the NOC codes at job level for a particular country say for example canada?Which infotype the NOC codes exist and can be added to employee record?Is it through statistics infotype?
    I could find that table T5K13 can hold these codes at job level, but unable to find a way to create  a relationship between a job and the NOC codes.Please help if there is a way in our current SAP environment to record those codes on the job and if so how?
    Also, if the initial configuration has not been done  to add these codes at the job level what would be required to allow  to maintain this.
    Please help!!!
    Thanks in advance.
    Rakesh

    hi
    in the view V_T5K13 , double click on the job code , there will be feild to add the noc code
    Regards
    sameer.

  • Making Page look same in All Pixels & Writing code for Submit Button.

    Hello All,
    How to make the page look the same in all computers even though the pixels are different?
    Please help me in this regard.
    More Over if I want write the code for Submit button where the code should be written.
    Whether the code is different from normal ABAP coding?
    Warm Regards,
    SampathKumar G.

    Hi Sampath,
    You can trigger mandatory field checks in WDA as in R/3. For this you need to make the "state" property of your input field to "required".
    In addition to this you need to call the static method check_mandatory_attr_on_view of class cl_wd_dynamic_tool. This would then automatically verify if all the mandatory fields have been filled or not. It would then populate the error messages into an internal table and display them in the view. Also the mandatory fields which haven't been filled would be highlighted with a red border. You need to put the below coding into the action up on which you want to trigger the data chesks.
    data: lt_msg TYPE cl_wd_dynamic_tool=>t_check_result_message_tab,
              lo_view_controller TYPE REF TO if_wd_view_controller,
              lo_message_manager type ref to if_wd_message_manager.
      lo_view_controller ?= wd_this->wd_get_api( ).
      lo_message_manager = lo_view_controller->get_message_manager( ).
      cl_wd_dynamic_tool=>check_mandatory_attr_on_view(
        EXPORTING
          view_controller = lo_view_controller
          display_messages = abap_true
        IMPORTING
          messages = lt_msg ).
    Regards,
    Uday

  • I am applying for jobs online. I have to submit my resume in a drop box but can't do this from my ipad. Does anyone have a solution?

    I am applying for jobs online. I have to submit my resume in a drop box on many websites. I can do this from a laptop but haven't found out how to do this from my ipad. I have tried using drop box but this didn't work either. Ideas are welcome

    It helps to know more about the sites that you are interacting with to supply a resume.  How is the site asking you to provide a resume?  If it asks you to upload a file, then that is the problem.  On an iOS device, you can't browse the file system to choose a file to upload - iOS is sandboxed, one app can't "look" around for files it doesn't already contain to access it.  In this case, you'll have to use a computer.

  • Error in transport, ended with return code:  12,  job RDDEXECL cancelled

    Hi Friends,
    When I am trying to import a request in a BW preproduction system, it is giving below error: However, the transport is imoprted successfully in Quality.
    ===================================
    Program terminated (job: RDDEXECL, no.: 09222300)
       See job log
    Execution of programs after import (XPRA)
    End date and time : 20080509092238
    Ended with return code:  ===> 12 <===
    Job log:
    Date        Time      Message
    09.05.2008  09:22:23  Job started
    09.05.2008  09:22:23  Step 001 started (program RDDEXECL, variant , user ID DDIC)
    09.05.2008  09:22:23  All DB buffers of application server unix0001 were synchronized
    09.05.2008  09:22:25  ABAP/4 processor: UNCAUGHT_EXCEPTION
    09.05.2008  09:22:25  Job cancelled
    =======================================
    Kindly advice.
    Thanks & regards,
    Kunal Patel.

    Hello,
    I ran a search for this error and found the following notes:
    SAP Note 966234 - 70SP10: DTP transport and content error
    SAP Note - 1074388 SAPBINews NetWeaver 7.0 BI Support Package 16
    Check if they are relevant for your system.
    Regards,
    Siddhesh

  • What are the different transaction codes for PGI?

    1. What are the different transaction codes for PGI?
    2. What transaction code should I use for a Group Delivery?
    Regards,
    Nazim.

    Hi
    Go to VL02 and you can do the PGI.
    Regfarding Group Delivery, you can create a batch job and link the program to the batch job so that the job picks up all the orders and create deliveries.
    Creating a Background Job Using the Job Wizard
    •From the main menu select System>Services>Jobs>Define Job (transaction SM36).
    •Press the Job Wizard button and step through the screens as follows:
    •1:Continue
    •2: Enter a name for your job. Continue.
    •3: Continue with ABAP Program Step selected
    •4: Enter the ABAP Program Name and variant name.
    Press the Print Parameters button, specify the required printer and set the "Time of Print" to "Send to Print Spooler for now".
    Press green tick
    Continue
    •5: If more reports need to be added to the job tick the checkbox, press continue and repeat screens 3 and 4.
    •6: Select how the job is to scheduled (eg Date and Time)
    •7: Enter the required scheduling information ( eg Date and Time) and if required tick "Periodic Jobs"
    •8: If "Periodic Job" was selected select the frequency (eg Monthly)
    •9: Check the job details and press Complete
    Hope the above info helps.
    Reward if useful
    Regards

  • HT4009 How long does it take for apple to return with the needed code for in app purchases.  We have a developer working through elance that states he submitted a finalized version last friday to apple and is still waiting to get the code back from Apple?

    We are being told by our elance developer that he is just waiting on apple to return the code for in app purchases with our app.  he says he had to submit a complete version before they would give it to him and that he did that last friday.  Needless to say i don;t beleive him.  Can anyone validate for me the process of getting the code installed into our app and how long it should really take.

    I'd say an average of one week, depending on backlog. Expect two if you are outside the US.
    The outage has caused some lingering effects that seem to be delaying things for some, however.
    Patience is key in all things when it comes to being a developer

  • Creation of spool for job created by calling FM in background task

    Hi Gurus,
    1.Wanted to confirm if it is possible to attach spool to the job that has been created by calling a function module in background task.
    Currently I have created one RFC enabled FM and called it in background task. It runs fine, and the job is created which can be seen in SM37. But it does not contain the spool even if the RFC FM contains the code for list ALV.
    2. Also is it possible to control the name of the job created by calling the RFC FM in background task?
    Code for calling the FM is given below(ZK_XX is th RFC FM):
    CALL FUNCTION 'ZK_XX' IN BACKGROUND TASK
    CALL FUNCTION 'START_OF_BACKGROUNDTASK'
    EXPORTING
       startdate       = sy-datum
       starttime       = sy-uzeit
      NOSEND          = ' '
    COMMIT WORK.
    Thanks a lot for your help!!
    Warm Regards,
    Raveesh

    Thanks for replying.
    I need to do the processing in background. Hence using 'IN BACKGROUND TASK' addition.
    Please let me knowif you have some idea.
    Thanks & Warm Regards,
    Raveesh

  • Add attachment Button for Job application

    Hi all
    I have done a bit of research on this but have found no answers, maybe you can help.
    I want to make a job application form in indesign as an interactive PDF. I know the submit button will send the form information to an e-mail address which is half of what I am after, however I am also looking for an "attach resume" type thing. After posting in the Indesign forum they suggested I come here.
    I know there is forms central which is ok, however I am after a bit more flexibility with the layout and input.
    In summary, an option to be able to attach a file to an interactive PDF. I have seen the comment/mark up option, but I feel this would be too complicated for job applicants to get.
    Thanks

    Assuming the file is going to be used in Reader, the Attach a File commenting tool is the only option.
    Of course, you can always ask the users to attach the file to the email, instead of to the PDF...

  • I want to add transaction code for one user.

    Hi abapers,
    My requirement is;
    I want to add transaction code for one user.
    EX: zsdf to kanne.
    Can any body tell me the procedure step by step.
    With regards,

    If you want to give authorisation to an user for a particular tcode, you need to first include the transaction code in an authorisation Role and then assign the authorisation role to the user id in the transaction code SUIM.
    A Basis guy will be able to help you to do this and anyway this is not the job of an ABAPer.
    Hope this helps you.
    Reward if this helps you

Maybe you are looking for

  • Problem with Stock A64 HSF and MSI K8N FSR

    Hey guys I was wonderinf if anyone could help me with this little problem. My stock A64 2800+ (newcastle) hsf no longer spins higher than 3500rpm anymore. I first bought my system about 3 months ago and paired it with the msi k8n fsr board. Everythin

  • Coldfusion - Simultaneous Requests

    Hi, BACKGROUND: I have developed a "Flash Remoting" application using Coldfusion and SQL 2000 and am almost ready to go live. The remoting application uses many queries/responses to/from the SQL 2000 database via Coldfusion. The Flash Remoting applic

  • Table to XML via SQL ?

    Hi everybody, I'm stucked on this problem since 2 days... I want to generate pseudo-XML data from a single table which (simplified) definition is: Tag         Key     Parent    Data Root        1       NULL      ABC Node        2       1         DEF

  • Authroization issue after the Upgrade for Multiprovider

    Hello Experts, After the upgrade has carried out in my Quality system, I'm unable to execute a query because of the authorization issue with Multiprovider. But earlier the same Authorization was assigned to the ID. The Role in Q and the Role in P is

  • Tax code V1 does not exist for jurisdiction code NZ001

    Dear Friends, When creating a PO thru ME23N, I get this message "Tax code V1 does not exist for jurisdiction code NZ001". On cheking, I find this has been maintained with valiidity from 01/01/2001 to 31/12/9999. Also when I create a Vendor invoice in