How to print form into pdf format using smart forms in abap

please let me know how to print form into pdf format using smart forms in abap.
Moderator message: please search for available information/documentation.
Edited by: Thomas Zloch on Mar 25, 2011 2:04 PM

Hi ,
refer this link
<removed by moderator>
Regards,
Dhina..
Moderator message: please do not reply to questions that violate forum rules.
Edited by: Thomas Zloch on Mar 25, 2011 2:04 PM

Similar Messages

  • How to convert Smart Form into PDF format and return the result in BAPI?

    I want to convert a Smart Form into PDF format and return the result in BAPI.
    can anyone tell me how it can be done with related example
    regards
    pranay

    hi,
    smart form to pdf--
    All you have to do is call your SF to get OTF and then concert it to PDF. Works like charm:
    DATA: p_output_options TYPE ssfcompop,
    p_control_parameters TYPE ssfctrlop.
    p_control_parameters-no_dialog = 'X'.
    p_control_parameters-getotf = 'X'.
    CALL FUNCTION v_func_name "call your smartform
    EXPORTING
    output_options = p_output_options
    control_parameters = p_control_parameters
    IMPORTING
    job_output_info = s_job_output_info.
    call function 'CONVERT_OTF_2_PDF'
    tables
    otf = s_job_output_info-otfdata
    lines = t_pdf
    and if u need more u can check below links also
    Check the below links..
    Re: Smartforms to PDF
    Re: smartform (otf) as pdf and sending as email-attachment
    VISIT THIS LINK
    Re: Smartforms to PDF
    PLZ REWARD POINTS IF IT HELPS YOU
    rgds
    anver

  • How to "print" to a PDF file using several templates?

    I have Adobe Acrobat X Professional.
    Now I want to export my documents (letters, bids, invoices etc. from my ERP) to PDF files using the Adobe PDF printer driver using different layout templates for example: we have two different letterheads (already PDF files) and some of the documents have to be exported/merged onto the first, and others have to be exported/merged onto the second letterhead.
    Are there any options on how to select different templates in the Adobe PDF printer.
    And if not, are there any solutions how to integrate this functionality into Adobe PDF printer.
    Any help is greatly appreciated
    Cheers,
    Harald

    ok, that's right. i also can use the add layer command to create the text over the letterhead.
    but this is impractical. the users should be able to export the document using the desired template.
    i need a superimpose feature or something like that for the pdf writer. hopefully it will be implemented
    Thanks anyway.
    Cheers,
    Harald
    Message was edited by: harlam2k11

  • How to enable commenting into pdf files using java?

    Hi All,
    Is there any way available to enable comments into pdf files through java. I have a Adobe Reader 9 and also I want put some comments into pdf file, but the reader is not allowed to place a comment into pdf file before enabling the Comments into pdf. After enabling the comments in pdf file then only we can place the comments and we can the pdf file with comments.
    Is there any way available to enable comments into pdf file to view acrobat reader.
    Thanks in advance.

    The end user who uses the web application has Acrobat installed in their mahcine needs it only for the purpose of enabling comments in pdf. If this task of enabling comments in pdf is done through my application there is no need for acrobat in such user's machine which was requested as a cost cuttnig measure.
    For this purpose, i need to know about how to enable comments in pdf through java api.
    I have used itext java api for other pdf related manipulation in java. But it does not have feature as per the requirement posted above. Can any body suggest relevant java api to achieve the task requested?
    Tahnks in Advance.

  • How to print two different multiple pages in smart forms

    Hi All,
    In my form iam printing 12 different pages.In that 11th & 12 th pages are having two different formats and if more records are there for each page i have to print more similar pages.For 12th page iam using main window in that by using command and table nodes iam printing similar pages for 12th one.
    But come to 11th page i don't have more than one main window in my form.So iam unable to use the command node.
    Can anybody help regards to this problem.
    Regards,
    Srinivas Reddy.Ch

    hi Srinivas..
    u don't have multiple main windows in smartform but we can us the same window for multiple number  of pages...
    wht u need to do is use the CONDITIONS Tab of every node..
    in the check <b>only on page</b> PAGE11.. for the node u want to trigger in page11 and for other node <b>only on page</b> PAGE12 for the node u want to trigger in page12.
    i hope it is clear now.. let me know if u want more clarification.
    Please Close this thread.. when u r problem is solved. Reward if Helpful
    Regards
    Naresh Reddy K

  • Print form  in pdf format

    hi,
    i want to print the form i created in sapscript. how to do that? need to save the form into pdf format and then print it.
    please advise.
    thanks.

    Hi
    This is my routine used to generate a pdf file from print, u need only to get the OTF data from CLOSE_FORM fm:
    CALL FUNCTION 'CLOSE_FORM'
             TABLES
                  OTFDATA                  = T_OTF
             EXCEPTIONS
                  UNOPENED                 = 1
                  BAD_PAGEFORMAT_FOR_PRINT = 2
                  SEND_ERROR               = 3
                  SPOOL_ERROR              = 4
                  OTHERS                   = 5.
        IF SY-SUBRC <> 0.
          MESSAGE I208(00) WITH 'Errore chiusura stampa'(A02).
        ELSE.
          PERFORM DOWNLOAD_PDF.
        ENDIF.
    FORM DOWNLOAD_PDF.
      DATA: BIN_FILESIZE TYPE I.
      DATA: T_FILE_PDF     TYPE STANDARD TABLE OF TLINE,
            DOCTAB_ARCHIVE TYPE STANDARD TABLE OF  DOCS.
      DATA: FILE_TABLE     TYPE FILETABLE WITH HEADER LINE.
      DATA: RC          TYPE I,
            USER_ACTION TYPE I.
      DATA: TITLE    TYPE STRING,
            FILENAME TYPE STRING.
      CHECK P_PDF = 'X'.
      CALL FUNCTION 'CONVERT_OTF_2_PDF'
           IMPORTING
                BIN_FILESIZE           = BIN_FILESIZE
           TABLES
                OTF                    = T_OTF
                DOCTAB_ARCHIVE         = DOCTAB_ARCHIVE
                LINES                  = T_FILE_PDF
           EXCEPTIONS
                ERR_CONV_NOT_POSSIBLE  = 1
                ERR_OTF_MC_NOENDMARKER = 2
                OTHERS                 = 3.
      IF SY-SUBRC <> 0.
        MESSAGE I208(00) WITH 'Errore conversione PDF'(A03).
        EXIT.
      ENDIF.
      TITLE = 'Creare File'(T02).
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
         EXPORTING
           WINDOW_TITLE            = TITLE
           DEFAULT_EXTENSION       = '*.pdf'
        CHANGING
          FILE_TABLE              = FILE_TABLE[]
          RC                      = RC
          USER_ACTION             = USER_ACTION
        EXCEPTIONS
          FILE_OPEN_DIALOG_FAILED = 1
          CNTL_ERROR              = 2
          ERROR_NO_GUI            = 3
          OTHERS                  = 4
      IF SY-SUBRC <> 0.
        MESSAGE I208(00) WITH 'Errore creazione PDF'(A04).
        EXIT.
      ELSE.
        IF USER_ACTION = 9. EXIT. ENDIF.
        IF RC = 1.
          READ TABLE FILE_TABLE INDEX 1.
        ENDIF.
      ENDIF.
      MOVE FILE_TABLE-FILENAME TO FILENAME.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
        EXPORTING
           BIN_FILESIZE            = BIN_FILESIZE
           FILENAME                = FILENAME
           FILETYPE                = 'BIN'
        CHANGING
          DATA_TAB                = T_FILE_PDF
        EXCEPTIONS
          FILE_WRITE_ERROR        = 1
          NO_BATCH                = 2
          GUI_REFUSE_FILETRANSFER = 3
          INVALID_TYPE            = 4
          NO_AUTHORITY            = 5
          UNKNOWN_ERROR           = 6
          HEADER_NOT_ALLOWED      = 7
          SEPARATOR_NOT_ALLOWED   = 8
          FILESIZE_NOT_ALLOWED    = 9
          HEADER_TOO_LONG         = 10
          DP_ERROR_CREATE         = 11
          DP_ERROR_SEND           = 12
          DP_ERROR_WRITE          = 13
          UNKNOWN_DP_ERROR        = 14
          ACCESS_DENIED           = 15
          DP_OUT_OF_MEMORY        = 16
          DISK_FULL               = 17
          DP_TIMEOUT              = 18
          FILE_NOT_FOUND          = 19
          DATAPROVIDER_EXCEPTION  = 20
          CONTROL_FLUSH_ERROR     = 21
          OTHERS                  = 22
      IF SY-SUBRC <> 0.
        MESSAGE I208(00) WITH 'Errore creazione PDF'(A04).
        EXIT.
      ELSE.
        MESSAGE S208(00) WITH 'File creato con successo'(S01).
      ENDIF.
      CHECK P_OPEN = 'X'.
      CALL FUNCTION 'CALL_BROWSER'
           EXPORTING
                URL                    = FILE_TABLE-FILENAME
           EXCEPTIONS
                FRONTEND_NOT_SUPPORTED = 1
                FRONTEND_ERROR         = 2
                PROG_NOT_FOUND         = 3
                NO_BATCH               = 4
                UNSPECIFIED_ERROR      = 5
                OTHERS                 = 6.
      IF SY-SUBRC <> 0.
        MESSAGE S208(00) WITH 'Impossibile aprire file'(A05).
      ENDIF.
    ENDFORM.                    " DOWNLOAD_PDF
    Max

  • How to convert message in XI into PDF format

    Hi,
    I am trying out a scenario where i am getting an idoc from SAP into XI and now in XI i need to convert the data into pdf format and send that pdf in a mail using mail adapter.
    Can any body help me out how to convert a message in XI to pdf format.
    Thanks in Advance!!
    Regards,
    Sudheer

    Hi Sudheer
    follow these links
    http://www.erpgenie.com/sap/sapedi/Conversion%20of%20IDOCs%20to%20XML%20format.pdf
    Here is the complete code for you;
    It Converts spool request into PDF document and emails it.
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    Smartform as attachment in mail. - 46k
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/convert-smartforms-form-in-pdf-998715 - 87k
    SMART form to PDF
    https://wiki.sdn.sap.com/wiki/display/Snippets/ConvertSmartformtoPDFformat
    smartform to MAIL
    https://wiki.sdn.sap.com/wiki/display/Snippets/SmartformtoMailasPDF+attachment
    Regards
    Sandeep Sharma
    PS: if helpful kindly reward points

  • Converting the WAD applications into PDF format

    Hi SAPians,
    I'm in need to convert WAD results into PDF Format using SAP BW 3.5 and Acrobat Reader 7.0. And I've referred some documents in Net, But,they gave ideas only for 3.5 and Acorobat 5 version.
    But i've to convert the WAD results into PDF format only by using Acrobat Reader 7.0. So, kindly let me know the steps to do so.
    Thanks in Advance.
    Jayaprakash J

    Hi Shahid syed,
    Thanks for your reply.
    It was very useful.
    But, i've askd the solution for sap bw 3.5 with Acrobat reader 7.0.
    So, plz let me knw if any solutions for that to make wad reports into pdf format.
    Points will be awarded.
    Thanks & Regards
    Jayaprakash J

  • How to cange sap form into pdf form

    hai friends,
    we have run payroll got  remuneration statement
    now the client wants the remuneration form should be in pdf form
    how to convert it into pdf form
    any clue plz
    kumari

    Hi,
    We are using Software called CutePDF write to print Rem Statement in PDF format.
    Search on google you will get that.
    Arti

  • How to convert Classical Report into PDF format..........

    Hi Experts,
    I have written a classical report with write statements and when i am downloading in excel the format is mismatching and now i want to convert into PDF format.
    How to convert into PDF format from Classical report ?
    Yusuf

    Hi yusuf,
    please find the below report,,
    please make two include programs before executing it,
    there codes are pasted below,
    INCLUDE zimpr_data_declaration.
    INCLUDE zimpr_performs_wrap.
    REPORT  zimpr_word_wrap NO STANDARD PAGE HEADING LINE-SIZE 115..
                INCLUDE for DATA DECLARATION                               *
    INCLUDE zimpr_data_declaration.
                INCLUDE for all performs.                                  *
    INCLUDE zimpr_performs_wrap.
    TOP-OF-PAGE--
    TOP-OF-PAGE.
      PERFORM f_top_page.                     "TOP OF THE REPORT PAGE,I.E. HEADER.
    START-OF-SELECTION.
      SET PF-STATUS 'SEL_SCREEN'.             "PF-STATUS OF THE SELECTION SCREEN.
      PERFORM f_data_retrieval.               "PERFORM FOR ALL SELECT STATEMENTS.
      PERFORM f_report_display.               "REPORT DISPLAY,WRITE STATEMENTS.
    --Define the actions to be performed for pf-status-----
    AT USER-COMMAND.
      wf_ok_code = sy-ucomm.
      wf_save_ok = wf_ok_code.
      CLEAR wf_ok_code.
      CASE wf_save_ok.
        WHEN 'PDF'.          "WHEN PDF ICON IS CLICKED,REPORT WILL CONVERT INTO PDF.
          loc_repid  = sy-repid.   "PROGRAM NAME
    --THIS FM SETS  THE PARAMETERS FOR LAYOUT OF PDF OUTPUT--
          CALL FUNCTION 'GET_PRINT_PARAMETERS'
            EXPORTING
              layout                 = loc_paart             "LANDSCAPE LAYOUT
              line_size              = loc_linsz                  "CHARACTER WIDTH OF REPORT
              no_dialog              = 'X'
              user                   = sy-uname              "USERNAME
            IMPORTING
              out_parameters         = loc_print_parms        "OUTPUT PARAMETERS WILL BE COLLECTED HERE.
              valid                  = loc_valid
            EXCEPTIONS
              archive_info_not_found = 1
              invalid_print_params   = 2
              invalid_archive_params = 3
              OTHERS                 = 4.
    --FOR GENERATING THE SPOOL NUMBER--
          NEW-PAGE PRINT ON NO DIALOG PARAMETERS loc_print_parms.                        " This allocates the spool no
          "to the screen without the dialog screen.
          PERFORM f_top_page.
          PERFORM f_report_display.
          NEW-PAGE PRINT OFF.                                                      "This marks the end of the screen for which the spool no was generated.
          wf_id = sy-spono.                                                      " This assign the spool no of the screen to the variable.
    --PERFORM FOR GETTING THE PDF OUTPUT--
          PERFORM f_pdf_display.
    --PERFORM FOR DOWLOADING FILE TO A LOCAL DISK--
          PERFORM f_download_local.
        WHEN 'BACK'.
          LEAVE PROGRAM.
      ENDCASE.
    include data declaration----
    *&  Include           ZIMPR_DATA_DECLARATION
    TYPE-POOLS : shlp.
    DATA : wf_ordert TYPE aufk-auart.                      "ORDER TYPE
    DATA : wf_order TYPE aufk-aufnr.                       "ORDER NUMBER
    DATA : wf_bdate TYPE afko-gstrp.                       "BASIC START DATE
    DATA : wf_status(4) TYPE c ."rihea-i_astatin.                 "STATUS
    DATA : wf_objnr TYPE jest-objnr VALUE 'OR%'.           "Object number
    DATA : wf_aufnr TYPE aufk-aufnr.
    DATA : wf_name TYPE thead-tdname.                      "NAME TO PASS IN FM READ_TEXT
    DATA : wf_date1(12) TYPE c.                            "DATE
    DATA : wf_i1(3) TYPE n,wc_i1(3) TYPE n VALUE '1'.      "COUNTERS FOR REPORT DISPLAY
    DATA : wf_i2(3) TYPE n,wc_i2(3) TYPE n VALUE '1'.
    DATA : wf_kopf TYPE tdid VALUE 'KOPF',wf_aufk TYPE tdobject VALUE 'AUFK'.
    DATA : wf_save_ok TYPE sy-ucomm ,wf_ok_code TYPE sy-ucomm.
    DATA: wf_id TYPE tsp01-rqident ,                         " For storing Spool request number
          wf_bytes TYPE i .                                  " For storing the bytes of data to be converted to PDF.
    DATA : wf_langu(2) TYPE c VALUE 'EN'.
    DATA: wf_pripar TYPE pri_params,                         " Structure for Passing Print Parameters
          wf_rcpar TYPE arc_params.                          " ImageLink structure
    DATA : wf_statu TYPE dfies-fieldname VALUE 'STATUS',
           wf_field TYPE help_info-dynprofld VALUE 'S_STATUS'.
    &--SELECTION SCREEN--
    SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-000.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS:  s_ordert FOR wf_ordert .                  "ORDER TYPE
    SELECT-OPTIONS:  s_order FOR wf_order OBLIGATORY.          "ORDER NUMBER
    SELECT-OPTIONS:  s_bdate FOR wf_bdate.                      "BASIC START DATE
    SELECT-OPTIONS:  s_status FOR wf_status matchcode object zei_sys .  "SYSTEM STATUS
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN END OF BLOCK b_1.
    *--INTERNAL TABLES--
    TYPES : BEGIN OF ty_aufk,
          aufnr TYPE aufk-aufnr,              "OREDR NUMBER
          auart TYPE aufk-auart,              "ORDER TYPE
          objnr TYPE aufk-objnr,              "OBJECT NUMBER
          ktext type aufk-ktext,              "SHORT TEXT
          gstrp TYPE afko-gstrp,              "BASIC START DATE
          END OF ty_aufk.
    TYPES : BEGIN OF ty_tj02t,
          objnr TYPE aufk-objnr,              "OBJECT NUMBER
          txt04 TYPE tj02t-txt04,             "STATUS
          istat TYPE tj02t-istat,             "Object status
          spras TYPE tj02t-spras,             "LANGUAGE KEY
          END OF ty_tj02t.
    TYPES : BEGIN OF ty_temp,
          objnr TYPE aufk-objnr,
          status(300) TYPE c,
           END OF ty_temp.
    TYPES : BEGIN OF ty_wrap,
           line(54) TYPE c,                     "LONG TEXT
           END OF ty_wrap.
    TYPES : BEGIN OF ty_wrap2,
           line(25) TYPE c,                     "STATUS
           END OF ty_wrap2.
    TYPES : BEGIN OF ty_f4,
            txt04 TYPE tj02t-txt04,
            txt30 TYPE tj02t-txt30,
            END OF ty_f4.
    types :  begin of ty_sta,
            istat type tj02t-istat,
            objnr type jest-objnr,
            end of ty_sta.
    data : int_sta type table of ty_sta with header line.
    DATA : int_f4 TYPE TABLE OF ty_f4 WITH HEADER LINE.
    DATA: int_pdf TYPE TABLE OF tline WITH HEADER LINE.            "TABLE FOR PDF CONVERSION
    DATA: int_wrap TYPE TABLE OF ty_wrap WITH HEADER LINE.         "TABLE FOR LONGTEXT
    DATA: int_wrap2 TYPE TABLE OF ty_wrap2 WITH HEADER LINE.       "TABLE FOR STATUS
    DATA: int_temp TYPE TABLE OF ty_temp WITH HEADER LINE.         "Table for concatenation of system status.
    DATA: int_aufk TYPE TABLE OF ty_aufk WITH HEADER LINE.
    DATA: int_tj02t TYPE TABLE OF ty_tj02t WITH HEADER LINE.
    DATA: int_tline TYPE STANDARD TABLE OF tline WITH HEADER LINE. "TABLE FOR READ_TEXT.
    DATA : int_fld TYPE TABLE OF dfies ,wa_fld LIKE LINE OF int_fld.                     " Field Type for FM for F4 help
    DATA :int_return   TYPE TABLE OF ddshretval WITH HEADER LINE .
    DATA:
      loc_print_parms LIKE pri_params,          "PRINT PARAMETERS
      loc_valid(1)      TYPE c,
      loc_file type SDOK_CHTRD,
      loc_bytecount     TYPE i,                 "NUMBER OF BYTES TRANSFERRED
      loc_length        TYPE i,                 "LINE-LENGTH
      loc_rqident       LIKE tsp01-rqident,     "SPOOL NUMBER
      loc_rq2name(12)   TYPE c.
    DATA: loc_filename LIKE rlgrap-filename.     "FILENAME
    DATA:loc_repid LIKE sy-repid,                    " Report to execute
         loc_linsz LIKE sy-linsz VALUE 115,          " Line size
         loc_paart LIKE sy-paart VALUE 'X_65_132'.   " Paper Format
    Include           ZIMPR_PERFORMS_WRAP----
    *&  Include           ZIMPR_PERFORMS_WRAP
    *&      Form  f_top_page
         top-of the page
    -->  p1        text
    <--  p2        text
    FORM f_top_page .
    *--HEADER--
      FORMAT COLOR 1 .
      WRITE : text-010.
      FORMAT COLOR 1 OFF.
      WRITE : / text-011,sy-datum NO-GAP.
      WRITE : / text-012,sy-uzeit NO-GAP,90 text-013,101 sy-uname.
      ULINE .
      FORMAT COLOR 1 INTENSIFIED OFF .
      WRITE : 1 sy-vline,                "HEADINGS
      2 text-014 NO-GAP,
      7 sy-vline,
      8 text-015 NO-GAP,
      20 sy-vline,
      21 text-016 NO-GAP,
      76 sy-vline,
      77 text-017 NO-GAP,
      88 sy-vline,
       89 text-018  NO-GAP,
      115 sy-vline.
      WRITE : /1 sy-vline,
        2 text-019 NO-GAP,7 sy-vline,
        20 sy-vline,76 sy-vline,77 text-020 NO-GAP,88 sy-vline,115 sy-vline.
      ULINE.
      FORMAT COLOR 1 OFF.
    ENDFORM.                    " f_top_page
    *&      Form  f_data_retrieval
         select statements
    -->  p1        text
    <--  p2        text
    FORM f_data_retrieval .
    SELECTING ORDER TYPE,ORDER NO.,OBJECT NO. AND BASIC START DATE
      SELECT  p~aufnr
               p~auart
               p~objnr
               p~ktext
               r~gstrp
               FROM  ( aufk AS p INNER JOIN afko AS r ON raufnr = paufnr )
               INTO TABLE int_aufk
               WHERE p~aufnr IN s_order AND
                     p~auart IN s_ordert AND
                     r~gstrp IN  s_bdate AND
                     p~objnr LIKE wf_objnr.
      IF sy-subrc <> 0.
        MESSAGE s101(zipm).                "no values found for selection criteria.
        STOP.
      ENDIF.
      SORT int_aufk BY aufnr.
      DELETE ADJACENT DUPLICATES FROM int_aufk.
      SELECT q~istat
           p~objnr
           FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
           INTO TABLE int_sta
           FOR ALL ENTRIES IN int_aufk
           WHERE p~objnr = int_aufk-objnr
                 AND q~txt04 IN s_status and
                 q~spras = wf_langu and
                 p~inact = ''.
      IF sy-subrc <> 0.
        MESSAGE s101(zipm).                "no values found for selection criteria.
        STOP.
      ENDIF.
      SORT int_sta BY objnr.
      DELETE ADJACENT DUPLICATES FROM int_sta.
    *--SELECTING OBJECT NO.,STATUS AND LANGUAGE--
      IF int_sta[] IS NOT INITIAL.
        SELECT p~objnr
               q~txt04
               q~istat
               q~spras
               FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
               INTO TABLE int_tj02t
               FOR ALL ENTRIES IN int_sta
               WHERE p~inact = '' AND
                     p~objnr = int_sta-objnr AND
                     q~spras = wf_langu AND
                    q~txt04 IN s_status AND
                     p~objnr LIKE wf_objnr.
        IF sy-subrc <> 0.
          MESSAGE s101(zipm).               "no values found for selection criteria.
          STOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f_data_retrieval
    *&      Form  f_report_display
          report display
    -->  p1        text
    <--  p2        text
    FORM f_report_display .
      LOOP AT int_tj02t.              "concatenating the status into a internal table
        AT NEW objnr.
          CLEAR int_temp-status.
        ENDAT.
        CONCATENATE int_temp-status int_tj02t-txt04 INTO int_temp-status SEPARATED BY space.
        AT END OF objnr.
          int_temp-objnr = int_tj02t-objnr.       "key field.
          APPEND int_temp.
          CLEAR int_temp.
        ENDAT.
        CLEAR int_tj02t.
      ENDLOOP.
      LOOP AT int_aufk.
        CONCATENATE sy-mandt int_aufk-aufnr INTO wf_name .    "concatenating client number and order number
    *--THIS FM CAPTURES THE LONG TEXT AND STORES IT IN INTERNAL TABLE--
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            id                      = wf_kopf         "TEXT ID
            language                = sy-langu       "LANGUAGE
            name                    = wf_name        "TEXT NAME
            object                  = wf_aufk         "TEXT OBJECT
          TABLES
            lines                   = int_tline      "LINES OF LONG TEXT.
          EXCEPTIONS
            id                      = 1
            language                = 2
            name                    = 3
            not_found               = 4
            object                  = 5
            reference_check         = 6
            wrong_access_to_archive = 7
            OTHERS                  = 8.
        IF sy-subrc <> 0.
          int_tline-tdline = int_aufk-ktext.
          APPEND int_tline.
          CLEAR :int_tline.
        ENDIF.
        LOOP AT int_tline.
    *--THIS FM WRAPS THE LONG TEXT INTO 54 CHARACTERS EACH--
          CALL FUNCTION 'RKD_WORD_WRAP'
            EXPORTING
              textline            = int_tline-tdline          "LONG TEXT LINE
              outputlen           = 54                        "OUTPUT LENGTH
            TABLES
              out_lines           = int_wrap                  "INTERNAL TABLE
            EXCEPTIONS
              outputlen_too_large = 1
              OTHERS              = 2.
          IF sy-subrc <> 0.
            CLEAR :int_tline.
          ENDIF.
        ENDLOOP.
    *-- THIS FM WRAPS THE STATUS INTO 25 CHARACTERS EACH--
        READ TABLE int_temp WITH KEY objnr = int_aufk-objnr.
        CALL FUNCTION 'RKD_WORD_WRAP'
          EXPORTING
            textline            = int_temp-status
            outputlen           = 25
          TABLES
            out_lines           = int_wrap2
          EXCEPTIONS
            outputlen_too_large = 1
            OTHERS              = 2.
        IF sy-subrc <> 0.
         CONTINUE.
        ENDIF.
        IF NOT int_wrap2[] IS INITIAL.
          ULINE AT (115).
        ENDIF.
        DESCRIBE TABLE int_wrap LINES wf_i2.         "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP
        DESCRIBE TABLE int_wrap2 LINES wf_i1.        "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP2
        WHILE ( wc_i1 LE wf_i1 OR wc_i2 LE wf_i2 ).
          IF ( wc_i2 LE wf_i2 ).
            READ TABLE int_wrap INDEX wc_i2 .        "READING THE INTERNAL TABLE INT_WRAP WITH INDEX
            wc_i2 = wc_i2 + 1.
          ENDIF.
          IF ( wc_i1 LE wf_i1 ).
            READ TABLE int_wrap2 INDEX wc_i1 .       "READING THE INTERNAL TABLE INT_WRAP2 WITH INDEX
            wc_i1 = wc_i1 + 1.
          ENDIF.
    *--THIS FM CONVERTS THE DATE FROM SYSTEM FORMAT TO OUTPUT FORMAT--
          CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
            EXPORTING
              input  = int_aufk-gstrp
            IMPORTING
              output = wf_date1.
          IF NOT int_wrap2[] IS INITIAL .
    *--REPORT DISPLAY--
            WRITE : /1 sy-vline, 2 int_aufk-auart COLOR = 4 INTENSIFIED OFF NO-GAP ,
                    7 sy-vline ,8 int_aufk-aufnr COLOR = 4 INTENSIFIED OFF NO-GAP,
                    20 sy-vline,21 int_wrap-line,
                    76 sy-vline ,77  wf_date1 ,
                    88 sy-vline ,89 int_wrap2-line,
                    115 sy-vline.
    *--CLEARING THE VARIABLES--
            wf_date1 = ''.
            CLEAR: int_aufk,int_temp,int_wrap2-line,int_wrap-line.
          ENDIF.
        ENDWHILE.
        wc_i1 = 1.
        wc_i2 = 1.
        CLEAR :int_wrap,int_wrap2.
        REFRESH : int_wrap,int_wrap2,int_tline.
      ENDLOOP.
      ULINE AT (115).
    ENDFORM.                    " f_report_display
    *&      Form  F_PDF_DISPLAY
         pdf conversion
    -->  p1        text
    <--  p2        text
    FORM f_pdf_display .
    *--THIS FM CONVERTS THE SPOOL REQUEST INTO PDF REPORT--
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid              = wf_id                 "SPOOL NUMBER
          no_dialog                = space
          pdf_destination          = 'X'
        IMPORTING
          pdf_bytecount            = loc_bytecount        "NUMBER OF BYTES TRANSFERRED
        TABLES
          pdf                      = int_pdf                                  "TABLE FOR PDF REPORT
        EXCEPTIONS
          err_no_abap_spooljob     = 1
          err_no_spooljob          = 2
          err_no_permission        = 3
          err_conv_not_possible    = 4
          err_bad_destdevice       = 5
          user_cancelled           = 6
          err_spoolerror           = 7
          err_temseerror           = 8
          err_btcjob_open_failed   = 9
          err_btcjob_submit_failed = 10
          err_btcjob_close_failed  = 11
          OTHERS                   = 12.
    ENDFORM.                    " F_PDF_DISPLAY
    *&      Form  f_download_local
         download to local system
    -->  p1        text
    <--  p2        text
    FORM f_download_local .
    ---------------------THIS FM DOWNLOADS THE PDF REPORT INTO LOCAL MACHINE
    data  loc_ret TYPE iwerrormsg.
      CALL FUNCTION 'IW_C_GET_SAPWORKDIR'
       IMPORTING
         SAPWORKDIR       = loc_file
        ERROR_MSG        =  loc_ret
      loc_filename = loc_file.
      if loc_ret is initial.
      concatenate loc_filename '\work order header long text_  ' sy-timlo '.pdf' into loc_filename.
      endif.
      CALL FUNCTION 'DOWNLOAD'
        EXPORTING
          bin_filesize = loc_bytecount      "NO. OF BYTES
          filename     = loc_filename       "DEFAULT FILE NAME
          filetype     = 'BIN'
        IMPORTING
          act_filename = loc_filename
        TABLES
          data_tab     = int_pdf.
    ENDFORM.                    " f_download_local
    if you have any doubts,,
    please revert
    Regards,
    Talwinder

  • I am trying to convert a PDF into a document that can be edited - it's a client feedback form. I am using Adobe forms Central and it's saying that it can't use my document.

    I am trying to convert a PDF into a document that can be edited - it's a client feedback form. I am using Adobe forms Central and it's saying that it can't use my document.

    Hi Michelle ,
    We are extremely sorry that you have had a bad experience with Adobe .
    As far as your issue is concerned ,Acrobat generally prompts for internet connection as it is required to activate the product before you could use it comfortably .Once the product is activated or licensed you would be able to use the software offline .
    This could be the possible reason you are experiencing this .Please check if you have done so and still facing this .And if you have not ,you need to license/activate your product by typing in your credentials ,i.e Adobe ID and password .
    You could also refer the following link to get updated about the activation of your product .
    https://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html#a ctivate-how-to
    Regards
    Sukrit Dhingra

  • How To Generate And Print Reports In PDF Format From EBS With The UTF8 Char

    Hi,
    I want to know How To Generate And Print Reports In PDF Format From EBS With The UTF8 Character Set in R12.0.4.
    Regards

    Refer to Note: 239196.1 - PASTA 3.0 Release Information
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=239196.1
    Or, you can use XML Publisher.
    Note: 551591.1 - Need Latest XML Publisher / BI Publisher Patches For R12
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=551591.1

  • Sandard Smart Form output into PDF format.

    Hi to all,
    Any one please guide me, how  to convert  sandard Smart Form output into PDF format.
    Regards,
    Thanesh

    hi thanesh,
    the below code may help you.
    data: FM_NAME TYPE RS38L_FNAM.
    DATA:       W_BIN_FILESIZE TYPE I,
          T_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
          T_PDF_TAB TYPE TLINE OCCURS 0 WITH HEADER LINE,
          W_FILESIZE TYPE I,
          WA_CTRLOP TYPE SSFCTRLOP,
          WA_OUTOPT TYPE SSFCOMPOP,
          T_OTFDATA TYPE SSFCRESCL.
    call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
        formname                 = <ur form name>
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
    IMPORTING
       FM_NAME                  = FM_NAME
    EXCEPTIONS
       NO_FORM                  = 1
       NO_FUNCTION_MODULE       = 2
       OTHERS                   = 3
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    WA_CTRLOP-GETOTF = 'X'.
    WA_CTRLOP-NO_DIALOG = 'X'.
    WA_OUTOPT-TDNOPREV = 'X'.
    call function <function module generated for ur form>
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS         = WA_CTRLOP
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
       OUTPUT_OPTIONS             = WA_OUTOPT
       USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
       JOB_OUTPUT_INFO            = T_OTFDATA
      JOB_OUTPUT_OPTIONS         =
    EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 4
       OTHERS                     = 5
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    T_OTF[] = T_OTFDATA-OTFDATA[].
    call function 'CONVERT_OTF'
    EXPORTING
       FORMAT                      = 'PDF'
       MAX_LINEWIDTH               = 132
      ARCHIVE_INDEX               = ' '
      COPYNUMBER                  = 0
    IMPORTING
       BIN_FILESIZE                = W_BIN_FILESIZE
      BIN_FILE                    =
      tables
       OTF                         = T_OTF
        LINES                       = T_PDF_TAB
    EXCEPTIONS
       ERR_MAX_LINEWIDTH           = 1
       ERR_FORMAT                  = 2
       ERR_CONV_NOT_POSSIBLE       = 3
       ERR_BAD_OTF                 = 4
       OTHERS                      = 5
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function 'WS_DOWNLOAD'
    EXPORTING
       BIN_FILESIZE                  = W_BIN_FILESIZE
      CODEPAGE                      = ' '
       FILENAME                      = 'D:\TEST11.PDF'
       FILETYPE                      = 'BIN'
      MODE                          = ' '
      WK1_N_FORMAT                  = ' '
      WK1_N_SIZE                    = ' '
      WK1_T_FORMAT                  = ' '
      WK1_T_SIZE                    = ' '
      COL_SELECT                    = ' '
      COL_SELECTMASK                = ' '
      NO_AUTH_CHECK                 = ' '
    IMPORTING
       FILELENGTH                    = W_FILESIZE
      tables
        data_tab                      = T_PDF_TAB
      FIELDNAMES                    =
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_WRITE_ERROR              = 2
       INVALID_FILESIZE              = 3
       INVALID_TYPE                  = 4
       NO_BATCH                      = 5
       UNKNOWN_ERROR                 = 6
       INVALID_TABLE_WIDTH           = 7
       GUI_REFUSE_FILETRANSFER       = 8
       CUSTOMER_ERROR                = 9
       NO_AUTHORITY                  = 10
       OTHERS                        = 11
    if sy-subrc = 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    WRITE: / 'SUCCESSFULLY CONVERTED'.
    endif.

  • Smartforms: How 2 fire print & download 2 PDF simultaniously 4  my forms

    Dear Murugesh, Cristian
      The following is my piece of code which directly downloads my forms into PDF but not creating any spool 4 firing print ,
    1) I need the both to happen simultaniously .
    2) I need to include the o/p(either SAPScript/report o/p) as the Smartform pages with o/p of my Driver prog ,by calling another TCODE from my driver prog .
    Please throw some light on this .
    have a look into my code
    *Printing of Export Invoice, Packing List,Enclosure to Packing List &  *
    *Case Marking in one SMART FORMS Layout                                *
    REPORT ZSD_REP_MULTI_PRINT.
    TABLES :
        vbak,
        vbap,
        vbpa,
        vbfa,
        VBRK,
        VBRP,
        LIKP,
        LIPS,
        KONV,
        objk,
        tvko,
        ser01,
        sadr,
        equi,
        makt,
        mast,
        t005t,
        kna1,
        t001w,
        T001,
        ADRC,
        sscrfields,
        zpp_plcmi,      "Packing list history For Conf: Item data
        zplh,           "PACKING LIST HISTORY : HEADER DATA
        zpli.           "PACKING LIST HISTORY : ITEM DATA
    DATA: FM_NAME1  TYPE RS38L_FNAM,
          FM_NAME2  TYPE RS38L_FNAM,
          FM_NAME3  TYPE RS38L_FNAM,
          FM_NAME4  TYPE RS38L_FNAM,
          P_E_DEVTYPE TYPE RSPOPTYPE,
          P_JOB_OUTPUT_INFO TYPE SSFCRESCL OCCURS 2000 WITH HEADER LINE,
          T_OTF LIKE ITCOO OCCURS 0 WITH HEADER LINE,
          P_OUTPUT_OPTIONS TYPE SSFCOMPOP OCCURS 0 WITH HEADER LINE,
          P_CONTROL_PARAMETERS TYPE SSFCTRLOP OCCURS 0 WITH HEADER LINE ,
          P_DOC  LIKE DOCS OCCURS 2000 WITH HEADER LINE,
          P_LINES LIKE TLINE OCCURS 200,
          P_BIN_FILESIZE TYPE I,
          P_LANGUAGE TYPE SFLANGU,
          P_BIN_FILE TYPE XSTRING,
          OK_CODE LIKE SY-UCOMM.
    DATA: T_ITEM   TYPE  ZSD_TABL_LITEM,
          WA_ITEM  TYPE  ZSD_STRUCT_LITEM,
          T_ADRS   LIKE  ZSD_STRUCT_ADRS  OCCURS 0 WITH HEADER LINE,
          MSLINES  LIKE  TLINE OCCURS 1 WITH HEADER LINE,
          TIDNO    LIKE STXL-TDID,
          TNAME    LIKE STXL-TDNAME,
          TOBJT    LIKE STXL-TDOBJECT,
          SSORD    LIKE VBAK-VBELN,
          TOT      LIKE VBAK-NETWR,
          WORD     LIKE SPELL.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    PARAMETERS: P_DELNO LIKE  LIKP-VBELN OBLIGATORY,
                P_INVNO LIKE  VBRK-VBELN OBLIGATORY,
                P_DATE  LIKE  SY-DATUM.
    SELECTION-SCREEN END   OF BLOCK blk1.
    AT SELECTION-SCREEN.
      CLEAR T_ADRS.
      REFRESH T_ITEM.
      T_ADRS-INVNO = P_INVNO.
      T_ADRS-INVDAT = P_DATE.
      SELECT SINGLE VBELV INTO  VBFA-VBELV
                             FROM  VBFA
                             WHERE VBELN = P_DELNO
                               AND VBTYP_N = 'J'  .
      SSORD = VBFA-VBELV.
    *Exporter's  Address
      SELECT SINGLE BUKRS_VF INTO  VBAK-BUKRS_VF
                             FROM  VBAK
                             WHERE VBELN = VBFA-VBELV.
      SELECT SINGLE   ADRNR
                      INTO T001-ADRNR
                      FROM T001
                      WHERE BUKRS = VBAK-BUKRS_VF.
      SELECT SINGLE NAME1 STREET CITY1 POST_CODE1 COUNTRY
             INTO (T_ADRS-NAME1,T_ADRS-STREET,T_ADRS-CITY1,
                   T_ADRS-POST_CODE1, ADRC-COUNTRY)
             FROM  ADRC
             WHERE ADDRNUMBER EQ T001-ADRNR.
      SELECT SINGLE LANDX
                    INTO T_ADRS-COUNTRY
                    FROM T005T
                    WHERE     SPRAS = 'EN'
                          AND LAND1 = ADRC-COUNTRY.
    *Consignee Address & Buyer Other Than Consignee
      SELECT SINGLE KUNNR KUNAG INTO (LIKP-KUNNR, LIKP-KUNAG)
                                FROM LIKP WHERE VBELN = P_DELNO.
      IF LIKP-KUNNR = LIKP-KUNAG.
        SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
                  INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,
                        T_ADRS-CCITY,  T_ADRS-CPCODE, T_ADRS-CREGIO,
                        T_ADRS-CTELF1, KNA1-ADRNR)
                  FROM  KNA1
                  WHERE KUNNR = LIKP-KUNNR.
        SELECT SINGLE COUNTRY INTO  ADRC-COUNTRY
                              FROM  ADRC
                              WHERE ADDRNUMBER EQ KNA1-ADRNR.
        SELECT SINGLE LANDX
                    INTO T_ADRS-CCOUNTRY
                    FROM T005T
                    WHERE     SPRAS = 'EN'
                          AND LAND1 = ADRC-COUNTRY.
        T_ADRS-ONAME1   =  T_ADRS-CNAME1 .
        T_ADRS-ONAME2   =  T_ADRS-CNAME2 .
        T_ADRS-OSTREET  =  T_ADRS-CSTREET .
        T_ADRS-OCITY    =  T_ADRS-CCITY.
        T_ADRS-OPCODE   =  T_ADRS-CPCODE .
        T_ADRS-OREGIO   =  T_ADRS-CREGIO.
        T_ADRS-OTELF1   =  T_ADRS-CTELF1 .
        T_ADRS-OCOUNTRY =  T_ADRS-CCOUNTRY.
      ELSE.
        SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
                  INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,
                        T_ADRS-CCITY,  T_ADRS-CPCODE, T_ADRS-CREGIO,
                        T_ADRS-CTELF1, KNA1-ADRNR)
                  FROM  KNA1
                  WHERE KUNNR = LIKP-KUNNR.
        SELECT SINGLE COUNTRY INTO ADRC-COUNTRY
                              FROM  ADRC
                              WHERE ADDRNUMBER EQ KNA1-ADRNR.
        SELECT SINGLE LANDX
                    INTO T_ADRS-CCOUNTRY
                    FROM T005T
                    WHERE     SPRAS = 'EN'
                          AND LAND1 = ADRC-COUNTRY.
    *Buyer Other than Consignee
        SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
                   INTO (T_ADRS-ONAME1, T_ADRS-ONAME2, T_ADRS-OSTREET,
                         T_ADRS-OCITY,  T_ADRS-OPCODE, T_ADRS-OREGIO,
                         T_ADRS-OTELF1, KNA1-ADRNR)
                   FROM  KNA1
                   WHERE KUNNR = LIKP-KUNAG.
        SELECT SINGLE COUNTRY INTO  ADRC-COUNTRY
                              FROM  ADRC
                              WHERE ADDRNUMBER EQ KNA1-ADRNR.
        SELECT SINGLE LANDX
                    INTO T_ADRS-OCOUNTRY
                    FROM T005T
                    WHERE     SPRAS = 'EN'
                          AND LAND1 = ADRC-COUNTRY.
      ENDIF.
    *Other's Ref
      TIDNO = 'Z071'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-OREF = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Buyer's Order No  Ref
      TIDNO = 'Z023'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-BUYER = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Exporter Ref
      TIDNO = 'Z072'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-XPREF = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Pre-Carraige By
      TIDNO = 'Z074'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PCRG = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Place Of reciept by Pre-Carraige
      TIDNO = 'Z073'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PLPCRG = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Vessel/Flight No
      TIDNO = 'Z075'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-VFNO = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Port Of Loading
      TIDNO = 'Z077'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PLOAD = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Port Of Discharge
      TIDNO = 'Z076'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-PDISG = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Final Destination
      TIDNO = 'Z070'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-FDEST = mslines-tdline(25).
        EXIT.
      ENDLOOP.
    *Terms Of Delivery & Payment
      TIDNO = 'Z080'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-TERMS = mslines-tdline(50).
        EXIT.
      ENDLOOP.
    APPEND T_ADRS.
    *BODY SECTION FOR LINE ITEMS
      SELECT POSNR KWMENG VRKME WAERK
             INTO  (VBAP-POSNR, VBAP-KWMENG, VBAP-VRKME, VBAP-WAERK)
             FROM  VBAP
             WHERE VBELN = SSORD.
    *Mark/Case No
        TIDNO = '0002'.
        CONCATENATE SSORD
                    VBAP-POSNR
        INTO        TNAME.
        TOBJT = 'VBBP'.
        PERFORM FINDTEXT.
        LOOP AT MSLINES.
          WA_ITEM-MARKNO = mslines-tdline(40).
          EXIT.
        ENDLOOP.
    *Packing Type
        TIDNO = '0003'.
        CONCATENATE SSORD
                    VBAP-POSNR
        INTO        TNAME.
        TOBJT = 'VBBP'.
        PERFORM FINDTEXT.
        LOOP AT MSLINES.
          WA_ITEM-PACKTYP = mslines-tdline(40).
          EXIT.
        ENDLOOP.
    *Goods Description
        TIDNO = '0001'.
        CONCATENATE SSORD
                    VBAP-POSNR
        INTO        TNAME.
        TOBJT = 'VBBP'.
        PERFORM FINDTEXT.
        LOOP AT MSLINES.
          WA_ITEM-GDESC = mslines-tdline(40).
          EXIT.
        ENDLOOP.
    *Goods Quantity
        WA_ITEM-QTY = VBAP-KWMENG.
        WA_ITEM-VRKME = VBAP-VRKME.
    *Goods Rate
        SELECT SINGLE KNUMV INTO VBAK-KNUMV FROM VBAK WHERE VBELN = SSORD.
        SELECT SINGLE KBETR WAERS
                      INTO  (WA_ITEM-RATE, WA_ITEM-WAERS)
                      FROM  KONV
                      WHERE KNUMV = VBAK-KNUMV
                        AND KPOSN = VBAP-POSNR
                        AND KSCHL = 'PR00'.
    *Item Remarks
        TIDNO = 'ZREM'.
        CONCATENATE SSORD
                    VBAP-POSNR
        INTO        TNAME.
        TOBJT = 'VBBP'.
        PERFORM FINDTEXT.
        LOOP AT MSLINES.
          WA_ITEM-REMARK = mslines-tdline(40).
          EXIT.
        ENDLOOP.
    *Goods Amount
        WA_ITEM-AMOUNT = WA_ITEM-QTY * WA_ITEM-RATE.
        WA_ITEM-WAERK = VBAP-WAERK.
        TOT = TOT + WA_ITEM-AMOUNT.
        APPEND WA_ITEM TO T_ITEM.
      ENDSELECT.
      T_ADRS-TOT = TOT.
      CALL FUNCTION 'SPELL_AMOUNT'
       EXPORTING
         AMOUNT          = TOT
         CURRENCY        = VBAP-WAERK
      FILLER          = ' '
         LANGUAGE        = SY-LANGU
       IMPORTING
         IN_WORDS        = WORD
       EXCEPTIONS
         NOT_FOUND       = 1
         TOO_LARGE       = 2
         OTHERS          = 3
      IF SY-SUBRC <> 0.
           MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *Gross Wieght
      TIDNO = 'Z078'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-GWT = mslines-tdline(15).
        EXIT.
      ENDLOOP.
    *Net Wieght
      TIDNO = 'Z079'.
      TNAME = SSORD.
      TOBJT = 'VBBK'.
      PERFORM FINDTEXT.
      LOOP AT MSLINES.
        T_ADRS-NWT = mslines-tdline(15).
        EXIT.
      ENDLOOP.
      T_ADRS-TOT_WORDS = WORD-WORD.
      APPEND T_ADRS.
    START-OF-SELECTION.
      P_LANGUAGE = 'EN'.
      CALL   FUNCTION 'SSF_GET_DEVICE_TYPE'
        EXPORTING
          I_LANGUAGE    = P_LANGUAGE
          I_APPLICATION = 'SAPDEFAULT'
        IMPORTING
          E_DEVTYPE     = P_E_DEVTYPE.
      P_OUTPUT_OPTIONS-XSFCMODE = 'X'.
      P_OUTPUT_OPTIONS-XSF = SPACE.
      P_OUTPUT_OPTIONS-XDFCMODE = 'X'.
      P_OUTPUT_OPTIONS-XDF = SPACE.
      P_OUTPUT_OPTIONS-TDPRINTER = P_E_DEVTYPE.
      P_OUTPUT_OPTIONS-TDDEST = 'LOHP'.
      APPEND P_OUTPUT_OPTIONS.
      P_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
      P_CONTROL_PARAMETERS-GETOTF = 'X'.
      P_CONTROL_PARAMETERS-NO_CLOSE = SPACE.
      APPEND  P_CONTROL_PARAMETERS.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME                 = 'ZSD_REP_MULTI_PRINT1'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
       IMPORTING
          FM_NAME                  = FM_NAME1
       EXCEPTIONS
          NO_FORM                  = 1
          NO_FUNCTION_MODULE       = 2
          OTHERS                   = 3
      IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION FM_NAME1
       EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
        CONTROL_PARAMETERS         = P_CONTROL_PARAMETERS
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
        OUTPUT_OPTIONS             = P_OUTPUT_OPTIONS
        USER_SETTINGS              = 'X'
      IMPORTING
      DOCUMENT_OUTPUT_INFO       =
        JOB_OUTPUT_INFO            = P_JOB_OUTPUT_INFO
      JOB_OUTPUT_OPTIONS         =
      TABLES
        T_ADRS                     = T_ADRS
        T_ITEM                     = T_ITEM
    EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 4
       OTHERS                     = 5
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT P_JOB_OUTPUT_INFO-OTFDATA INTO T_OTF.
        APPEND T_OTF.
      ENDLOOP.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME                 = 'ZSD_REP_MULTI_PRINT2'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
       IMPORTING
          FM_NAME                  = FM_NAME2
       EXCEPTIONS
          NO_FORM                  = 1
          NO_FUNCTION_MODULE       = 2
          OTHERS                   = 3
      IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION FM_NAME2
       EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
        CONTROL_PARAMETERS         = P_CONTROL_PARAMETERS
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
        OUTPUT_OPTIONS             = P_OUTPUT_OPTIONS
        USER_SETTINGS              = 'X'
      IMPORTING
      DOCUMENT_OUTPUT_INFO       =
        JOB_OUTPUT_INFO            = P_JOB_OUTPUT_INFO
      JOB_OUTPUT_OPTIONS         =
      TABLES
        T_ADRS                     = T_ADRS
        T_ITEM                     = T_ITEM
    EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 4
       OTHERS                     = 5
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT P_JOB_OUTPUT_INFO-OTFDATA INTO T_OTF.
        APPEND T_OTF.
      ENDLOOP.
    <b>SET PARAMETER  ID: 'AUN' FIELD SSORD ,"VBAK-VBELN VALUE ,
                       'APO' FIELD ITNO."VBAP-POSNR.
    CALL TRANSACTION 'ZPL3' AND SKIP FIRST SCREEN.
    IF SY-SUBRC NE 0.
       MESSAGE E001(ZQOTBANK).
    ENDIF.
    *SET PARAMETER  ID: 'AUN' FIELD VBAK-VBELN,
                     'APO' FIELD VBAP-POSNR.
    *CALL TRANSACTION 'ZA3C' AND SKIP FIRST SCREEN.
    *IF SY-SUBRC NE 0.
    MESSAGE E001(ZQOTBANK).
    *ENDIF.
    IMPORT (T_OTF2) FROM  MEMORY ID 'MEMID'.
    LOOP AT T_OTF2 INTO T_OTF2.
        APPEND T_OTF2 TO T_OTF.
    ENDLOOP.
    </b>
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME                 = 'ZSD_REP_MULTI_PRINT4'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
       IMPORTING
          FM_NAME                  = FM_NAME4
       EXCEPTIONS
          NO_FORM                  = 1
          NO_FUNCTION_MODULE       = 2
          OTHERS                   = 3
      IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION FM_NAME4
       EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
        CONTROL_PARAMETERS         = P_CONTROL_PARAMETERS
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
        OUTPUT_OPTIONS             = P_OUTPUT_OPTIONS
       USER_SETTINGS              = 'X'
      IMPORTING
      DOCUMENT_OUTPUT_INFO       =
        JOB_OUTPUT_INFO            = P_JOB_OUTPUT_INFO
      JOB_OUTPUT_OPTIONS         =
      TABLES
        T_ADRS                     = T_ADRS
        T_ITEM                     = T_ITEM
    EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 4
       OTHERS                     = 5
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT P_JOB_OUTPUT_INFO-OTFDATA INTO T_OTF.
        APPEND T_OTF.
      ENDLOOP.
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
      EXPORTING
        USE_OTF_MC_CMD               = 'X'
      ARCHIVE_INDEX                =
    IMPORTING
        BIN_FILESIZE                 = P_BIN_FILESIZE
    TABLES
        OTF                          = T_OTF
        DOCTAB_ARCHIVE               = P_DOC
        LINES                        = P_LINES
    EXCEPTIONS
       ERR_CONV_NOT_POSSIBLE        = 1
       ERR_OTF_MC_NOENDMARKER       = 2
       OTHERS                       = 3.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        BIN_FILESIZE                    = P_BIN_FILESIZE
        FILENAME                        = 'C:\SD4.pdf'
        FILETYPE                        = 'BIN'
      APPEND                          = ' '
      WRITE_FIELD_SEPARATOR           = ' '
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
    IMPORTING
       FILELENGTH                      = P_BIN_FILESIZE
      TABLES
        DATA_TAB                        = P_LINES
      FIELDNAMES                      =
    EXCEPTIONS
      FILE_WRITE_ERROR                = 1
      NO_BATCH                        = 2
      GUI_REFUSE_FILETRANSFER         = 3
      INVALID_TYPE                    = 4
      NO_AUTHORITY                    = 5
      UNKNOWN_ERROR                   = 6
      HEADER_NOT_ALLOWED              = 7
      SEPARATOR_NOT_ALLOWED           = 8
      FILESIZE_NOT_ALLOWED            = 9
      HEADER_TOO_LONG                 = 10
      DP_ERROR_CREATE                 = 11
      DP_ERROR_SEND                   = 12
      DP_ERROR_WRITE                  = 13
      UNKNOWN_DP_ERROR                = 14
      ACCESS_DENIED                   = 15
      DP_OUT_OF_MEMORY                = 16
      DISK_FULL                       = 17
      DP_TIMEOUT                      = 18
      FILE_NOT_FOUND                  = 19
      DATAPROVIDER_EXCEPTION          = 20
      CONTROL_FLUSH_ERROR             = 21
      OTHERS                          = 22
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *&      Form  FINDTEXT
          text
    FORM FINDTEXT.
      REFRESH mslines.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                  = sy-mandt
          id                      = tidno
          language                = sy-langu
          name                    = tname
          object                  = tobjt
        TABLES
          lines                   = mslines
        EXCEPTIONS
          id                      = 1
          language                = 2
          name                    = 3
          not_found               = 4
          object                  = 5
          reference_check         = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.
      DELETE mslines WHERE tdline IS INITIAL.
    ENDFORM.                    "FINDTEXT 
    Thnx
    moni
    Message was edited by: md monirujjaman
    Message was edited by: md monirujjaman

    Hello,
    I had thought that your 4th output of the Transaction is an output of a list and NOT from a SCRIPT.
    Now, if it is a SAP SCRIPT ourput, it is quite simple as you have to get the OTFDATA from the SCRIPT. But you may have to make the correction in your SAPSCRIPT driver program.
    Sample:
    CALL FUNCTION 'CLOSE_FORM'
         TABLES
              otfdata                  = te_otf_table
         EXCEPTIONS
              unopened                 = 1
              bad_pageformat_for_print = 2
              OTHERS                   = 3.
    Next you may EXPORT this OTF Data Internal Table to ABAP Memory.
    In your program where you are calling all the 3 forms + the transaction which outputs the SAPScript output, the exported data may be imported and appended into the MAIN Interal Table and single PDF could be generated.
    Secondly, The PRINT prieview of the SSFs could be generated by passing Export options of the SSF FM
    SAmple:
    ssfctrlop-no_dialog = ' '.
    CALL FUNCTION l_form
        EXPORTING
             control_parameters = ssfctrlop
             output_options     = ssfcompop
    I hope this helps you.
    Regards, Murugesh AS

  • How to convert the alv list data into pdf format

    Hi Expersts,
                      Is it possible to convert the alv list output data into PDF format? if yes, then please help me with this issue.
    thanks in advance,
    Regards,
    Samad

    hii samad,
    you can go through these link.i hope it ll solve your purpose
    How to convert list output to PDF
    Display ALV list output in PDF format
    regards,
    Shweta

Maybe you are looking for