Skip to Content
avatar image
Former Member

How to create Spool through ABAP program

How to create spool request for Smartforms through program. So I can go in TCODE SP01 and see the output of my smartforms.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Aug 09, 2013 at 08:57 AM

    The smartform function module will return the parameter JOB_OUTPUT_INFO. This parameter will contain a component called SPOOLIDS which will have contain the spool ID.

    The above is based on the assumption that you are using the  function module of your smartform to print it. If you are trying to print differently give more information on how you are printing.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 08, 2008 at 07:13 AM

    Hi,

    To generate a spool req for a smartform you can generate from the standard Tcode of the application for which you are generating smartform.

    Example :For invoice you can got ot VF03 provide the invoice no then go with Billing Document->Issue output ,select the output type and go with the Print option.

    This will generate the spool request.

    But,

    If you want a program for generating the same then you can record the above procedure and write a BDC .

    so that it will generate the spool request.But this will be application dependent,i.e you need to record depending on

    the application for which you want the spool request.

    if you want for invoice record vf03 as said above ,code accordingly.

    Reward points if useful.

    Edited by: K.R.Reddy on Apr 8, 2008 9:18 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 08, 2008 at 07:34 AM

    Include the below code in ur program .......

    DATA: PRINT_PARAMETERS TYPE PRI_PARAMS,

    VALID_FLAG TYPE C LENGTH 1.

    CALL FUNCTION 'GET_PRINT_PARAMETERS'

    EXPORTING

    IMMEDIATELY = 'X' "C_IMMEDIATELY

    *LAYOUT = 'Z_48_144'

    *LINE_COUNT = '48'

    LINE_SIZE = '255'

    *NEW_LIST_ID = C_NEW_LIST_ID

    NO_DIALOG = 'X'

    RELEASE = 'X'

    IMPORTING

    OUT_PARAMETERS = PRINT_PARAMETERS

    VALID = VALID_FLAG

    EXCEPTIONS

    ARCHIVE_INFO_NOT_FOUND = 1

    INVALID_PRINT_PARAMS = 2

    INVALID_ARCHIVE_PARAMS = 3

    OTHERS = 4 .

    G_PDEST = PRINT_PARAMETERS-PDEST.

    NEW-PAGE PRINT ON PARAMETERS PRINT_PARAMETERS

    NO DIALOG.

    List of write statements to be output.......

    NEW-PAGE PRINT OFF.

    Reward if useful..............

    Add comment
    10|10000 characters needed characters exceeded