Skip to Content
avatar image
Former Member

Problem with sap script while converting to pdf format

please help me in this issue .

when i go to the tocde vl03n and i give the outbond delivery document no then in menu option outbound delievery and issue delievery output.it crates the spool request . then i will go to the sp01 tcode and copies the newly created spool request.after that i go to the se38 and executes RSTXPDFT2, it asks the spool request .after this program execution it downloads the form in pdf format.

problem is insted of going to all these transactions user wants one z tranaction that he will enter outbound delievry document number and he wants to download the form directly in pdf format on desktop .

how can i solve this .

please give some needful suggestions.

thanks.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Nov 29, 2006 at 07:11 AM

    check this

    function-module-to-deliver-svript-output-to-pdf-fo

    There are 2 ways of doing :-

    1) Take the spool generated and convert to PDF(use FM CONVERT_ABAPSPOOLJOB_2_PDF /CONVERT_OTFSPOOLJOB_2_PDF ) and send as email attachment using function module SO_NEW_DOCUMENT_ATT_SEND_API1. Check at ITCPO structure of Open_FORM for SPOOL details.

    2)When call Open_form by default device is 'Printer' default to MAIL and send output to various RECIPIENT.

    regards

    Prabhu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 29, 2006 at 10:27 AM

    Hi,

    Please check this.

    Function module: SX_OBJECT_CONVERT_OTF_PDF can be used to convert the SAP SCRIPTS into PDF format.

    In the driver program of a SAP SCRIPT the following details have to be specified.

    STEP 1: Data declaration

    Parameters: P_FILE LIKE RLGRAP-FILENAME DEFAULT

    Internal Table Declaration:

    DATA: OTFDATA LIKE ITCOO occurs o with header line. (Spool format)

    DATA: OTFDATA2 LIKE SOLISTI1 occurs o with header line. (Single List with Column Length)

    DATA: PDFDATA LIKE SOLISTI1 occurs o with header line. (Single List with Column Length)

    Work Area Declaration:

    DATA: LEN_IN/LEN_OUT LIKE SOOD-OBJLEN. (Size of the document content)

    STEP 2: In Close Form below details have to be specified.

    Tables

    OTFDATA = OTFDATA (Spool Format)

    STEP 3: Assign the value stored in OTFDATA to OTFDATA2

    OTDATA2 [] = OFTDATA [].

    STEP 4: The Function Module definition.

    SX_OBJECT_CONVERT_OTF_PDF

    EXPORTING

    FORMAT_SRC = 'OTF'

    FORMAT_DST = 'PDF'

    DEVTYPE = 'FILE'

    LEN_IN = LEN_IN

    IMPORTING

    LEN_OUT = LEN_OUT

    TABLES

    CONTENT_IN = OTFDATA2

    CONTENT_OUT = PDFDATA

    EXCEPTIONS

    ERR_CONV_FAILED = 1

    OTHERS = 2

    .

    The above code will generate the PDF format of the SAP SCRIPTS. To download the PDF to presentation server use the function module WS_DOWNLOAD.

    Regards

    Yamini

    Add comment
    10|10000 characters needed characters exceeded