#1
|
|||
|
|||
smartforms a pdf y en PC
Hola, estoy convirtiendo un SMARTFORMS a PDF y quiero grabarlo en el PC, hasta ahora no me resulta, aqui va el codigo:
w_ctrlop-getotf = 'X'. w_ctrlop-no_dialog = 'X'. w_compop-tdnoprev = 'X'. CALL FUNCTION nombre_modulo_funcion EXPORTING control_parameters = w_ctrlop output_options = w_compop user_settings = 'X' IMPORTING job_output_info = w_return "output de la funcion TABLES gs_avisos = gt_formulario EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 others = 5. *---Si se produce un error, reportarlo. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. *---conversión a PDF DATA: BEGIN OF i_otf OCCURS 0. INCLUDE STRUCTURE itcoo. DATA: END OF i_otf . DATA: BEGIN OF i_tline OCCURS 0. INCLUDE STRUCTURE tline. DATA: END OF i_tline . DATA: v_len_in TYPE xstring. i_otf[] = w_return-otfdata[]. CALL FUNCTION 'CONVERT_OTF' EXPORTING format = 'PDF' max_linewidth = 132 IMPORTING bin_filesize = v_len_in TABLES otf = i_otf lines = i_tline EXCEPTIONS err_max_linewidth = 1 err_format = 2 err_conv_not_possible = 3 others = 4. *---a archivo en pc CALL FUNCTION 'WS_DOWNLOAD' EXPORTING filename = p_output filetype = 'ASC' * filetype_no_change = 'X' * IMPORTING * cancel = x_cancel TABLES data_tab = i_tline EXCEPTIONS invalid_filesize = 1 invalid_table_width = 2 invalid_type = 3 no_batch = 4 unknown_error = 5 gui_refuse_filetransfer = 6 OTHERS = 7. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. Si alguien me puede ayudar, se lo agradesco gracias rhein |
#2
|
||||
|
||||
Cambia el parametro:
Por WS_DOWNLOAD es una funcion obsoleta, es mejor que uses GUI_DOWNLOAD Prueba y cuenta que tal te a ido Suerte |
Herramientas | Buscar en Tema |
Desplegado | |
|
|