Problem in submit statement ?

hi friends..
i have one report program (for eg zpgm1) from that i call another program (for eg zpgm2) by using submit statement.
in zpgm1  i have only one radio button
in zpgn2 i have one parameter with obligatory.
the issue is
while executing from zpgm1 it will call the zpgm2 but it show error message like "parameter is required field" because its an mandatory field.
i don't want that message while submit ..
can you plz..
thanx  in advance

try this if it works.
in the zpgm2 , instead of making the parameter as OBLIGATORY , do a validation on that field
eg
<b>instead of this</b>
parameters : p_matnr like mara-matnr <b>obligatory</b>.
<b>use this</b>
parameters : p_matnr like mara-matnr.
at selection-screen.
if p_matnr is initial.
  message e001(ZE) with 'Matnr is mandatory field'.
endif.

Similar Messages

  • Problem with Submit statement

    Hi All,
    I have a problem with the usage of the submit statement.
    I have a report program, say report 'A'.
    In the report program 'A', I have a custom screen with number '9001'.
    In the screen 9001, of program A, there is a button to display ALV.
    In the PAI event, under module Module call_report, i am calling another report program say B, using the statement Submit B and return, when the button is clicked.
    In the report program B i have a select options. and a docking alv container in it.
    Flow of the program is:
    1. Run the program A.
    2. Select the button on screen 9001.
    3. Call the report program B.
    4. Enter a value in the select option and run the program B.
    5. Go back to program A by selecting back button.
    The problem is as at step 4.:
    Now, when i press Intervals button ( Arrow mark ) present beside the select option, my program B is getting executed and the list output is being shown.
    Kindly let me know what is the problem.

    you can very well use the submit procedure as suggested above or you also can do "leave to screen '9001' " for the back button.

  • Problem with Submit statement into print program for delivery

    Hi all,
    i got a problem with the SUBMIT statement that i put into a print program associated to a delivery output message.
    If i print the message by VL02N or VL71, everything works.
    But if i associate the output with RV56ABST, the SUBMIT instruction isn't accepted and i get the message
    "Processor ABAP: POSTING_ILLEGAL_STATEMENT"
    There is any solution to this situation?
    Why i cannot use the SUBMIT statement in this case?

    Hi Simone,
    you could try to do the operation in a separate task (call a function in starting new task). This will decouple your current process from the new task.
    Cheers,
    Stefan.

  • 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 Submit Statement of Alv Report

    Hi All Experts,
    i make one report,my requirement is when i execute my report then it displays 100 records, i select 20 records from 100 records
    then based upon 20 records  execute the another report with out slection screen. i know the process through the submit statement,but it doesn't give exact output 20 of 20 based upon selected entries.
    my Code is:SUBMIT ZPS_PROJ_CN41N USING SELECTION-SCREEN '1000' WITH SELECTION-TABLE RSPAR_TAB
                                                            AND RETURN.
    give suggistions and correct syntax of submit statement.
    Thanks.

    Hi,
    = 'EQ ' for parameters
    In for range or selct-options
    SUBMIT  <Report name>
             WITH r_budat IN s_budat           " Selection screen parameters
             WITH kostl   IN s_kostl
             WITH kstar   IN s_kstar
             AND RETURN.
    "With Variant
      SUBMIT <Report Name>
         USING SELECTION-SET 'BPC TEST'             "BPC set is Varaint name for report
               EXPORTING LIST TO MEMORY AND RETURN.
    "capturing the output to another report
    SUBMIT  <Report name>
             WITH r_budat IN s_budat           " Selection screen parameters
             WITH kostl   IN s_kostl
             WITH kstar   IN s_kstar
            EXPORTING LIST TO MEMORY AND RETURN.    
    Prabhudas

  • 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 PROBLEM

    I AM USING SUBMIT FOR IDOC TRANSACTION  WE05 , THE STATEMENT IS BELOW
              SUBMIT rseidoc2 WITH SELECTION-TABLE seltab
                        VIA SELECTION-SCREEN
                         WITH docnum IN r_doc AND RETURN.
    the problem is that when i go directly to weo5 and enter any idoc it is showing me the output but when i go through
    submit statement it is giving me error 'NO IDOC FOUND' . please suggest

    ELSEIF rs_selfield-fieldname = 'DOCNUM'.
            READ TABLE lit_final INTO ls_final WITH KEY docnum  = rs_selfield-value.
            IF sy-subrc = 0.   "if succesful
    *          SET PARAMETER ID 'DCN' FIELD rs_selfield-value.
              seltab_wa-selname = 'CREDAT'.
              seltab_wa-kind  = 'S'.
              seltab_wa-sign    = 'I'.
              seltab_wa-option  = 'EQ'.
              seltab_wa-low  = space.
              seltab_wa-high  = space.
              APPEND seltab_wa TO seltab.
              CLEAR seltab_wa.
              r_doc-sign    = 'I'.
              r_doc-option  = 'BT'.
              r_doc-low  = rs_selfield-value.
              APPEND r_doc.
              CLEAR seltab_wa.
              SUBMIT rseidoc2 WITH SELECTION-TABLE seltab
                        VIA SELECTION-SCREEN
                         WITH docnum IN r_doc AND RETURN.
            ENDIF.

  • 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.

  • 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

  • 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

  • A question About SUBMIT statement

    Hi,
    By SUBMIT statement, i can trigger another report. If the called report runs into dump, how can i detech/catch the dump in the calling report? I tested. It seems impossible to catch the dump. The calling report will also dump.
    My question is, if the called report runs into dump, how to detect the dump and avoid dump in calling report?
    Thanks in advance,
    Best Regards, Johnney.

    hi
    you can catch this kind of error or exeption from the respective report
    then pass this error or exeception to the calling report
    go through the  example I  am giving , ti have done it like this only  
    SUBMIT zgurep03 AND RETURN WITH SELECTION-TABLE li_seltab .
    then in the called reprot
    *Check ledger
      SELECT SINGLE * FROM t881 WHERE rldnr = p_rldnr.
      IF sy-subrc NE 0.
        SET CURSOR FIELD 'P_RLDNR'.
         MESSAGE e448 WITH p_rldnr
          MESSAGE e446 INTO lv_text .
          lv_type = 'E'.
    Capturing the error messages.
    EXPORT lv_text TO MEMORY ID 'TX'(004).
    EXPORT lv_type TO MEMORY ID 'TP'(005).
    in calling report
      IMPORT gv_type1 TO gv_type FROM MEMORY  ID 'TP'.
      IMPORT gv_text1 TO gv_text FROM MEMORY ID 'TX'.
    preparing error message in the callge report for the calling report
    PERFORM prepare_message
            USING sy-msgid
                  lv_msgno
                  lv_msgv1
                  lv_msgv2
                  lv_msgv3
                  lv_msgv4
            CHANGING gv_text.
    preparing  error message
    FORM prepare_message  USING    p_sy_msgid
                                   p_sy_msgno
                                   p_sy_msgv1
                                   p_sy_msgv2
                                   p_sy_msgv3
                                   p_sy_msgv4
                          CHANGING p_gv_text.
      CALL FUNCTION 'FORMAT_MESSAGE'
        EXPORTING
          id        = p_sy_msgid
          lang      = 'EN'
          no        = p_sy_msgno
          v1        = p_sy_msgv1
          v2        = p_sy_msgv2
          v3        = p_sy_msgv3
          v4        = p_sy_msgv4
        IMPORTING
          msg       = gv_text
        EXCEPTIONS
          not_found = 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.
    I guess this will solve your problem
    Regards
    Prashant

  • Avoid ALV output screen in submit statement

    hello,
    I have created one FM.in that FM i am calling one zreport using submit statement as i want to access that zreport's internal table.so i have done that using IMPORT and EXPORT statement and i am getting values in my FM.
    but my problem is when i execute that FM it stops and display the ALV output of zreport and then when i press back button it gives me FM's output.i dont want that ALV output.can anybody help me that how to omit this output screen?
    regards
    soniya s.

    Hi,
    Use option EXPORTING LIST TO MEMORY with statement SUBMIT.
    Regards,
    Nikhil
    Edited by: Nikhil Kayal on May 13, 2009 1:32 PM

  • SUBMIT statement doesnt work

    hi
    I want to execute program RIMODGEN ( CFM1 transaction ) with some values filled in MA_MATNR
    But this program is not able to execute the program with SUBMIT statement and return & close the job, please tell me whats the problem with this....
    Points for all helpful answers
    * 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
    * CALL TRANSACTION
    SUBMIT cfm1  with MA_MATNR in MA_MATNR
                      WITH I_MODID  = 'TEST_RAJ'
                      WITH I_LOGSYS = 'D41030'
                      with I_APPL   = 'TEST_RAJ'
                      user sy-uname
                      via job jobname
                      number jobcount
                      and RETURN.
      if sy-subrc > 0.
          message e200(zz) with 'RIMODGEN call failed'. "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.
         MESSAGE i200(zz) with 'Done !!'.    "error processing
         stop.
      endif.

    Rob and I were pointing out that you have the transaction name in the SUBMIT statement in your code that you posted above, so if you are not currently using the program name in your program, make sure that you are.  Also, you may want to use the extension  "     to sap-spool without spool dynpro"  of the SUBMIT statement, the ouput will then go to the spool.  Here is an example program where I am creating a background job .
    report zrich_0004 .
    data:   sdate type sy-datum,
            stime type sy-uzeit,
            l_valid,
            ls_params like pri_params,
            l_jobcount like tbtcjob-jobcount,
            l_jobname  like tbtcjob-jobname.
    start-of-selection.
    * Get Print Parameters
      call function 'GET_PRINT_PARAMETERS'
           exporting
                no_dialog      = 'X'
           importing
                valid          = l_valid
                out_parameters = ls_params.
    * Open Job
      l_jobname = 'ZRICH_0005'.
      call function 'JOB_OPEN'
           exporting
                jobname  = l_jobname
           importing
                jobcount = l_jobcount.
    * Submit report to job
      submit zrich_0005
           via job     l_jobname
               number  l_jobcount
           to sap-spool without spool dynpro
               spool parameters ls_params
                  and return.
    * Kick job off 30 seconds from now.
      sdate = sy-datum.
      stime = sy-uzeit + 30.
    * Schedule and close job.
      call function 'JOB_CLOSE'
           exporting
                jobcount  = l_jobcount
                jobname   = l_jobname
                sdlstrtdt = sdate
                sdlstrttm = stime
    *            strtimmed = 'X'
    Regards,
    Rich Heilman         .

  • BAPI FM with Submit Statement

    Hi,
    I want to use BAPI Function Module and Submit Statement in a program. How i can use this, Please help me since this is very urgent.
    Regards
    Krishna

    Hi Deepu,
    try this code
    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    "here you can use the 2 tables.
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    hope this solves your problem..
    Thanks!

  • 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

Maybe you are looking for

  • How to add columns (fields) to header section of an alert e-mail?

    Hi all, In a standard out of the box alert template, I want to add custom fields (e.g. Notes, Value p.a.) to the body of an alert e-mail, see photo: These cannot be any list/library built-in columns like 'Created', 'Created By' etc. The class respon

  • Duplicate text messages Handcent msgs

    I downloaded the handcent application and it sends out duplicate text messages.   People have gotten the same message from me anywheres from 2-5 times.  Not everytime, but still annoying is there a way to fix this problem.  It has gotten worse just r

  • Firefox hangs on certain animation sites eg babblarna.se

    Firefox stops responding on cetain sites which have animation or video. It freezes and I am unable to shut it down and restart it. I have to go through the process of rebooting the computer. I have tried disabling add ons, but it makes no difference.

  • How to tell what physical disk is an ASM volume?

    Hello all, I'm trying to install some clusterware. I have attached, a SAN unit, that was previously used for ASM. After I installed the ASM libs/drivers...I ran oracleasm scandisks, and it found all of them. I have ASM1,ASM2....ASMn I thought, "great

  • Still shows Windows 8.1

    My Windows 10 Installation still says Windows 8.1 with Media Center in the lower right corner. The same in This PC Properties. Is that correct?  Thanks