Abap: pasar un smartform a un fichero pdf local

Solo disponible en BuenasTareas
  • Páginas : 4 (823 palabras )
  • Descarga(s) : 0
  • Publicado : 25 de febrero de 2011
Leer documento completo
Vista previa del texto
REPORT ZSMF_TO_PDF_LOCAL.
************************************************************************
* Pasar un smartform a un archivo local .pdf y abrirlo automáticamente *************************************************************************
DATA: output_options TYPE ssfcompop OCCURS 0 WITH HEADER LINE.
DATA: control_parameters LIKE ssfctrlop OCCURS 0 WITH HEADER LINE.

* Variables ytablas necesarias para la creación del pdf
DATA: salida_pdf TYPE ssfcrescl.
DATA: longitud TYPE i.
DATA: tabla_pdf TYPE tline OCCURS 0.
DATA: BEGIN OF t_doctab OCCURS 0.
INCLUDE STRUCTUREdocs.
DATA: END OF t_doctab.
DATA: otf TYPE itcoo OCCURS 0.
data: fichero type string.

* Función Smartform
DATA fm_name TYPE rs38l_fnam.

* Datos que se mostrarán en el smartform, sondiferentes en cada
* smartform
DATA: BEGIN OF tabla_puestos OCCURS 0,
objid LIKE hrp1000-objid,
stext LIKE hrp1000-stext,
objid_90 LIKE hrp1000-objid,
stext_90 LIKEhrp1000-stext,
objid_zc LIKE hrp1000-objid,
stext_zc LIKE hrp1000-stext.
DATA: END OF tabla_puestos.

*&---------------------------------------------------------------------*
*&SELECTION-SCREEN
*&---------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
PARAMETERS: p_pdf AS CHECKBOX DEFAULT 'X'USER-COMMAND pdf,
p_fich(150) LOWER CASE MODIF ID fil.
SELECTION-SCREEN END OF BLOCK bl1.

*&---------------------------------------------------------------------*
*& EventAT-SELECTION-SCREEN OUTPUT
*&---------------------------------------------------------------------*
AT SELECTION-SCREEN OUTPUT.
PERFORM selection_screen_fichero.*&---------------------------------------------------------------------*
*& Event AT-SELECTION-SCREEN ON VALUE-REQUEST
*&---------------------------------------------------------------------*
AT SELECTION-SCREEN ON VALUE-REQUEST...
tracking img