메뉴 건너뛰기

SAP 한국 커뮤니티

REPORT ZSMARTFORMS_08.

sapjoy 2009.02.27 19:03 조회 수 : 2604

REPORT  ZSMARTFORMS_08.

DATA : GT_SFLIGHT LIKE SFLIGHT OCCURS 0 WITH HEADER LINE
.
DATA : FORM_NAME TYPE
 RS38L_FNAM.

DATA: LT_OTFDATA        TYPE
 SSFCRESCL,
      CONTROL_PARAMETER 
TYPE
 SSFCTRLOP,
      LT_PDF_TAB        
LIKE TLINE OCCURS 0 WITH HEADER LINE
,
      LT_OTF            
TYPE ITCOO OCCURS 0 WITH HEADER LINE
,
      W_FILESIZE        
TYPE I
,
      W_BIN_FILESIZE    
TYPE I
.

SELECT * INTO TABLE
 GT_SFLIGHT
  
FROM
 SFLIGHT.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

  
EXPORTING
    FORMNAME           = 
'ZSMARTFORMS_04'
  
IMPORTING
    FM_NAME            = FORM_NAME
  
EXCEPTIONS
    NO_FORM            = 
1
    NO_FUNCTION_MODULE = 
2
    
OTHERS             = 3.

* 7-1-2장의 표에서 OTF파라미터를 설명할 때 언급하였던 GETOTF부분이다.

CONTROL_PARAMETER-GETOTF = 
'X'.

CALL FUNCTION
 FORM_NAME
  
EXPORTING

    CONTROL_PARAMETERS         = CONTROL_PARAMETER
  
IMPORTING
    JOB_OUTPUT_INFO            = LT_OTFDATA 
"[= JOB_OUTPUT_INFO 데이터
  
TABLES
    GT_SFLIGHT                 = GT_SFLIGHT.


LT_OTF[] = LT_OTFDATA-OTFDATA[].


CALL FUNCTION 'CONVERT_OTF'
  
EXPORTING
    
FORMAT                = 'PDF'
  
IMPORTING
    BIN_FILESIZE          = W_BIN_FILESIZE
  
TABLES
    OTF                   = LT_OTF
    
LINES                 = LT_PDF_TAB
  
EXCEPTIONS

    ERR_MAX_LINEWIDTH     = 
1
    ERR_FORMAT            = 
2
    ERR_CONV_NOT_POSSIBLE = 
3
    
OTHERS                = 4.


CALL FUNCTION 'GUI_DOWNLOAD'

  
EXPORTING
    BIN_FILESIZE = W_BIN_FILESIZE
    FILENAME     = 
'C:ZSMARTFORMS_04.PDF'
    FILETYPE     = 
'BIN'
  
TABLES
    DATA_TAB     = LT_PDF_TAB.

번호 제목 글쓴이 날짜 조회 수
351 Z16_001TOP sapjoy 2009.09.21 2593
» REPORT ZSMARTFORMS_08. [2] sapjoy 2009.02.27 2604
349 REPORT zsaptip_006. sapjoy 2009.02.21 2075
348 REPORT zsaptip_005. [2] sapjoy 2009.02.20 1836
347 REPORT zsaptip_004. sapjoy 2009.02.20 1848
346 REPORT ZSAPTIP_002. sapjoy 2009.02.20 3208
345 sap_debug.txt file sapjoy 2009.02.20 2523
344 TOTAL sapjoy 2009.02.19 2686
343 REPORT ZDYNAMIC_ITAB_12. sapjoy 2009.02.16 2643
342 REPORT ZDYNAMIC_ITAB_11. [1] sapjoy 2009.02.16 2012
341 REPORT ZDYNAMIC_ITAB_10. [1] sapjoy 2009.02.16 1864
340 REPORT ZDYNAMIC_ITAB_09. sapjoy 2009.02.16 2138
339 REPORT ZDYNAMIC_ITAB_08. sapjoy 2009.02.16 2760
338 REPORT ZDYNAMIC_ITAB_07. sapjoy 2009.02.16 2583
337 REPORT ZDYNAMIC_ITAB_06. sapjoy 2009.02.16 1972
336 REPORT ZDYNAMIC_ITAB_05. sapjoy 2009.02.16 2156
335 REPORT ZDYNAMIC_ITAB_04. sapjoy 2009.02.16 2031
334 REPORT ZDYNAMIC_ITAB_03 sapjoy 2009.02.16 2502
333 REPORT ZDYNAMIC_ITAB_02. sapjoy 2009.02.16 1870
332 REPORT ZDYNAMIC_ITAB_01. sapjoy 2009.02.13 1873