Smartform : How do i append o/p of  a report(ZA3C) as Smartform Pages

Dear all
I have three smartform pages with a Driver prog .
Now i want 2 append the o/p of mere a report(not   SapScript) as smartform pages .
I m trying 2 achieve that by the following BOLD part of my code .
  Throw some light on this
Thnx in Advance
Moni
Have look at my code plz
*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,
    VBFA,
    LIKP,
    LIPS,
    KONV,
    t005t,
    KNA1,
    t001w,
    T001,
    ADRC.
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,
      T_OTF2 TYPE SSFCRESCL OCCURS 2000 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,
      ITNO     LIKE VBAP-POSNR.
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(50).
    EXIT.
  ENDLOOP.
*Buyer's Order No  Ref
  TIDNO = 'Z023'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-BUYER = mslines-tdline(50).
    EXIT.
  ENDLOOP.
*Exporter Ref
  TIDNO = 'Z072'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-XPREF = mslines-tdline(50).
    EXIT.
  ENDLOOP.
*Pre-Carraige By
  TIDNO = 'Z074'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-PCRG = mslines-tdline(50).
    EXIT.
  ENDLOOP.
*Place Of reciept by Pre-Carraige
  TIDNO = 'Z073'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-PLPCRG = mslines-tdline(50).
    EXIT.
  ENDLOOP.
*Vessel/Flight No
  TIDNO = 'Z075'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-VFNO = mslines-tdline(50).
    EXIT.
  ENDLOOP.
*Port Of Loading
  TIDNO = 'Z077'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-PLOAD = mslines-tdline(50).
    EXIT.
  ENDLOOP.
*Port Of Discharge
  TIDNO = 'Z076'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-PDISG = mslines-tdline(50).
    EXIT.
  ENDLOOP.
*Final Destination
  TIDNO = 'Z070'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-FDEST = mslines-tdline(50).
    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.
    ITNO = VBAP-POSNR.
    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(40).
    EXIT.
  ENDLOOP.
*Net Wieght
  TIDNO = 'Z079'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-NWT = mslines-tdline(40).
    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.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      FORMNAME                 = 'ZSD_REP_MULTI_PRINT3'
  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.
<b>*for capturing the o/p pages from ZPL3 and consolidating into table T_OTF to get single PDF
SET PARAMETER  ID: 'AUN' FIELD SSORD ,
                   'APO' FIELD ITNO.
CALL TRANSACTION 'ZPL3' AND SKIP FIRST SCREEN.
IF SY-SUBRC NE 0.
   MESSAGE E001(ZQOTBANK).
ENDIF.
IMPORT (T_OTF2) FROM  MEMORY ID 'MEMID'.
LOOP AT T_OTF2-OTFDATA INTO T_OTF.
    APPEND T_OTF.
ENDLOOP.</b>
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:\SD6.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

Hello,
You can find out the Spool Request w.r.t the Program by FM RSPO_FIND_SPOOL_REQUESTS.
This Spool Request could be converted to PDF by FM CONVERT_ABAPSPOOLJOB_2_PDF.
P.S.: The Import parameter 'NO_DIALOG' in FM CONVERT_ABAPSPOOLJOB_2_PDF is to be initial. You will be getting a Popup seeking the Path and name of the file to be created. This is because you can direct the Spool list to be created in the same PDF file by appending it into earlier created SSF/SAPScript PDF outputs.
I hope this helps you.
Regards, Murugesh AS

Similar Messages

  • SMARTFORM: how to create 3 copy (each copy can print more than one page)

    SMARTFORM: how to create 3 copy (each copy can print more than one page)
    Hello everyone.
    my user want to have form that print 3 copy.
    such as 1 copy description = master,  2 copy description = copy 1 ,3 copy description = copy 2.
    so i create 3 page . I copy from page 1.
    and in each page there is main window which can have data more than 1 page.(such as have a lot of sale data ,it's take 2 page for show output .so it's take 2 page in each copy)
    please help me.
    how to set page and window in each page for print 3 copy and each page can have main window that print more than 1 page

    Hello Vinit.
    thank you very much for your help.
    could you help me more please.
    in below code
      DO NAST_ANZAL TIMES.
    l_counter = l_counter + 1.  " << pass this to FM and use for the TEXT to print
    CALL FUNCTION LF_FM_NAME
               EXPORTING
                         COUNTER = l_COUNTER   " USE this to derive the text into PRINTOUT
    enddo.
    Now i out of office .so i cannot test.
    where do i set NAST_ANZAL for 3 ?
    can i input ?
    NAST_ANZAL = 3.
      DO NAST_ANZAL TIMES.
    l_counter = l_counter + 1.  " << pass this to FM and use for the TEXT to print
    CALL FUNCTION LF_FM_NAME
               EXPORTING
                         COUNTER = l_COUNTER   " USE this to derive the text into PRINTOUT
    enddo.
    Edited by: dittaporn nanasilp on Mar 12, 2011 3:33 PM

  • How to get the customized value of a Report portlet in a page

    Hi ,
    I have a report portlet and it has a bind variable which users can customize when added to a page. There is a link to a Form page in the report , to which I need to pass the value of bind variable customized by the user. I used :
    portal30.wwv_name_value.get_string( l_arg_names, l_arg_values, '<bind variable>');
    function, it works ok when we run the report alone .But when we add the report as a portlet in page , it does not return any value. How do I get the customized field value in a page.
    null

    SAN.
    I haven't tested but u can try with the below code...
    OATableBean tableBean = ...;
    OATableFooterBean tableFooterBean = tableBean.getFooter();
    if (tableFooterBean != null)
      OATotalRowBean totalRowBean = tableFooterBean.getTotal();
      totalRowBean.getValue("Re-Total");
    }Regards,
    Gyan

  • How can I print a free format style report that is 3 pages long

    You may say this would be like a letter format (no columns), but is actually a formatted document. It is on 3 pages. I was instructed by a Oracle reports teacher to place on multiple frames with page protect to fix my problem of text for one line of text to appear on two pages. I tried this, but it did not work.
    I've had to specify 3 panels to accommodate for the 3 pages of text. I've made the frames vertically expandable for varied body of text.
    Thanks ahead of time,
    Jeannie

    hi ,
    see if this can solve your problem
    in reports 6, in the object navigator...u have three sections within the Layout Model...viz ... Header Section, Main Section and the Trailer Section. u just need to go to the properties of the Main Section and set the Verticals panels per page property to the desired number of pages across which u wanna span ur record. and put in the corresponding frames and fields within them
    null

  • How to display the  text in a classical report before top-of-page?

    Hi all,
    I am developing a classical report with top-of-page because i want to display the texts of cloumns  even users scroll down the output.
    But here the problem is i have to display a text and selection screen values in the ouput ,Before this top-of-page. But i couldn't find the way to do it.
    Please help me on solving this problem?
    Thanks,
    Vamshi.

    Hi Vamsi,
    whenever there is write statement and you are going to display some thing the system checks for the TOP-OF-PAGE and we are helpless here
    so declare your heading in the TOP-OF-PAGE only
    THIS is SAP provided way of the SYSTEM bahaviour
    Regards
    ramchander Rao.k

  • How can i append the variable to filename in import statement?

    how can i append variable(substitution variable) to file name in import command for maxL?
    example : For suppose there is a file like "dataload.txt" and a variable like cur_month(august).How can i rename the file like daload_august in import statement.
    Edited by: 788996 on Aug 22, 2010 11:18 PM

    Are you saying you want to use an OS level environment variable in a MaxL statement to substitute for an entire file name? I am going to illustrate Windows, but do it your own way in *nix if you want.
    YourCallingCode.cmd
    REM Note the \\ and then the \\, you had \\ and \
    SET curmon=c:\\ABC\\datafile_21_AUG.txt 
    REM Call MaxL with a paramenter
    startMaxL.cmd DoItForTheCurrentMonth.msh %curmon%DoItForTheCurrentMonth.msh
    login blah blah for blah ;
    import database appname.dbname data from local text data_file $curmon using server rules_file "rulefile"
         on error abort ;The trick is to change whatever's in % and % and replace it with a $ in the MaxL script.
    I gave a presentation last year on MaxL at ODTUG Kaleidoscope. If you go to http://www.odtug.com, then Tech Resources, then Essbase, then search on my name, you'll find "Master Essbase with MaxL Automation". More than you could ever want to know about MaxL, variables (parameter, environment, and explicitly declared), scripting, etc., etc., are all there for the taking. If you're not already a member, you'll have to join, but an associate membership is free. You can then download my presentation and all of the others. It is a treasure chest of technical tips and knowledge.
    Yes, I am a fan a member of the Hyperion SIG, so I am ever so slightly biased. Regardless, it is good information, for free.
    Regards,
    Cameron Lackpour
    Edited by: CL on Aug 24, 2010 5:33 AM
    If you want to substitute part of the data file name, you can do that too:
    set curmon=21_AUG
    Your MaxL statement would look like:
    import database appname.dbname data from local text data_file "c:\\ABC\\datafile_$curmon.txt" using server rules_file "rulefile"
         on error abort ;

  • How can we append data in existing flat file

    how can we append data to a existing flat file (Text file).

    just fill the itab from data which suppose to append to text file.than read text file from GUI_UPLOAD and loop on itab and with the use of read statements you may append the data.

  • How to increase the row height of the table in the smartform

    Hi,
    Can any one say,
    How to increase the row height of the table in the smartform.
    It is presently show the row width very small, i want to increase the row with of the table in the smartform.
    Plase say how can we increase the row height in the smartform.

    Hi Ravi,
         In Smartforms , Select the Table and you can adjust the cell hieghts in OUTPUT OPTIONs TAB.
        Reward points if that Helps.
    Manish

  • In the smartform how to change the company adress in the standard form

    Dear experts,
    In the smartform how to change the company adress in the standard form.
    Regards,
    Balakrishna R.V

    Hi,
    Go through this link below:
    change in SAP Standard Address
    Hope it helps
    Regards
    Mansi

  • Loop in smartform - how to make values valid in all pages

    Hi All.
    I have a smartforms with several pages (9). I must print these 9 pages once for each line in the internal table ITAB. When I put a loop in the first page, the data under that loop is printed correctly, but every text node outside the loop always prints the last line of ITAB.
    Do any of you know how to make the data in the loop valid throughout the other pages?
    any help will be welcome.
    thanks,
    Hermes.

    I got it. The main window must be the first one in the first page. The loop must be inside the main window, and bellow the loop there must be a page-break command.

  • How to import a logo from flat file to SAP in SMARTFORM.

    how to import a logo from flat file to SAP in SMARTFORM. i need to know whether TIFF format is used and also the full steps.
    Thanks,

    Hi,
    You can not directly use a logo from a file into a Smart form. First you will have to upload it to SAP. This has to be done only once. Once it is imported into SAP then you can use it in smart form. To import a logo to SAP, goto SE78. Open the tree under GRAPHICS. Select the file type and click on the Import (first button on the toolbar, just before delete button). Select the logo file and give it some appropriate name along with description. Select appropriate type of the image and click Continue. Your logo will be uploaded into SAP from a file. Now in your smartform, Create a Graphic Node, give the name of the logo along with other properties. In this way you can import a logo from a flat file into SAP and consequently in a smart form.
    Reward points if the answer is helpful.
    Regards,
    Mukul

  • How to read appended objects from file with ObjectInputStream?

    Hi to everyone. I'm new to Java so my question may look really stupid to most of you but I couldn't fined a solution by myself... I wanted to make an application, something like address book that is storing information about different people. So I decided to make a class that will hold the information for each person (for example: nickname, name, e-mail, web address and so on), then using the ObjectOutputStream the information will be save to a file. If I want to add a new record for a new person I'll simply append it to the already existing file. So far so good but soon I discovered that I can not read the appended objects using ObjectInputStream.
    What I mean is that if I create new file and then in one session save several objects to it using ObjectOutputStream they all will be read with no problem by ObjectInputStream. But after that if in a new session I append new objects they won't be read. The ObjectInputStream will read the objects from the first session after that IOException will be generated and the reading will stop just before the appended objects from the second session.
    The following is just a simple test it's not actual code from the program I was talking about. Instead of objects containing different kind of information I'm using only strings here. To use the program use as arguments in the console "w" to create new file followed by the file name and the strings you want save to the file (as objects). Example: "+w TestFile.obj Thats Just A Test+". Then to read it use "r" (for reading), followed by the file name. Example "+r TestFile.obj+". As a result you'll see that all the strings that are saved in the file can be successfully read back. Then do the same: "+w TestFile.obj Thats Second Test+" and then read again "+r TestFile.obj+". What will happen is that the strings only from the first sessions will be read and the ones from the second session will not.
    I am sorry for making this that long but I couldn't explain it more simple. If someone can give me a solution I'll be happy to hear it! ^.^ I'll also be glad if someone propose different approach of the problem! Here is the code:
    import java.io.*;
    class Fio
         public static void main(String[] args)
              try
                   if (args[0].equals("w"))
                        FileOutputStream fos = new FileOutputStream(args[1], true);
                        ObjectOutputStream oos = new ObjectOutputStream(fos);
                        for (int i = 2; i < args.length ; i++)
                             oos.writeObject(args);
                        fos.close();
                   else if (args[0].equals("r"))
                        FileInputStream fis = new FileInputStream(args[1]);
                        ObjectInputStream ois = new ObjectInputStream(fis);
                        for (int i = 0; i < fis.available(); i++)
                             System.out.println((String)ois.readObject());
                        fis.close();
                   else
                        System.out.println("Wrong args!");
              catch (IndexOutOfBoundsException exc)
                   System.out.println("You must use \"w\" or \"r\" followed by the file name as args!");
              catch (IOException exc)
                   System.out.println("I/O exception appeard!");
              catch (ClassNotFoundException exc)
                   System.out.println("Can not find the needed class");

    How to read appended objects from file with ObjectInputStream? The short answer is you can't.
    The long answer is you can if you put some work into it. The general outline would be to create a file with a format that will allow the storage of multiple streams within it. If you use a RandomAccessFile, you can create a header containing the length. If you use streams, you'll have to use a block protocol. The reason for this is that I don't think ObjectInputStream is guaranteed to read the same number of bytes ObjectOutputStream writes to it (e.g., it could skip ending padding or such).
    Next, you'll need to create an object that can return more InputStream objects, one per stream written to the file.
    Not trivial, but that's how you'd do it.

  • How do I append texts in service process

    Hi Experts,
    I have a service process where i need to append the texts to the already existing one. I am using FM "CRM_ORDER_MAINTAIN" for chaning the service process.
    How do I append the texts to the earlier existing one.
    Regards,
    Arul Jothi A

    You have to use function module read_text to capture the already exsiting text and then append your text in it, then use function module save_text to save it back,you need to know correct parameters to pass in it.
    Thanks,
    Shweta

  • How I can append new node in existing  XML file

    I've just begun learning DOM XML , so I'm currently at a very beginner level.
    I have an existing XML file that I would like to add an additional node to before saving it to another variable.
    how I can append new node in this file.
    now this code is overwrite new data over old data
    The code looks like this:
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.TransformerFactoryConfigurationError;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Attr;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    public class VerbXMLWriter
        static String EVerb3;
        static String englishTranslate3;
        public void VerbXMLWriter(String EVerb, String englishTranslate )
             EVerb3 = EVerb;
             englishTranslate3=englishTranslate;
        File xmlFile = new File("VerbDB.xml");
        DocumentBuilderFactory factory =  DocumentBuilderFactory.newInstance();
        try
         DocumentBuilder builder = factory.newDocumentBuilder();
         Document document = builder.newDocument();
        Element root = document.createElement("Verb");
         document.appendChild(root);
         Element verb = document.createElement(EVerb3);
         verb.setAttribute("EnglishTranslate",englishTranslate3);
         root.appendChild(verb);
         Source xmlSource = new DOMSource( document );
         Result result = new StreamResult( new FileOutputStream(xmlFile) );
        TransformerFactory transformerFactory = TransformerFactory.newInstance();
        Transformer transformer =
        transformerFactory.newTransformer();
        transformer.setOutputProperty( "indent", "yes" );
         transformer.transform( xmlSource, result );
      catch(TransformerFactoryConfigurationError factoryError )
        factoryError.printStackTrace();
       catch (ParserConfigurationException pc)
           pc.printStackTrace();
       catch (IOException io)
          io.printStackTrace();
       catch(Exception excep )
           excep.printStackTrace();
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <Verb>
    <Play EnglishTranslate="playing" />
    </Verb>Edited by: itb402 on Mar 9, 2008 6:05 AM

    in your code you are already appending new nodes to the root node. so what exactly is your problem? The following steps are usually taken for appending a new node:
    1. Read the XML document
    2. Build a DOM tree
    3. Navigate to the node under which you want to insert the new node
    4. Create a new node.
    5. Insert the new node to the node selected in point #3.
    ~Debopam

  • How to restrict append row upto 5 in ALV Webdynpro.

    how to restrict append row up to 5 in ALV Webdynpro.

    how did you resolve it?
    thank in advance.

Maybe you are looking for