Using a layout in SUBMIT statement

Hi,
I am calling a program from another program using a SUBMIT statement.  I'm also using a layout to do so.
SUBMIT rffmepgax
         WITH s_fonds = s_fund-low
         WITH s_fictr = s_fc-low
         WITH s_hkont = c_gl
         WITH p_per_fr = s_poper-low
         WITH p_per_to = s_poper-high
         WITH p_fyr_fr = s_year-low
         WITH p_fyr_to = s_year-low
         WITH s_fipex = c_citem
>>>         WITH p_disvar = '/ZTRAVEL'
         WITH p_maxsel = c_max
         WITH s_wrttp = c_vt1
         WITH s_wrttp = c_vt2
         WITH FREE SELECTIONS texpr
         AND RETURN
         EXPORTING LIST TO MEMORY.
The problem is that /ZTRAVEL is a public layout that anyone can change.  I can rewrite the code to use a user-specific layout, but then only I can run the program.  If anyone else tries, it stops and says the layout doesn't exist. 
Is it possible to create a public layout that cannot be changed by anyone?  What is the t-code for this?
thanks,
Kevin

Hi
USING SELECTION-SET <var>
This addition tells the system to start the called program with the variant var
You specify the variant in the quotes.
Check the below links
http://help.sap.com/saphelp_nw04s/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm
regarding calling another program from current report
Hope this helps
Regards
Shilpa

Similar Messages

  • Use call transaction or submit statement

    Hi, i have a complex transaction, it has two control programs, a Z program and a standard program. I need execute it by call transaction or submit statement. In this transaction there are some select-options that i want fill with specific values.
    Can you help me with it?

    Hi Robin, the SHDB transaction was very useful. Now i have other problem. This transaction execute a jobs set.I already have filled all of fields in the transaction, i saved the parameters for the execution by SAVE button (BDC_OKCODE=SAVE), but the transaction don't release the jobs and  must do it. The last action (to release the jobs set) is executed by the OK button(BDC_OKCODE=OK).
    This is the code that i'm implementing:
    REPORT  ZPRUEBA_SALDOS_ANTERIORES     .
    DATA: BDCDATA TYPE TABLE OF BDCDATA.
    DATA: ITAB TYPE TABLE OF BDCMSGCOLL.
    DATA: WA_ITAB TYPE BDCMSGCOLL.
    DATA: PROGRAM LIKE SY-REPID ,
          WA_BDCDATA TYPE BDCDATA.
    DATA: DATE_ID(10).
    DATA: DATE_CONV(11).
    DATA: T_ID(6).
    DATA: DES_ERROR(500).
    *"parametro zdo(para tipo de documentos)
    *RANGES: R_BLART FOR DFKKOP-BLART,
    *        R_VKONT FOR FKKVKP-VKONT.
    *INITIALIZATION.
    START-OF-SELECTION.
      CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
           EXPORTING
                INPUT  = SY-DATUM
           IMPORTING
                OUTPUT = DATE_CONV.
      DATE_ID = SY-DATUM.
    CONCATENATE DATE_ID+6(2) '.' DATE_ID+4(2) '.' DATE_ID+0(4) INTO DATE_ID.
      CONCATENATE DATE_CONV+3(3) '_' DATE_CONV+0(2) INTO T_ID.
      WA_BDCDATA-PROGRAM = 'SAPLFKKAKTIV2'.
      WA_BDCDATA-DYNPRO  = '1000'.
      WA_BDCDATA-DYNBEGIN = 'X'.
      APPEND WA_BDCDATA TO BDCDATA.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-FNAM = 'FKKAKTIV2_DYNP_1000-LAUFD'.
      WA_BDCDATA-FVAL = '11.06.2008'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'FKKAKTIV2_DYNP_1000-LAUFI'.
      WA_BDCDATA-FVAL = 'MAR_38'.
      APPEND WA_BDCDATA TO BDCDATA.
      CLEAR WA_BDCDATA.
    *  WA_BDCDATA-PROGRAM = 'SAPLZ_CL_PROCESOS_EN_MASA'.
      WA_BDCDATA-PROGRAM = 'SAPLFKKAKTIV2'.
    *  WA_BDCDATA-DYNPRO  = '1001'.
      WA_BDCDATA-DYNPRO  = '1000'.
      WA_BDCDATA-DYNBEGIN = 'X'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'P_STICHT'.
      WA_BDCDATA-FVAL = DATE_ID.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'S_BUKRS-LOW'.
      WA_BDCDATA-FVAL = 'PCS'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'S_VKONT-LOW'.
      WA_BDCDATA-FVAL = '0'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'S_VKONT-HIGH'.
      WA_BDCDATA-FVAL = '999999999999'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'BDC_OKCODE'.
      WA_BDCDATA-FVAL = '=%01410010001580545'.
      APPEND WA_BDCDATA TO BDCDATA.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-PROGRAM = 'SAPLALDB'.
      WA_BDCDATA-DYNPRO  = '3000'.
      WA_BDCDATA-DYNBEGIN = 'X'.
      APPEND WA_BDCDATA TO BDCDATA.
    *  CLEAR WA_BDCDATA.
      WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(01)'.
      WA_BDCDATA-FVAL = 'BS'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(02)'.
      WA_BDCDATA-FVAL = 'FS'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(03)'.
      WA_BDCDATA-FVAL = 'CD'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(04)'.
      WA_BDCDATA-FVAL = 'EF'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(05)'.
      WA_BDCDATA-FVAL = 'TR'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(06)'.
      WA_BDCDATA-FVAL = 'TF'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(07)'.
      WA_BDCDATA-FVAL = 'TC'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(08)'.
      WA_BDCDATA-FVAL = 'LP'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(09)'.
      WA_BDCDATA-FVAL = 'NC'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'BDC_OKCODE'.
      WA_BDCDATA-FVAL = '=ACPT'.
      APPEND WA_BDCDATA TO BDCDATA.
      CLEAR WA_BDCDATA.
    *  WA_BDCDATA-PROGRAM = 'SAPLZ_CL_PROCESOS_EN_MASA'.
      WA_BDCDATA-PROGRAM = 'SAPLFKKAKTIV2'.
    *  WA_BDCDATA-DYNPRO  = '1001'.
      WA_BDCDATA-DYNPRO  = '1000'.
      WA_BDCDATA-DYNBEGIN = 'X'.
      APPEND WA_BDCDATA TO BDCDATA.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-FNAM = 'BDC_OKCODE'.
      WA_BDCDATA-FVAL = '=TAB03'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'BDC_OKCODE'.
      WA_BDCDATA-FVAL = '=PRPRN'.
      APPEND WA_BDCDATA TO BDCDATA.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-PROGRAM = 'SAPLSPRI'.
      WA_BDCDATA-DYNPRO  = '0100'.
      WA_BDCDATA-DYNBEGIN = 'X'.
      APPEND WA_BDCDATA TO BDCDATA.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-FNAM = 'PRI_PARAMS-PDEST'.
      WA_BDCDATA-FVAL = 'LOCAL'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'PRI_PARAMS-PLIST'.
      WA_BDCDATA-FVAL = '1604_SA_16'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'BDC_OKCODE'.
      WA_BDCDATA-FVAL = '=SAVE'.
      APPEND WA_BDCDATA TO BDCDATA.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-PROGRAM = 'SAPLFKKAKTIV2'.
      WA_BDCDATA-DYNPRO  = '1000'.
      WA_BDCDATA-DYNBEGIN = 'X'.
      APPEND WA_BDCDATA TO BDCDATA.
    *  CLEAR WA_BDCDATA.
      WA_BDCDATA-FNAM = 'BDC_OKCODE'.
      WA_BDCDATA-FVAL = '=TAB04'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'FKKAKTIV2_DYNP_1190-VARI'.
      WA_BDCDATA-FVAL = 'INTERES'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'FKKAKTIV2_DYNP_1200-JOBS_LOAD_BALA'.
      WA_BDCDATA-FVAL = '6'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'BDC_OKCODE'.
      WA_BDCDATA-FVAL = '=SAVE'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'BDC_OKCODE'.
      WA_BDCDATA-FVAL = '=DISP'.
      APPEND WA_BDCDATA TO BDCDATA.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-PROGRAM = 'SAPLFKJO_JOB'.
      WA_BDCDATA-DYNPRO  = '0100'.
      WA_BDCDATA-DYNBEGIN = 'X'.
      APPEND WA_BDCDATA TO BDCDATA.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-FNAM = 'D100_FIELDS-XBACKGR'.
      WA_BDCDATA-FVAL = 'X'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'D100_FIELDS-XIMMEDIATE'.
      WA_BDCDATA-FVAL = 'X'.
      APPEND WA_BDCDATA TO BDCDATA.
      WA_BDCDATA-FNAM = 'BDC_OKCODE'.
      WA_BDCDATA-FVAL = '=OK'.
      APPEND WA_BDCDATA TO BDCDATA.
      CALL TRANSACTION 'ZPSA' USING BDCDATA  MODE 'A'
                               MESSAGES INTO ITAB.
    Edited by: Marcel ochoa on Jun 12, 2008 5:01 PM
    Edited by: Marcel ochoa on Jun 12, 2008 5:03 PM
    Edited by: Marcel ochoa on Jun 12, 2008 5:06 PM
    Edited by: Marcel ochoa on Jun 12, 2008 10:43 PM
    Edited by: Marcel ochoa on Jun 12, 2008 10:45 PM
    Edited by: Marcel ochoa on Jun 12, 2008 11:37 PM

  • What is USING SELECTION-SET in submit statement?

    hi,
    any body can tel me.
    SUBMIT rptedt00
                      USING SELECTION-SET 'HRESS_TEDT00'
                      WITH pnppernr-low EQ i_pernr
                      WITH pnptimr6     EQ 'X'
                      WITH pnpbegda     EQ i_begda
                      WITH pnpendda     EQ i_endda
                      TO SAP-SPOOL
                      SPOOL PARAMETERS ls_params
                      WITHOUT SPOOL DYNPRO
                      AND RETURN.
    here use of USING SELECTION-SET  and which name we have to specify in quotes.
    Regards,
    Shankar.

    Hi
    USING SELECTION-SET <var>
    This addition tells the system to start the called program with the variant var
    You specify the variant in the quotes.
    Check the below links
    http://help.sap.com/saphelp_nw04s/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm
    regarding calling another program from current report
    Hope this helps
    Regards
    Shilpa

  • How to pass radiobuttons using a submit statements.

    Hi All,
    Can anyone tell me how to pass radiobuttons using Submit statement.
    My problem is that I am able to pass one select option and one parameter using the statement:
    submit (v_repid) to sap-spool without spool dynpro
                       spool parameters s_print_parms
                       using selection-screen '1000' WITH SELECTION-TABLE t_rspar_tab
                       and return.
    This selection screens got to check selections based on 2 radio buttons available in the selection screen which also i need to pass through SUBMIT.Please let me know how do i pass this to the Submit statement.
    Thankx in advance...
    Helpful answers will be rewarded fully...

    Hi Susanth,
                   Create Variant for the calling program, Give that variant( here in the below program variant for calling program that I created is VAR1) in the calling program in SUBMIT Statement.
    <b>
    CALLING PROGRAM:
    </b>
    data:
      w_variant(5) TYPE c VALUE 'VAR1'.
    SUBMIT YH625_CALLED_PROGRAM USING SELECTION-SET w_variant.
    <b>CALLING PROGRAM:</b>
    TABLES spfli.
    parameters:
          w_radio1 RADIOBUTTON GROUP g1,
          w_radio2 RADIOBUTTON GROUP g1.
    SELECT-OPTIONS s_table FOR spfli-carrid.
    WRITE '*************** This is Called program output **********************'.
    Hope this solves your problem.
    If you any query you are welcome.
    Regards,
    V.Raghavender.

  • How to use Submit Statement for mutiple Spools.

    Hi Gurus,
    I have a requirement wherein I need to Submit a Report Program to SAP-SPOOL which generates output for multiple Idocs.
    For each Idoc I need to attach the spool to a particular object_id.
    As of now I am doing this by putting the Submit statement in a loop.
    I want to meet the same functionality without using a loop for different Idocs.
    Ex.
    LOOP AT IDOCS.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    CALL FUNCTION 'JOB_OPEN'
    IF sy-subrc = 0.
      SUBMIT YFAPINV_IDOC_RPTS  TO SAP-SPOOL    "USING SELECTION-SCREEN '1000'
        WITHOUT SPOOL DYNPRO
        SPOOL PARAMETERS print_parameters
        WITH CREDATE IN CREDATE
        WITH CRETIME IN CRETIME
        WITH DOCNUM IN DOCNUM
        WITH VENDOR IN VENDOR
        WITH V_INVOIC IN V_INVOIC
        WITH MESCODE IN MESCODE
        WITH DOCSTAT IN DOCSTAT
        WITH DC_NBR IN DC_NBR
        WITH DOC_TYPE IN DOC_TYPE
        WITH S_BSART IN S_BSART
        WITH ap1_flag eq 'X'
        AND RETURN.
      IF sy-subrc EQ 0.
        CALL FUNCTION 'JOB_CLOSE'
      ENDIF.
    ENDIF.
    SELECT  rqident rqcretime FROM tsp01
    INTO (rqident,rqcretime)
    WHERE rqowner = sy-uname
    ORDER BY rqcretime DESCENDING.
      EXIT.
    ENDSELECT.
    IF rqident IS NOT INITIAL.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
    DATA l_line TYPE docs-lines.
      LOOP AT l_tline.
        CLEAR l_line.
        MOVE l_tline-tdline TO l_line.
        l_docs-lines = l_line.
        APPEND l_docs.
      ENDLOOP.
    ENDIF.

    Hi,
    Each submit will create only one spool. So I dont think this is possible. Yes what you can do though is that submit the program for all the IDocs at once ( provided your program YFAPINV can handle this) and then process the spool and separate the output for each IDoc after you retrieve the data from spool.
    To retrieve the data from the spool, you can use the function 'RSPO_RETURN_ABAP_SPOOLJOB' pass the spool request number and it will return you a internal table with the spool data.
    regards,
    Advait

  • Create spool for background jobs which uses submit statement

    Hi Gurus,
                 I have a quick question regarding the backgroud jobs. When we run a program in the background , it should create a spool for us, but, the problem comes when I am running a program in the background, its not creating the spool. This program uses SUBMIT statement. This program collects the data and it will submit to the other program and then retuen. In this case, its not creating a spool. Its very important for us to look at the spool for this program. Does anybody cam across this kind of problem? I need ur inputs.
    Thanks in advance, <REMOVED BY MODERATOR>
    Regards,
    Srinivas.
    Edited by: Alvaro Tejada Galindo on Mar 18, 2008 4:31 PM

    hi check this link ...
    Scheduling a submitable program as a background task with the number number in a background request name. After scheduling, the background task is completed by function module JOB_CLOSE and released immediately.
    DATA: number TYPE tbtcjob-jobcount,
          name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
          print_parameters TYPE pri_params.
    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 submitable TO SAP-SPOOL
                        SPOOL PARAMETERS print_parameters
                        WITHOUT SPOOL DYNPRO
                        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.
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=backgroundsubmit&adv=false&sortby=cm_rnd_rankvalue
    sy-subrc  Meaning
    0            Background task scheduled successfully.
    4            Scheduling cancelled by user on the selection screen.
    8            Error during scheduling, i.e. when accessing JOB_SUBMIT internally.
    12          Error in internal number assignment.
    regards,
    venkat.
    Edited by: venkat  appikonda on Mar 18, 2008 6:32 PM

  • Problem using Submit statement

    Dear Experts,
    I am trying to use submit statement in a report for transaction ML85. I have used the below code.
    submit RMSRVF00 with FRGCO = 'S1'
                    with FRGGR = 'S1'
                    with listu = 'ENTRY_REL'
                    with ebeln = '4500000309'
                    AND RETURN.
    But when I execute the report the values which I set are not filled and the screens opens with error message as '' Fill in all required entry fields". I am passing values for fields Releasecode - FRGCO, Release group - FRGGR, Purchase Order - EBELN, Scope of list - LISTU.
    Please tell me why this message is coming and values are not set for fields.
    KR,
    Bharath

    hai,
    try like this
    SUBMIT ZVENDOR_REPORT_NEW1 USING SELECTION-SCREEN '100'
                  WITH SELECTION-TABLE TB_OUTPUT
                   WITH P_DATE = SY-DATUM
                   WITH S_ERDAT BETWEEN '01.01.2008' AND '01.06.2008'
                   AND RETURN.
    or you can go in this way using type pools:
    TYPE-POOLS RSDS.
    DATA: TRANGE                        TYPE RSDS_TRANGE,
          TRANGE_LINE                   LIKE LINE OF TRANGE,
          TRANGE_FRANGE_T_LINE          LIKE LINE OF TRANGE_LINE-FRANGE_T,
          TRANGE_FRANGE_T_SELOPT_T_LINE LIKE LINE OF TRANGE_FRANGE_T_LINE-SELOPT_T,
          TEXPR                         TYPE RSDS_TEXPR.
    TRANGE_LINE-TABLENAME = 'TB_OUTPUT'.
    TRANGE_FRANGE_T_LINE-FIELDNAME = 'S_ERDAT'.
    TRANGE_FRANGE_T_SELOPT_T_LINE-SIGN   = 'I'.
    TRANGE_FRANGE_T_SELOPT_T_LINE-OPTION = 'BT'.
    TRANGE_FRANGE_T_SELOPT_T_LINE-LOW    = '01.01.2008'.
    TRANGE_FRANGE_T_SELOPT_T_LINE-HIGH   = '01.06.2008'.
    APPEND TRANGE_FRANGE_T_SELOPT_T_LINE TO TRANGE_FRANGE_T_LINE-SELOPT_T.
    TRANGE_FRANGE_T_SELOPT_T_LINE-SIGN   = 'I'.
    TRANGE_FRANGE_T_SELOPT_T_LINE-OPTION = 'NE'.
    TRANGE_FRANGE_T_SELOPT_T_LINE-LOW    = SY-DATUM.
    APPEND TRANGE_FRANGE_T_SELOPT_T_LINE  TO TRANGE_FRANGE_T_LINE-SELOPT_T.
    APPEND TRANGE_FRANGE_T_LINE TO TRANGE_LINE-FRANGE_T.
    APPEND TRANGE_LINE TO TRANGE.
    CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
      EXPORTING
        FIELD_RANGES = TRANGE
      IMPORTING
        EXPRESSIONS  = TEXPR.
    SUBMIT ZVENDOR_REPORT_NEW1 VIA SELECTION-SCREEN
                   WITH SELECTION-TABLE TB_OUTPUT
                    WITH FREE SELECTIONS TEXPR AND RETURN.

  • Problem in spool generation using SUBMIT statement

    Hi Experts,
                      I am facing a problem in getting the spool no using the SUBMIT statemet.I am exporting an internal table with some data and then importing the same in another dummy program to get the ALV list output.This dummy program is called using the SUBMIT TO SAP-SPOOL statement.
    The code is as follows:
    Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code
    The trouble is the submit statement is not calling the dummy program in this case.What can be the problem here and how can it be resolved.In my dummy program I am simply using the exported table to convert into list display so as to get a spool no. for it.
       My objective is to get the spool no. for this sothat I can convert this spool to PDF.
    Thanks and Regards
    Abhishek
    Edited by: abhishek singh on Oct 27, 2009 9:26 PM
    Edited by: abhishek singh on Oct 27, 2009 9:27 PM
    Edited by: abhishek singh on Oct 27, 2009 9:29 PM
    Edited by: Rob Burbank on Oct 27, 2009 4:41 PM

    Hi Experts ,
                        I am posting the code again:
    CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname          = lv_name
        IMPORTING
          jobcount         = lv_number
        EXCEPTIONS
          cant_create_job  = 1
          invalid_job_data = 2
          jobname_missing  = 3
          OTHERS           = 4.
      IF sy-subrc = 0.
        CALL FUNCTION 'GET_PRINT_PARAMETERS'
          EXPORTING
            archive_mode         = gc_spool_print      "For print = '1'
            no_dialog            = abap_true
          IMPORTING
            out_parameters       = lv_print_parameters
            valid                = lv_valid_flag
          EXPORT fui_fin_split TO MEMORY ID 'CUSTOMER'.
          SUBMIT zvrr9333_dummy TO SAP-SPOOL
                                SPOOL PARAMETERS lv_print_parameters
                                WITHOUT SPOOL DYNPRO
                                VIA JOB lv_name NUMBER lv_number
                                AND RETURN.
            CALL FUNCTION 'JOB_CLOSE'
              EXPORTING
                jobcount             = lv_number
                jobname              = lv_name
                strtimmed            = abap_true        "Immediate Start
              MESSAGE 'Spool not created'(e15) TYPE gc_success.
            ENDIF.
      SELECT jobname
             jobcount
             stepcount
             listident
      FROM tbtcp
      INTO TABLE gi_spool
      WHERE jobname EQ fuv_name
      AND   jobcount EQ fuv_number.
      IF sy-subrc EQ 0.
        READ TABLE gi_spool INTO lw_spool INDEX 1.
        fcv_spoolno = lw_spool-listident.
      ENDIF.
      SELECT jobname
             jobcount
             stepcount
             listident
      FROM tbtcp
      INTO TABLE gi_spool
      WHERE jobname EQ fuv_name
      AND   jobcount EQ fuv_number.
      IF sy-subrc EQ 0.
        READ TABLE gi_spool INTO lw_spool INDEX 1.
        fcv_spoolno = lw_spool-listident.
      ENDIF.

  • SUBMIT statement using variant

    Hi Gurus,
    i am trying to use execute a variant , and that variant has to be submitted in memory.(i.e i have three variants A,B,C whenever i run the report using variant A then that fields only has to be passed to memory) , but instead of that , even if i am using varinat B  , but by defaul it is taking another variant which contains all the fields.I think my issue is clear.i am using this submit statement.
    SUBMIT (sy-repid)
             AND RETURN
             EXPORTING LIST TO MEMORY
             WITH SELECTION-TABLE i_selscr.
    pleasehelp me regarding this ASAP.
    Thanks and regards,
    Rajeshwar

    Hi Rajeshwar
    You can submit it by using variant name also:
    Submit <Report> USING SELECTION-SET variant .
    Check this link:
    http://sapdevelopment.co.uk/reporting/rep_submit.htm
    http://help.sap.com/abapdocu/en/ABAPSUBMIT_SELSCREEN_PARAMETERS.htm
    http://help.sap.com/abapdocu/en/ABAPSUBMIT_SELSCREEN_PARAMETERS.htm
    Need information about SUBMIT statement
    Regards
    Neha
    Edited by: Neha Shukla on Nov 30, 2008 12:46 PM
    Edited by: Neha Shukla on Nov 30, 2008 3:22 PM

  • How to export to memory using submit statement?

    hi friends,
    There is a standard report RPTQTA10.
    After executing this report using submit statement i want get the result from the QTTRANS itable of RPTQTA10 to our local itab of BSP.
    After this from local itab of BSP i want display some fields of local itba.
    Any solutions plz....
    Regards,
    shankar.

    hi,
    thanks for ur reply.
    but i am getting error like this in IE.
    Note
    The following error text was processed in the system IT3 : Exception condition "CNTL_ERROR" raised.
    The error occurred on the application server itcsvr_IT3_01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Form: CONSTRUCTOR of program CL_GUI_CUSTOM_CONTAINER=======CP
    Form: PBO of program SAPLSLVC_FULLSCREEN
    Module: PBO of program SAPLSLVC_FULLSCREEN
    Function: REUSE_ALV_GRID_DISPLAY of program SAPLSLVC_FULLSCREEN
    Form: DISPLAY_LIST of program RPTQTA10
    END-OF-SELECTION of program RPTQTA10
    And my BSP code is like this in OnInitialization event.
    SUBMIT rptqta10
             WITH PNPPERNR-LOW = w_pernr
             EXPORTING LIST TO MEMORY AND RETURN.
    data: field(25).
    field-symbols: <fs_tab> type STANDARD table.
    field = '(RPTQTA10)QTTRANS[]'.
    assign (field) to <fs_tab>.
    MOVE <FS_TAB>[] TO it_qttrans[].
    Here it_qttrans is local itab of BSP.
    Regards,
    Shankar.

  • Printing using SUBMIT statement

    Hi
    I have a problem in printing using SUBMIT.
    I have three printers identified to print certain orders using submit statement.
    the list of printers is given in a drop down and once the user selects a printer from the list, i have to generate a spool for the corresponding printer. But this is not happening. The spool is generated for the user's default printer defined in SU50. I have my submit statement below:
    SUBMIT zppprbsel  WITH aufnr EQ p_wa_batch_res_process_order
                        WITH werks EQ c_1201 "'1201'
                        WITH relvn EQ c_0 "'00000000'
                        WITH relbs EQ c_0 "'00000000'
                        WITH orig  EQ ' '
                        WITH nach  EQ c_x "'X'
                        TO SAP-SPOOL
    *SPOOL PARAMETERS l_dest
                        WITHOUT SPOOL DYNPRO
                        WITH DESTINATION = l_dest
                        WITH IMMEDIATELY = SPACE
                        WITH KEEP_IN_SPOOL = 'X'
                        VIA JOB  v_job_name
                        NUMBER   v_job_cnt
                        AND RETURN.
    here my l_dest has one of the three printers that the user selects.
    when i change my default printer to one of the three printers the spool is generated fine. A spool always generated for the default printer of the user?

    Hi,
    Before the SUBMIT get the PRINT PARAMETER by using the FM --> GET_PRINT_PARAMETERS
    IMPORTING
                  out_parameters         = print_parameters
    print_parameters-pdest = 'LOCL'. " Change the Destination before passsing the PRINT_PARAMETER to SUBMIT.
    Then pass the print_parameters from the FM to the SUBMIT
    SUBMIT zppprbsel WITH aufnr EQ p_wa_batch_res_process_order
    WITH werks EQ c_1201 "'1201'
    WITH relvn EQ c_0 "'00000000'
    WITH relbs EQ c_0 "'00000000'
    WITH orig EQ ' '
    WITH nach EQ c_x "'X'
    TO SAP-SPOOL
    SPOOL PARAMETERS  print_parameters  "Pass here
    WITHOUT SPOOL DYNPRO
    WITH DESTINATION = l_dest
    WITH IMMEDIATELY = SPACE
    WITH KEEP_IN_SPOOL = 'X'
    VIA JOB v_job_name
    NUMBER v_job_cnt
    AND RETURN.
    Regards,
    Madhukar Shetty

  • Executing SUBMIT statement in background

    Hello Experts,
    Is it possibe in executing SUBMIT statement in backgound? If yes can anyone provide example code?
    Also in terms of performance tuning how does SUBMIT fares against CALL TRANSACTION? Which is much better in terms of performance.
    Appreciate your answers. Thanks!

    Hi
    There's no difference for the performance:
    if a transaction is assigned to a report (so no dialog program, module pool), it's better to use the SUBMIT if it needs to transfer the value on SELECTION-SCREEN. It can't do it by CALL TRANSACTION.
    DATA: VA_JOBNAME LIKE TBTCO-JOBNAME,
               VN_JOBCOUNT LIKE TBTCO-JOBCOUNT.
    * Open job
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                JOBNAME          = VA_JOBNAME
           IMPORTING
                JOBCOUNT         = VN_JOBCOUNT
           EXCEPTIONS
                CANT_CREATE_JOB  = 1
                INVALID_JOB_DATA = 2
                JOBNAME_MISSING  = 3
                OTHERS           = 4.
      CASE SY-SUBRC.
        WHEN 0.
        WHEN OTHERS.
          MESSAGE E208(00) WITH 'Error.
      ENDCASE.
    * Call report
      SUBMIT <REPORT>  USER SY-UNAME
                        VIA JOB VA_JOBNAME NUMBER VN_JOBCOUNT
                        WITH ..................................
                        AND RETURN.
    * Close job
      CALL FUNCTION 'JOB_CLOSE'
           EXPORTING
                JOBCOUNT             = VN_JOBCOUNT
                JOBNAME              = VA_JOBNAME
                STRTIMMED            = 'X'  " start immediatly
           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.
    Max

  • How to skip the alv list when submit a report by SUBMIT statement?

    Dear Experts,
    I  have  to submit a report(RMVKON00) for a special request in my  add-on program,  I use the following statment:
    SUBMIT RMVKON00
    AND RETURN EXPORTING LIST TO MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        LISTOBJECT = ABAPLIST_TAB
      EXCEPTIONS
        NOT_FOUND  = 1
        OTHERS     = 2.
    CALL FUNCTION 'LIST_TO_ASCI'
    * EXPORTING
    *   LIST_INDEX               = -1
    *   WITH_LINE_BREAK          = ' '
      TABLES
        LISTASCI                 = LISTASCI_TAB[]
       LISTOBJECT                = ABAPLIST_TAB
    EXCEPTIONS
       EMPTY_LIST               = 1
       LIST_INDEX_INVALID       = 2
       OTHERS                   = 3
    But  it still display the alv list , and I must click  button 'BACK' ,then it return my add on program.
    I hope to skip the alv list  (does not display the alv list ) .
    Would you like to help me?
    Thanks and Best Regards,
    Colin.
    Edited by: Colin on Jan 8, 2010 10:09 AM

    Hi Colin,
    I dont think you would be able to skip the ALV output using SUBMIT. However try changing the value of sy-lsind after the submit statement.
    SUBMIT RMVKON00
    AND RETURN EXPORTING LIST TO MEMORY.
    sy-lsind = sy-lsind - 1.
    If that doesnt work then try using JOB_START JOB_SUBMIT, JOB_CLOSE...
    Thanks,
    Best regards,
    Prashant

  • How to use one form to submit data to 2 tables on mysql

    Can someone please help me on this,
    I am developing a jsp website and I want to use one form to submit data to 4 tables on mysql database and the tables are related by one foreign key.
    Can someone bail me out of this ....I've hit a hard brick wall!!!!...

    kwesij wrote:
    Can someone please help me on this,
    I am developing a jsp website and I want to use one form to submit data to 4 tables on mysql database and the tables are related by one foreign key.
    Can someone bail me out of this ....I've hit a hard brick wall!!!!...What's the problem? What does a brick wall look like?
    Connect to the database and execute four SQL INSERT/UPDATE statements as a single unit of work. The fact that you have one form shouldn't be an issue.
    I'll bet you're having trouble because you haven't layered the problem either in code or in your mind.
    I'd recommend that you write a POJO to take in some objects and execute the SQL. Once you have that running successfully you can worry about the form. Decouple the two.
    Computer science is all about decomposing large problems into smaller ones.
    %

  • How to send report output from SUBMIT statement

    Hi,
    I need to develop one report whcih can be use to send any report output in mail as attachment in txt of execl format. So i will be using SUBMIT statement to execute the report in my new report and i need to convert the reportout in txt or excel format and need to send as attachment in mail. This new report can be use to execute any report which may have ALV GRid, Normal outout screen. So what could be the best way to develop this kind of report.
    Br,
    Piyush

    >
    piyush mathur wrote:
    > Hi Suhas,
    >
    > LIST_TO_ASCI will give me data in lines. and its difficult to separate the columns in another internal table for attachment file. As this report is going to use to send any report output so i can not fixed the delimiter. So i am looking some function which can split the data in columns when I am reading from List.
    > Br,
    > Piyush
    No need to seperate nothing additionally, this will come automatically in the attached file. Draft below
    DATA list_tab TYPE TABLE OF abaplist.
    SUBMIT your_report EXPORTING LIST TO MEMORY
                  AND RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = list_tab
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
    DATA string_tab TYPE list_string_table.
    "use table type appropriate for attchement
    DATA ascii_tab TYPE soli_tab.
    CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
       listasci                 = ascii_tab
       listobject               = list_tab.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename = 'C:\test.txt'
        filetype = 'ASC'
      TABLES
        data_tab = ascii_tab.
    DATA go_email_doc TYPE REF TO cl_document_bcs.
    go_email_doc = cl_document_bcs=>create_document(
                                          i_type = 'TXT'
    go_email_doc->add_attachment( i_attachment_type = 'TXT'
                                  i_attachment_subject = 'My Attachment'
                                  i_att_content_text = ascii_tab ).
    Regards
    Marcin

Maybe you are looking for

  • Using variables in PL/SQL function body returning SQL query

    h4. okay so I have this procedure POSTCODE_TO_LAT_LNG_GM_API(postcode  IN  VARCHAR2, lat  OUT NUMBER,  p_long OUT NUMBER) to convert a postcode into lat/long values. I then need to add them to the returned SQL statement so I used the string concat op

  • How to pass dynamic name to a field-symbol?

    Hi All, I have a requirement like I need to create dynamic internal table with dynamic name. Say like, Create a new Table    CALL METHOD cl_alv_table_create=>create_dynamic_table     EXPORTING      it_fieldcatalog = it_fieldcat_fin[]     IMPORTING   

  • Arithmetic Operators Problem!

    int a,b; long c,d; a=12345; b=234567; c=a*b/b; d=(long)a*b/b; the Result: c= -5965 d= 12345 why ?

  • 5.1 surround audio into Final Cut Studio out to AVI file with 5.1 surround?

    Someone wants to give me a 5.1 surround sound audio file for importing into my Final Cut Studio project, then I export my video (now with 5.1 surround) out to an AVI file with the 5.1 surround sound intact. How do I do this? thanks

  • Trainign and Event Mnaagemnet- Correspondence

    Hi Experts I was trying to create the correspondence manually. I was unable to change the logo of the correspondence. In uploading Tiff file format (RSTXLDMC) i am getting the well known error of baseline tiff version 6.0 is only accepted. I am unabl