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.

Similar Messages

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

  • 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

  • Problem for xml generation using DBMS_XMLGEN

    Hi All,
    i have problem during xml generation using Any help would be highly appreciate
    how could we publish xml data using data base API DBMS_XMLGEN in oracle applications (APPS) i.e. at 'View Output" using
    Any help would be highly appreciate.
    Let me know if need more explanation, this is High priority for me.
    Thanks and Regards,
    [email protected]
    Message was edited by:
    user553699

    You can set the null attribute to true , so that the tag appears in your XML
    see the statement in Bold.
    DECLARE
    queryCtx dbms_xmlquery.ctxType;
    result CLOB;
    BEGIN
    -- set up the query context
    queryCtx := dbms_xmlquery.newContext(
    'SELECT empno "EMP_NO"
    , ename "NAME"
    , deptno "DEPT_NO"
    , comm "COMM"
    FROM scott.emp
    WHERE deptno = :DEPTNO'
    dbms_xmlquery.setRowTag(
    queryCtx
    , 'EMP'
    dbms_xmlquery.setRowSetTag(
    queryCtx
    , 'EMPSET'
    DBMS_XMLQUERY.useNullAttributeIndicator(queryCtx,true);
    dbms_xmlquery.setBindValue(
    queryCtx
    , 'DEPTNO'
    , 30
    result := dbms_xmlquery.getXml(queryCtx);
    insert into clobtable values(result);commit;
    dbms_xmlquery.closeContext(queryCtx);
    END;
    select * from clobtable
    <?xml version = '1.0'?>
    <EMPSET>
    <EMP num="1">
    <EMP_NO>7499</EMP_NO>
    <NAME>ALLEN</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM>300</COMM>
    </EMP>
    <EMP num="2">
    <EMP_NO>7521</EMP_NO>
    <NAME>WARD</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM>500</COMM>
    </EMP>
    <EMP num="3">
    <EMP_NO>7654</EMP_NO>
    <NAME>MARTIN</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM>1400</COMM>
    </EMP>
    <EMP num="4">
    <EMP_NO>7698</EMP_NO>
    <NAME>BLAKE</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM NULL="YES"/>
    </EMP>
    <EMP num="5">
    <EMP_NO>7844</EMP_NO>
    <NAME>TURNER</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM>0</COMM>
    </EMP>
    <EMP num="6">
    <EMP_NO>7900</EMP_NO>
    <NAME>JAMES</NAME>
    <DEPT_NO>30</DEPT_NO>
    <COMM NULL="YES"/>
    </EMP>
    </EMPSET>
    http://sqltech.cl/doc/oracle9i/appdev.901/a89852/d_xmlque.htm

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

  • 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

  • Problem with background job using SUBMIT under different user

    Hi All,
    I am submitting a background job under different user name. I am submitting this job by using JOB_OPEN , SUBMIT report and JOB_CLOSE. But submit statement is returning sy-subrc 8, becuase of this the job_close is failed. Can you please help me to solve this problem.
    Thanks in advance.
    Tjgupta

    Hi,
    The user is having all authorizations. is there any difference with user types?
    This user is having  user type " as communication data".
    Thanks,
    Tjgupta

  • Using Submit statement

    Hi,
    I want to create a delivery from sales order using 'Submit'.
    Is this a correct program? What needs to be populated in the table rspar_tab? Please provide your input.
    data: rspar_tab  TYPE TABLE OF rsparams.
    SUBMIT SAPMV50A USING SELECTION-SCREEN '4001'
    with selection-table rspar_tab.
    Thanks in advance.

    Hi Krishen,
    Why dont u try using the BAPI.
    You can use the BAPI BAPI_DELIVERYPROCESSING_EXEC.
    Check this sample code..
    PARAMETERS: p_vbeln LIKE vbak-vbeln.
    DATA: BEGIN OF t_vbap OCCURS 0,
    vbeln LIKE vbap-vbeln,
    posnr LIKE vbap-posnr,
    kwmeng LIKE vbap-kwmeng,
    matnr LIKE vbap-matnr,
    werks LIKE vbap-werks,
    END OF t_vbap.
    DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest WITH HEADER LINE.
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    SELECT vbeln posnr kwmeng matnr werks
    INTO TABLE t_vbap
    FROM vbap
    WHERE vbeln = p_vbeln.
    LOOP AT t_vbap.
      t_request-document_numb = t_vbap-vbeln.
      t_request-document_item = t_vbap-posnr.
      t_request-quantity_sales_uom = t_vbap-kwmeng.
      t_request-id = 1.
      t_request-document_type = 'A'.
      t_request-delivery_date = sy-datum.
      t_request-material = t_vbap-matnr.
      t_request-plant = t_vbap-werks.
      t_request-date = sy-datum.
      t_request-goods_issue_date = sy-datum.
      t_request-goods_issue_time = sy-uzeit.
      APPEND t_request.
    ENDLOOP.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
    TABLES
       request = t_request
       createditems = t_created
       return = t_return.
    READ TABLE t_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
    MESSAGE e208(00) WITH 'Delivery creation error'.
    ENDIF.
    COMMIT WORK.
    READ TABLE t_created INDEX 1.
    Write: / 'Delivery ', t_created-document_numb.

  • How to pass a value and call SE38 program using SUBMIT statement

    Hello Friends
    I am trying to write a batch program in SE38, that calls other SE38 Programs.
    I don't want to use Parameter command to see the value on screen.
    All I want is to send a range of date (ToDate & FromDate) and generate different reports satisfying this date range condition.
    Can some one please help me with this. I would really appreciate it.
    I have tried the command SUBMIT with options of filling the input fields of the subsequent programs but I don't want to do this.
    I want all the sub programs to be called one after another and the reports generated using the date varialbles I send from the main program.
    I don't want to use se37 functions because of the client's request.
    Any help will be highly appreciated.
    Tks
    Ram

    Yes I am using SUBMIT command but I was not using the right options with the SUBMIT command and once I used the right options, it worked.
    Tks
    Ram

  • Problem With Invoice Generation using code

    I have some sales orders -  I put an button on the below of the sales order so that it will create the invoice through code. I CANT USE COPYTO option of sales order since i am adjusting some values while pressing the button.
    What i have done....
    1. Using get by key i read values from sales order.
    2. Using objects of sales order and invoice i am binding values.
    -- On Header
    > Card code
    > Card Name
    > Date
      OnLine
    > Item Code
    > Whs Code
    > Quantity
    > UnitPrice ( Calculated using the values in the sales order)
    > Tax Code
    Problem i have...
    1. The amount till  Total LC is correct.  BUT NOT THE TAX AMOUNT.
    2. When i checked the  Tax Base amount -> Its different form the TOTAL LC column.
    3. Then i noticed that - in header i saw  some discount amount , but the discount % is null.
    4. I have not given any discount on BP or any special price for BP.
    5. I tried to put 1% discount on header but still the discount amount is more than 1%.
    Please someone help me soon.
    UPDATE TO MY ABOVE QUESTION....
    I found that error was causing by the option i have activated - the Round off to one in  financial set up...is there any other method for the round off with out using the setup...
    Edited by: vibinvarghese on May 23, 2011 1:09 PM

    Some one find me an solution...this is causing me lot of problems now...

  • Problem in report generation using CrystalClear

    hi
    all
    plz can anybody told me about the code which will help to display the
    report using jsp. i m using crystal clear and want to add report
    with my project.
    plz send me code if anybody have
    plz zzz
    thanks in advance

    hi
    all
    plz can anybody told me about the code which will help to display the
    report using jsp. i m using crystal clear and want to add report
    with my project.
    plz send me code if anybody have
    plz zzz
    thanks in advance

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

  • Problem with spool request generation in Dialog program

    Hi,
        To give the spool and print functionality in dialog program i have used the function module code like below -
    call function 'GET_PRINT_PARAMETERS'
          exporting
               mode                   = ' '
               in_parameters          = ls_pri_params
          importing
               out_parameters         = ls_pri_params
               valid                  = lv_valid
          exceptions
               archive_info_not_found = 1
               invalid_print_params   = 2
               invalid_archive_params = 3
               others                 = 4.
       IF lv_valid <> space AND sy-subrc = 0.
             SUBMIT (sy-repid)
                    USER SY-UNAME TO SAP-SPOOL
                    SPOOL   PARAMETERS ls_pri_params
                    WITHOUT SPOOL DYNPRO.
    But the problem is, if it is list then we can easily get the print function, since i am using the above code in the dialog program screen 9000, program is giving dump like....
    Incorrect program type with SUBMIT.                                                                               
    What happened?                                                                               
    The current ABAP/4 program "SAPMYXXXXXX" had to be terminated because              
    one of the statements could not be executed.                                                                               
    This is probably due to an error in the ABAP/4 program.                              
    You attempted to start a program not intended for this purpose.                      
    I know that i should not use submit statement for dialog program, but what is the solution for this.
    Thanks in advance..

    Did you check the F1 help of SUBMIT. if not give a try.Submit cannot be used on Module pool programs. it is used for Report(executable ) programs.

  • Spool Generation problem in Back ground

    Hi,
    Can some one let me know what is the problem  in spool generation in the following scenario.
    I have two reports:
    ZF003 and ZF005.
    ZF003 contains the ALV grid which actually  outputs the list.
    If i run this in background the spool is being generated bcoz it makes use of ALV grid.
    we had a requirement to  code some additional functionality in ZF005 and made use of ZF003 in the program ZF005.
    ZF005 displays the ALV output when it is run in fore ground.but it is not generating the spool when run in the background.
    Thanks in advance.
    Regards,
    Babul.

    Hi Aarun,
    It doesnot handle any upload or download from PC.
    Very much  Thanks for ur suggestions.
    But  i have coded in ZF005 using ALV once again to generate the spool in background.

Maybe you are looking for

  • ShipMent and Delivery Extractor

    Can somebody explain the differences between shipment extractors and Delivery Extractors (SD). when exactly we use shipment and when 2lis_12_vchdr or itm. If anybody has document on shipment please mail it <b>[email protected]</b> Regards Kunal

  • Order of Photographs in iPhoto 6.0.2

    Hey there. I have recently been importing loads and loads of images into iPhoto, as you do. I have been using film and such, so have scanned in prints and film, arranged them in a folder, and imported that folder. Simulating the way a digital camera

  • How to achieve vietnamese language support for SAP?

    Dear all, It's easy to add languages which are natively supported by SAP like Japanese, French... I wonder what are the things to do when we need language enablement for languages like vietnamese which are not yet supported by SAP. What we want to ac

  • [SOLVED] Search in a file

    Hi! I'm working on a radio script with several functions, but i need your help to continue.  I want to search for a spefic string in a file. The files content is like: Super Hot Girls Radio Channel;http://lovepotion.org:666 Sir Camelot Danish Radio;k

  • Powerbook g4 shuts down unexpectedly

    I have had my computer for a year now. (bought used from a friend) I recently had to buy a new hard drive. After that, I had to install Leopard as the operating system. (I dont know correct terms, sorry!) It worked fine for a while, but now it will j