SUBMIT a program

Hi All,
We have a program2 and we want to call another program1.
  - the program1 contains a screen with two input fields ( pa1 and pa2).
  - the program2 contains tratement and recuper a values of two variables ( var1 and var2).
We want when we call the program1 automatically the pa1 take var1 as value and pa2 take var2, without displaying screen of the program1.
We have implimented this code, but it doesn't work:
       SUBMIT zprogram1 USING SELECTION-SCREEN 200
                       with pa1 = var1
                       with pa2 = var2.
thank you in advance.
Mll Mat.

Hi,
please check this and try to do it as per
SUBMIT report1 USING SELECTION-SCREEN '1100'
WITH SELECTION-TABLE rspar_tab
WITH selcrit2 BETWEEN 'H' AND 'K'
WITH selcrit2 IN range_tab
AND RETURN.
Use Get and Set paramenter ID for the same
call transaction and skip will be for transacation not for reports
Edited by: sabyasachi kar on Dec 18, 2008 4:35 PM

Similar Messages

  • How to submit a Program in Background without wait ?

    hi experts,
        I have one requirement in which i want to call another executable program from one program by passing some parameters to the calling program from called program. <b>I dont want to wait till the executatio of the calling program gets over.</b>i just want to submit the program & <b>wants to continue with my calling program</b>.
    i am not bothered with the results of the called program.
         How to do this...
    if possible pl. send me the code. especially i am using some parameters & internal tables to be passed to the called program from calling program.
    Regards,
    Umesh

    Hi Umesh,
    You can schedule a job programatically .. Please find below the steps..
    This will schedule a background job (and this you can view in Sm37) and returns control to the calling program.
      DATA: jobnumber TYPE tbtcjob-jobcount,
                jobname   TYPE tbtcjob-jobname.
    Set the job name
    jobname = 'xxx'.
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                jobname  = jobname
           IMPORTING
                jobcount = jobnumber
           EXCEPTIONS
                OTHERS   = 0.
      SUBMIT reportname USER sy-uname
                                    VIA JOB jobname
                                   NUMBER jobnumber
                                   WITH  param1 =   "fill the parms/sel fields with new values
                                   WITH  Param2=     "fill the parameters/sel fields
         AND RETURN.
       CALL FUNCTION 'JOB_CLOSE'
           EXPORTING
                jobcount  = jobnumber
                jobname   =jobname
                strtimmed = 'X'
           EXCEPTIONS
               OTHERS    = 0.
    Thank You.
    Regards,
    Uma

  • Submit a program to execute in background.

    Hi Everyone,
    Is there a way to submit a program to execute in background. So that the runtine is fast. Any help on this will be great.
    Thanks,
    Prabhu.

    Hi,
    Check this code -
    *Submit report as job(i.e. in background) 
    data: jobname like tbtcjob-jobname value
                                 ' TRANSFER TRANSLATION'.
    data: jobcount like tbtcjob-jobcount,
          host like msxxlist-host.
    data: begin of starttime.
            include structure tbtcstrt.
    data: end of starttime.
    data: starttimeimmediate like btch0000-char1.
    Job open
      call function 'JOB_OPEN'
           exporting
                delanfrep        = ' '
                jobgroup         = ' '
                jobname          = jobname
                sdlstrtdt        = sy-datum
                sdlstrttm        = sy-uzeit
           importing
                jobcount         = jobcount
           exceptions
                cant_create_job  = 01
                invalid_job_data = 02
                jobname_missing  = 03.
      if sy-subrc ne 0.
                                           "error processing
      endif.
    Insert process into job
    SUBMIT zreport and return
                    with p_param1 = 'value'
                    with p_param2 = 'value'
                    user sy-uname
                    via job jobname
                    number jobcount.
      if sy-subrc > 0.
                                           "error processing
      endif.
    Close job
      starttime-sdlstrtdt = sy-datum + 1.
      starttime-sdlstrttm = '220000'.
      call function 'JOB_CLOSE'
           exporting
                event_id             = starttime-eventid
                event_param          = starttime-eventparm
                event_periodic       = starttime-periodic
                jobcount             = jobcount
                jobname              = jobname
                laststrtdt           = starttime-laststrtdt
                laststrttm           = starttime-laststrttm
                prddays              = 1
                prdhours             = 0
                prdmins              = 0
                prdmonths            = 0
                prdweeks             = 0
                sdlstrtdt            = starttime-sdlstrtdt
                sdlstrttm            = starttime-sdlstrttm
                strtimmed            = starttimeimmediate
                targetsystem         = host
           exceptions
                cant_start_immediate = 01
                invalid_startdate    = 02
                jobname_missing      = 03
                job_close_failed     = 04
                job_nosteps          = 05
                job_notex            = 06
                lock_failed          = 07
                others               = 99.
      if sy-subrc eq 0.
                                           "error processing
      endif.
    URL: http://www.sapdevelopment.co.uk/reporting/rep_submit.htm
    Hope this code snippet helps you!

  • How to submit a program after completion of a background job

    Hi Experts,
    I have a small issue. In my report program i am calling one transaction using call transaction it will trigger a background job. After completion of this background job i need to submit another program, Because the background job updating few values, using this value only the second program functionality will works.
    Currently when i execute my report its calling 1st program and triggering the background job. Once the job started again the program triggering the next program. Here after competion of the background job only this program should submit next program. Anyone kindly suggest some clue.
        CALL TRANSACTION 'ZSAPRCK60' USING    zbdcdata
                                OPTIONS  FROM g_s_options
                                MESSAGES INTO msg_tab.
    SUBMIT SAPRCK10    VIA SELECTION-SCREEN
                        WITH kalaid = p-kalaid
                        WITH kaladat = sy-datum
                        WITH PARALLEL = 'X'
                        WITH SERVNUM = '10'
                        WITH backgr = 'X'
                        AND RETURN.
    Mohana

    Hi,
    There is one function module there which gives you the job status .. if the job is finished then the value will be 'F'.I don't exactly remember the FM but then you can search with BDLSTATUS or BDSTATUS in SE37..
    do.
    call fm BD****STATUS
    IF STATUS (IMPORT PARAMTER) eq 'F'.
    exit.
    endif.
    enddo.
    Regards,
    Nagaraj

  • How to pass the value to "Assignment" when submit the program RFITEMGL?

    Hello friends,
    I want to submit program RFITEMGL  (t-code FBL3N) with some screen fields, some fields are OK to fill such as u201COpen at key dateu201D, u201CG/L accountu201D and u201CCompany codeu201D。 But for the field "Assignment" (It will appear after cilck Dynamic Selection), I don't know how to pass value to it.
    Could you help me about how to pass the value to "Assignment" when submit the program RFITEMGL  (t-code FBL3N) ?
    Thanks a lot!

    Hi,
    Well you can create a small BDC.
    Regards,
    Harsh Bansal

  • Need to submit a program with a variant

    Hi all,
    This is my code i need to submit RSIRCCON program to this program with a variant . I have created a variant with a name "VARIANT1" . After excuting this program am getting an error message "VARIANT VARIANT1 does not exist " .
    Can any one help me to resolve this issue .
      Z_RSIRCCON_2                                                *
    REPORT  Z_RSIRCCON_2  NO STANDARD PAGE HEADING
                                       LINE-SIZE  255
    TABLES                                                              *
                                       LINE-COUNT 65.
    TABLES: somlreci1.
    *Global Variables                                                      *
    DATA: repository(255) TYPE C,
          L_PROGRAMM LIKE RS38M-PROGRAMM,
          variant1 like RS38M-SELSET.
    l_programm = 'Z_RSIRCCON_2'.
    variant1   = 'VARIANT1'.
    SELECTION SCREEN                                                    *
    SELECTION-SCREEN BEGIN OF BLOCK b1  WITH FRAME TITLE text-001.
    SELECT-OPTIONS: p_repos FOR repository.
    PARAMETER:p_single AS CHECKBOX USER-COMMAND run,
              p_multi AS CHECKBOX USER-COMMAND run,
              p_run AS CHECKBOX USER-COMMAND run.
    SELECTION-SCREEN END OF BLOCK  b1.
    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-043.
    PARAMETER :p_esub TYPE repository.
    SELECT-OPTIONS:p_email  FOR somlreci1-receiver MODIF ID sc6 .
    SELECTION-SCREEN END OF BLOCK  a1.
    START-OF-SELECTION                                                  *
    CALL FUNCTION 'RS_PROGRAM_POPUP_VARIANT'
      EXPORTING
        progname               = l_programm
        VARIANT                = VARIANT1
      DEBG                   = ' '
      MESSAGE_ON_POPUP       = ' '
    IMPORTING
      OK_CODE                =
      NEW_VARIANT            =
    EXCEPTIONS
      NO_VARIANT             = 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.
    submit RSIRCCON VIA SELECTION-SCREEN using SELECTION-SET 'VARIANT1' AND RETURN.
    null

    Hi,
    You cannot user the variant of 'Program 1' to call the 'Program 2'.
    When you write the statement
    SUBMIT RSIRCCON VIA SELECTION-SCREEN USING SELECTION-SET 'VARIANT1' AND RETURN.
    it means that you are trying to submit the program RSIRCCON with the selection screen variant 'VARIANT1'. SAP expect this variant to be of program RSIRCCON not your calling 'Z' program. Since program RSIRCCON does not have any selection-screen, you can not create a variant and thus you cannot submit it with selection-set variant.
    Please refer to the documentation for command 'SUBMIT' for more information.
    http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm
    Regards,
    RS

  • SET/GET not working when I submit one program into Main program.

    Hi All,
    I am using set/get parameter as follows but somewht it is not working.. Please help.
      IF ( uf_instn = 'ACEFR' and uf_messg <> 'BSP' ).
        set parameter id 'AJN' field lf_jobname.
        set parameter id 'AJC' field gf_jobcount.
      ENDIF.
      SUBMIT   zace_interface
        USER   sy-uname
        VIA    JOB lf_jobname
        NUMBER gf_jobcount
        WITH   SELECTION-TABLE lt_seltab
      TO     SAP-SPOOL
        AND    RETURN.
    in the zace_interface program I have another submit program
        submit zrsbdcsub and return
                        user 'ZACE_INTERFACE'
                        with mappe eq lf_group
                        with von eq sy-datum
                        with bis eq sy-datum
                        with fehler eq space
                        with logall eq co_true.
    ad inside this submit im using
                  get parameter id 'AJN' field v_jobname.
                  get parameter id 'AJC' field v_jobcount.
    but i am not able to get the values into v_jobname & v_jobcount.
    Can you please help me in this regard. how i will get the values in v_jobname & v_jobcount.
    Thanking you in advance
    Regards,
    Prashant

    Hi..,
    any way u r executing the programs in the same session but between diff. internal sessions u can use the IMPORT and EXPORT options ( ABAP MEMORY )
    or do one thing...
    <b>In the first program Copy these fields into a file in the <b>application server</b>,, and in the Second submit program u retrieve these variable values from the Application server file into these two variables!!</b>
    just now i have solved one of the issues of this Kind by using an Application server file.
    In the first program..
    IF ( uf_instn = 'ACEFR' and uf_messg <> 'BSP' ).
    OPEN dataset 'FILE' for output in text mode encoding default.
    transfer lf_jobname to 'FILE'.
    transfer gf_jobcount to 'FILE'.
    CLOSE dataset 'FILE'.
    ENDIF.
    and instead of using the GET parameters in the second program ..
    OPEN dataset 'FILE' for input in text mode encoding default.
    read dataset 'FILE' into v_jobname.
    read dataset 'FILE' into v_jobcount.
    CLOSE dataset 'FILE'.
    This has solved my problem !!!!! hope this helps u also!!
    regards,
    sai ramesh

  • Submit Z program in lsmw

    Hi all,
    I need to run a Z program right after a LSMW.
    I've tried to insert a "submit ZPROG" in the LSMW "end_of_transaction" step but it doesn't work.
    Does somebody has an idea if it's possible ?
    Or, is there any workaround ?
    Thanks in advance for your help
    Br,
    Pierre

    Hi Thomas,
    The aim of my LSMW is to create a "HR function".
    One of the dynpro reached uses a BADI and more specificaly the "IN UPDATE" method.
    My problem is that, with LSMW, this "IN UPDATE" method is only run at the end of the LSMW and so, the data are missing.
    So I was thinking of exporting data to memory in the "AFTER INPUT" method and then, import and treat everything in my program.
    But you're right, my program should be called in the "end of processing". But I'm not sure that will be enough.
    Br,
    Pierre

  • Submit a program with LDB

    Hi,
    My Issue is when I execute a program (ZRHECM_PRINT_CRS Copy of  RHECM_PRINT_CRS) directily It is generating the output for me in the form of xstring, But when I submit it with same parameter inside a function module It is not going to (get) statement.
    This program is using pnpce(LDB)
    Is there a problem in submiting a program Using LDB?
    Here is what  I Submit .What should be done ?
    SUBMIT  zrhecm_print_crs  WITH pnppernr-low    = pernr
                                WITH PNPTIMED        = PNPTIMED
                                WITH p_carea         = p_carea
                                WITH p_ccatg         = p_ccatg
                                WITH p_cplan         = p_cplan
                                WITH p_crevi         = p_crevi
                                WITH pnpbegda        = begda
                                WITH pnpendda        = endda
                                WITH pnpstat2-low    = stat2
                                WITH pnpbtrtl-low    = btrtl
                                WITH pnpwerks-low    = werks
                                WITH pnppersg-low    = persg
                                WITH pnppersk-low    = persk
                                AND RETURN.

    You don't need two jobs, you can have 1 job with two steps,  each step would call the progam with the different variant.
    If you want to write a program which submits the program twice with two different variants, you can use the SUBMIT statement.  Here VARIANT1 is the name of a variant.
    SUBMIT ZREPORT01
           USING SELECTION-SET 'VARIANT1'
           AND RETURN.
    Regards,
    Rich Heilman

  • Submit dynamic program in ABAP

    Hi,
    I have to take the name of the program from the user in parameter on the selection screen and then call it. for this purpose i have used SUMBIT stmt as follows:
    parameters : p_pname(15),        "program name
             p_var(15).              " name of the varaint
    start-of-selection.
    SUBMIT p_pname with SELECTION-SET eq p_var.
    But the above code gives a dump stating the program p_pname doesn't exist.
    Kindly tell me how should this be done?
    Regards,
    Mansi.
    Edited by: SAP USER on Jul 10, 2008 10:09 AM

    Hi,
    Refer below code
        SUBMIT zk_ra_enhancement "TO SAP-SPOOL
               "IMMEDIATELY 'X'
               "WITHOUT SPOOL DYNPRO
               USING SELECTION-SCREEN 1000
               WITH cn_pspnr CP st_wbs-low
               WITH koagr = c_cost_ele_grp
               WITH r_budat BETWEEN g_first_date_in_period AND g_last_date_in_period
               AND RETURN.
    Regards,
    Prashant

  • Submit a program but I donu00B4t want to see the slection screen of this progra

    Hi expert.
      I have a problem. I am calling a program B from another program A using a SUBMIT statment. I am passing the parameters of the selection screen of the program B with the instruction VIA SELECTION SCREEN. The problem is that the program B shows a informatin message anf the selection screen appears; and i don´t weant this, I don´want that the selection screen apeear. Spme body can say me how can I make this??
       Thanks

    Hello,
    If you use VIA SELECTION-SCREEN the screen will be showed, try using USING SELECTION-SCREEN.
    *... VIA SELECTION-SCREEN *
    Effect
    If this addition is specified, the selection screen is displayed on the screen. Otherwise, background selection screen processing takes place. In background selection screen processing, the selection screen events are triggered without the selection screen being displayed
    *... USING SELECTION-SCREEN dynnr *
    Effect
    This addition specifies which selection screen is called. dynnr is a data object that must contain the screen number of a selection screen defined in the called program when the SUBMIT statement is called.
    If the addition USING SELECTION-SCREEN is omitted or the screen number 1000 is entered, the standard selection screen is called. If no standard selection screen is defined in the called program, no selection screen is called.
    If a screen number that is not 1000 is entered in the addition USING SELECTION-SCREEN, the corresponding independent selection screen is called. If no selection screen with this screen number is defined in the called program, this leads to an untreatable exception.
    Example:
    The program report1 has a stand-alone selection screen with the screen number 1100. In the program report2, an internal table with row type RSPARAMS and a ranges table are filled for this selection screen. These are transferred at SUBMIT together with a single condition.
    Program accessed
    REPORT report1.
    DATA text TYPE c LENGTH 10.
    SELECTION-SCREEN BEGIN OF SCREEN 1100.
      SELECT-OPTIONS: selcrit1 FOR text,
                      selcrit2 FOR text.
    SELECTION-SCREEN END OF SCREEN 1100.
    Calling program
    REPORT report2.
    DATA: text       TYPE c LENGTH 10,
          rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab,
          range_tab  LIKE RANGE OF text,
          range_line LIKE LINE OF range_tab.
    rspar_line-selname = 'SELCRIT1'.
    rspar_line-kind    = 'S'.
    rspar_line-sign    = 'I'.
    rspar_line-option  = 'EQ'.
    rspar_line-low     = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'K'.
    APPEND range_line TO range_tab.
    SUBMIT report1 USING SELECTION-SCREEN '1100'
                   WITH SELECTION-TABLE rspar_tab
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    Regards.

  • Submit a program and skip output or dont show the output (alv list)

    hi,
    is it possible to use the submit command and skip output or don't show the output (alv list) ?
    Regrads
    ertas

    Hi all,
    I get the message
    REPORT  ZTEST.
    DATA: jtab TYPE TABLE OF sbook,
          wa_jtab LIKE LINE OF jtab,
          jtab2 TYPE z_incident_li OCCURS 0 WITH HEADER LINE.
    submit Z_INCIDENT_LIST EXPORTING LIST TO MEMORY AND RETURN.
    IMPORT lt_incident_res TO  jtab2 FROM MEMORY ID 'table'.
    LOOP AT jtab2 .
      WRITE / jtab2-RECN.
    ENDLOOP.
    Runtime Errors         RAISE_EXCEPTION
    Date and Time          12.06.2008 17:54:00
    Short text
         Exception condition "CNTL_ERROR" raised.
    What happened?
         The current ABAP/4 program encountered an unexpected
         situation.
    Error analysis
         A RAISE statement in the program "CL_GUI_CONTROL================CP" rais
          exception
         condition "CNTL_ERROR".
         Since the exception was not intercepted by a superior
         program, processing was terminated.
         Short description of exception condition:
         For detailed documentation of the exception condition, use
         Transaction SE37 (Function Library). You can take the called
         function module from the display of active calls.

  • Submit to program RKO7KO8G

    Hi ,
    Iam sumitting the data from a program to sap standatd program RKO7KO8G
            SUBMIT rko7ko8g USING SELECTION-SCREEN '1000'
            WITH SELECTION-TABLE t_rsparams
           WITH KOKRS EQ 'A001'
            WITH variant EQ 'TEST1'
             WITH PERIO EQ '008'
             WITH GJAHR EQ '2009'
             WITH VAART EQ ''1'
             WITH ausf EQ 'X'
            VIA JOB v_jobname NUMBER v_jcnt
            AND RETURN.
    while i run the program in the foreground(debugging mode) the value in the variant is correct with value'TEST1'.
    but while i run the program in the background the value in the variant is taken as default value like 'TESTDEFAULT'
    Please help me out how to solve this issue.

    Hi
    SUBMIT rko7ko8g USING SELECTION-SCREEN '1000'
    WITH SELECTION-TABLE t_rsparams
    WITH KOKRS EQ 'A001'
    WITH variant EQ 'TEST1'
    WITH PERIO EQ '008'
    WITH GJAHR EQ '2009'
    WITH VAART EQ ''1'
    WITH ausf EQ 'X'
    VIA JOB v_jobname NUMBER v_jcnt
    AND RETURN.
    In your Job itself maintained the required Varaint.
    Regards,
    Sreeram

  • Needs to submit a program with Create icon

    Hi experts,
    I need to submit SAPRCKCC. Once the program SAPRCKCC got executed, in the selection screen i need to click Create Icon after that i need to pass the required values.
    The requirement is,
    How to submit SAPRCKCC with clicking of create icon
    Can anyone guide me.
    Mohana

    AT SELECTION-SCREEN.
      IF sy-ucomm <> 'CREATE'.  " FC code for your button.
      SUBMIT <Pgname> VIA SELECTION0-SCREEN
                    WITH SELECTION-TABLE
    ENDIF

  • Submit a program with two variants

    Hi all,
    There is one program which needs to run everyday with two different variants
    ( For this i need to have two jobs ).
    Now, i need to write a new program which submits the above program with two variants. How do i do it?
    Thanks
    Abhijith H

    You don't need two jobs, you can have 1 job with two steps,  each step would call the progam with the different variant.
    If you want to write a program which submits the program twice with two different variants, you can use the SUBMIT statement.  Here VARIANT1 is the name of a variant.
    SUBMIT ZREPORT01
           USING SELECTION-SET 'VARIANT1'
           AND RETURN.
    Regards,
    Rich Heilman

  • Submit concurrent program from report

    Hi All,
    I need to submit a shell script program after 5 minutes of report completion..
    and here am using following code in AFTER REPORT TRIGGER:
    select sysdate+5/1440 into l_start_time from dual; --Selecting Five Minutes after SYSDATE
    l_req_id := apps.FND_REQUEST.SUBMIT_REQUEST (application => 'XXXX',
                                                                                              program => 'CP_SHORT_NAME',
                                                                                              description => NULL,
                                                                                              start_time => l_start_time,
                                                                                              sub_request => FALSE, --TRUE
                                                                                              argument1 => :P_CONC_REQUEST_ID,
                                                                                              argument2 => :P_MAIL_ID);
    Now the problem here is, the request is beeing submited immediately with out waiting for 5 MINS
    Actually am submiting this program to mail the OUTPUT of concurrent program as EMAIL attachment and if it is submited immediately, then the program is trying to pick the PDF file which is not completly created.
    This results in ERROR some times but successcds most of the times.
    Can any one help on how to make the second program wait.
    Any alternate approach for the same is also appreciated.
    Thanks in advance.
    gvk.
    Edited by: gvk on Jan 13, 2011 1:38 AM

    Hi;
    What is your EBS version?
    Please check below thread
    concurrent program how to wait - prevent multiple request
    how to prevent multiple request of one conc program
    Regard
    Helios

Maybe you are looking for

  • ABAP to JAVA connectivity

    Hi Experts, I want to call JAVA program in ABAP, how I can achive this. -Rajneesh Gupta

  • Recorded a Non-DV tape to DVD. Unable to play on iMac.

    I want to edit a home movie I put onto DVD from a non-DV camcorder. But unlike DVD's that were made with video from a DV Camcorder, this DVD will not even play on the iMac. And I want to copy it into the iMac eventually for editing purposes, but beed

  • Why is my macbook stuck at the boot screen

    Hello all i have a Macbook A1181 13" Penryn, and im having issues turning it on. it seems to stop at the spinning circle portion of the boot process. but if it has been left off and unplugged it does sometimes boot up???? please help

  • How do I modify the behaviour of "Image Sizing" Module in Export

    As part of the export process I want to re-size an image to a fixed size e.g., 5400x3600. The iamge should be scaled symmetrically and therefore some fill-in of black or white may be necessary. I know I can do this as a "post-process" action, but the

  • Weblog Comment Author (force to be login ID from OD)?

    Can you force the author of a comment to be the logged in loginID of the person who has authenticated into a secured weblog? We have successfully set up and installed the weblog piece of the collaboration services on our 10.4.5 OS X Server (a replica