Smartforms Convert to PDF
REPORT ZFI_FATURA_CIKTISI.
TABLES : BSEG,KNA1,BKPF.
DATA: I_OTF LIKE ITCOO OCCURS 100 WITH HEADER LINE,I_PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
DATA: OP_OPTION TYPE SSFCTRLOP, JOB_OUTPUT TYPE SSFCRESCL.
OP_OPTION-GETOTF = 'X'.
SELECT SINGLE * FROM BSEG WHERE BELNR = '1800000000'
AND KOART = 'D' AND BUKRS = 'TEST' AND GJAHR = '2008'.
SELECT SINGLE * FROM KNA1 WHERE KUNNR = BSEG-KUNNR.
DATA BEGIN OF ITAB OCCURS 0.
INCLUDE STRUCTURE ZFI_CIKTI_TB.
DATA END OF ITAB.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZFI_FATURA'
IMPORTING
FM_NAME = F_NAME
EXCEPTIONS
NO_FORM = 1
OTHERS = 3.
CALL FUNCTION '/1BCDWB/SF00000131'
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = OP_OPTION
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
SATICI_ADRESI = ADRES
MUSTERI_VERGI_DAIRESI = KNA1-STCD1
SATICI_ADI = KNA1-NAME1
MUSTERI_VERGI_NO = KNA1-STCD2
SATICI_NO = SATICI
TARIH = BKPF-BUDAT
KDV = '18'
IMPORTING
JOB_OUTPUT_INFO = JOB_OUTPUT
TABLES
ITAB = ITAB.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
COPYNUMBER = 0
TABLES
OTF = JOB_OUTPUT-OTFDATA
LINES = I_PDF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'c:\pdf_cikti.pdf'
FILETYPE = 'BIN'
TABLES
DATA_TAB = I_PDF.
TABLES : BSEG,KNA1,BKPF.
DATA: I_OTF LIKE ITCOO OCCURS 100 WITH HEADER LINE,I_PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
DATA: OP_OPTION TYPE SSFCTRLOP, JOB_OUTPUT TYPE SSFCRESCL.
OP_OPTION-GETOTF = 'X'.
SELECT SINGLE * FROM BSEG WHERE BELNR = '1800000000'
AND KOART = 'D' AND BUKRS = 'TEST' AND GJAHR = '2008'.
SELECT SINGLE * FROM KNA1 WHERE KUNNR = BSEG-KUNNR.
DATA BEGIN OF ITAB OCCURS 0.
INCLUDE STRUCTURE ZFI_CIKTI_TB.
DATA END OF ITAB.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZFI_FATURA'
IMPORTING
FM_NAME = F_NAME
EXCEPTIONS
NO_FORM = 1
OTHERS = 3.
CALL FUNCTION '/1BCDWB/SF00000131'
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = OP_OPTION
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
SATICI_ADRESI = ADRES
MUSTERI_VERGI_DAIRESI = KNA1-STCD1
SATICI_ADI = KNA1-NAME1
MUSTERI_VERGI_NO = KNA1-STCD2
SATICI_NO = SATICI
TARIH = BKPF-BUDAT
KDV = '18'
IMPORTING
JOB_OUTPUT_INFO = JOB_OUTPUT
TABLES
ITAB = ITAB.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
COPYNUMBER = 0
TABLES
OTF = JOB_OUTPUT-OTFDATA
LINES = I_PDF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'c:\pdf_cikti.pdf'
FILETYPE = 'BIN'
TABLES
DATA_TAB = I_PDF.
Serkan AKKAVAK
Bilgisayar Mühendisi
serkurumsal@yandex.com
SAP ve ABAP ile ilgili tüm sorun ve sorularınızı gönderebilirsiniz.
Bilgisayar Mühendisi
serkurumsal@yandex.com
SAP ve ABAP ile ilgili tüm sorun ve sorularınızı gönderebilirsiniz.
Social Plugin