Skip to Content

problem during submit

hi folks,

Actually my requirement is to convert the list output to PDF format..

First iam submitiing to spool and then using CONVERT_ABAPSPOOLJOB_2_PDF to convert to PDF.but when i do the below code

SUBMIT (sy-repid) TO SAP-SPOOL WITHOUT SPOOL DYNPRO

SPOOL PARAMETERS v_print_parms

VIA SELECTION-SCREEN

AND RETURN.

iam facing some problem in displaying the o/p.when i enter values in selection screen and execute all the values are disappearing and when i press back button its showing the o/p...plz sugest me where i was wrong.I tried with import and export but not working...I have one mandatory field in the selection screen.I tried to use that instead of selection screen but not working.tell me how can i sent list o/p to spool.Its urgent..

regards,

nagaraj

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 11:23 AM

    HI,

    Check this link:

    http://help.sap.com/saphelp_47x200/helpdata/en/85/54c73cee4fb55be10000000a114084/frameset.htm

    pdf-file-in-application-server

    pdf-file-download-to-application-server

    download-pdf-file-to-sap-application-server

    This web log covers all possibilities:

    /people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp

    Other options:

    U've to create a spool and then convert it to pdf by report RSTXPDFT4.

    or

    use this function module to convert to pdf.

    call function 'CONVERT_OTF'

    EXPORTING

    format = 'PDF'

    max_linewidth = 132

    IMPORTING

    bin_filesize = v_len_in

    TABLES

    otf = i_otf

    lines = i_tline

    EXCEPTIONS

    err_max_linewidth = 1

    err_format = 2

    err_conv_not_possible = 3

    others = 4.

    • Fehlerhandling

    if sy-subrc <> 0.

    endif.

    Reward points if this Helps.

    Manish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 11:25 AM

    Hello,

    Try like this...

    SUBMIT (sy-repid) TO SAP-SPOOL WITHOUT SPOOL DYNPRO

    SPOOL PARAMETERS v_print_parms

    <b>EXPORTING LIST TO MEMORY</b>VIA SELECTION-SCREEN

    AND RETURN.

    If useful reward.

    Vasanth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 11:41 AM

    Hi nagaraj,

    1. In your ZREPORT1,

    u are using the statement,

    SUBMIT (sy-repid) TO

    2. This may be causing to

    execute the report ONCE AGAIN (bcos of submit statement),

    and the selection screen is coming once again.

    3. SUBMIT (sy-repid) <----


    THIS SY-REPID

    should not be used in the same program.

    4. Instead we should create one more program ZREPORT2

    where we should submit the original program.

    In zreport2,

    we should write

    submit zreport1

    WITHOUT SPOOL DYNPRO

    SPOOL PARAMETERS v_print_parms

    VIA SELECTION-SCREEN

    AND RETURN.

    regards,

    amit m.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 09, 2007 at 11:47 AM

    Hi amit,

    yes you are correct iam using the submit in the sameprogram tahs why it s calling number of times.i wil try as u said and get back to u..thanks for ur help

    Cheers

    nagaraj.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 09, 2007 at 11:58 AM

    Hi amit,

    still not getting.Plz check the code earlier i have written.

    CONCATENATE 'c:\'

    sy-repid

    '.pdf'

    INTO lv_filename.

    *-- Setup the Print Parmaters

    CALL FUNCTION 'GET_PRINT_PARAMETERS'

    EXPORTING

    authority = space

    copies = '1'

    cover_page = space

    data_set = space

    department = space

    destination = space

    expiration = '1'

    immediately = space

    in_archive_parameters = space

    in_parameters = space

    layout = space

    mode = space

    new_list_id = 'X'

    no_dialog = 'X'

    user = sy-uname

    IMPORTING

    out_parameters = v_print_parms

    valid = lv_valid

    EXCEPTIONS

    archive_info_not_found = 1

    invalid_print_params = 2

    invalid_archive_params = 3

    OTHERS = 4.

    *-- Make sure that a printer destination has been set up

    *-- If this is not done the PDF function module ABENDS

    IF v_print_parms-pdest = space.

    v_print_parms-pdest = 'LOCL'.

    ENDIF.

    *-- Explicitly set line width, and output format so that

    *-- the PDF conversion comes out OK

    v_print_parms-linsz = lc_linsz.

    v_print_parms-paart = lc_paart.

    SUBMIT (sy-repid) TO SAP-SPOOL WITHOUT SPOOL DYNPRO

    SPOOL PARAMETERS v_print_parms

    VIA SELECTION-SCREEN

    AND RETURN.

    • To get the spool number

    PERFORM get_spool_number.

    ENDFORM. " print

    *&----


    *

    *& Form get_spool_number

    *&----


    *

    • Subroutine to get the spool number

    *----


    *

    FORM get_spool_number .

    DATA:

    lv_rq2name LIKE tsp01-rq2name.

    CONCATENATE sy-repid+0(8)

    sy-uname+0(3)

    INTO lv_rq2name SEPARATED BY '_'.

    SELECT * FROM tsp01 WHERE rq2name = lv_rq2name

    ORDER BY rqcretime DESCENDING.

    v_rqident = tsp01-rqident.

    EXIT.

    ENDSELECT.

    IF sy-subrc NE 0.

    CLEAR v_rqident.

    ENDIF.

    ENDFORM. " get_spool_number

    Please suggest me how to go further....

    Kind regards,

    nagaraj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi again,

      1. we should not use sy-repid

      SUBMIT <b>(sy-repid)</b> TO SAP-SPOOL WITHOUT SPOOL DYNPRO

      2. Instead create another program zreport2,

      and inside this zreport2,

      submit zreport1.....

      regards,

      amit m.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.