MUNDOSAP

Regresar   MUNDOSAP > DESARROLLO > Programación ABAP IV
Nombre de Usuario
Contraseña
Home Descargas Registrar FAQ Miembros Calendario Buscar Temas de Hoy Marcar Foros Como Leídos




 
Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Viejo 21/12/09, 13:39:02
Hasurac Hasurac is offline
Member
 
Fecha de Ingreso: nov 2009
Mensajes: 41
problemas con al convercion

les pido ayuda para ver porque puede ser que no funcione la convercion a pdf y de hai a binario le s paso el codigo aver si ustedes ven algo que se me paso por alto desde ya gracias

form gen_pdf changing p_logo lv_solicitud p_nom_tra p_rut_tra p_empresa
p_fech_ing_emp p_sindicato p_tip_boni p_rut_ben p_nom_hc
p_ap_paterno p_ap_materno p_001 i_cont_bin numbytes.

tables nast.

w_ctrlop-getotf = 'X'.
w_ctrlop-no_dialog = 'X'.
w_compop-tdnoprev = 'X'.
w_compop-tddest = 'LOCL'.
w_compop-tdarmod = '1'.
w_compop-tdcopies = '1'.
w_compop-tdprinter = 'SAPWIN'.
w_compop-tdlifetime = '8'.

call function '/1BCDWB/SF00000006'
exporting
control_parameters = w_ctrlop
output_options = w_compop
user_settings = 'X'
gp_logo = p_logo "Aca los parametros que necesita el smartform
gp_n_solicitud = lv_solicitud
gp_nom_tra = p_nom_tra
gp_rut_tra = p_rut_tra
gp_empresa = p_empresa
gp_fech_ing_emp = p_fech_ing_emp
gp_sindicato = p_sindicato
gp_tip_boni = p_tip_boni
gp_fech_soli = sy-datum
gp_rut_bene = p_rut_ben
gp_nom_famil = p_nom_hc
gp_ap_paterno = p_ap_paterno
gp_ap_materno = p_ap_materno
gp_for001 = p_001
importing
job_output_info = w_return "aca me devuelve el smartform
exceptions
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
if sy-subrc ne 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.

i_otf[] = w_return-otfdata[].

CALL FUNCTION 'QCE1_CONVERT'
* TABLES
* t_source_tab = i_tline
* t_target_tab = i_cont
* EXCEPTIONS
* CONVERT_NOT_POSSIBLE = 1
* OTHERS = 2
* .
* IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
* ENDIF.



endform. " GEN_PDF



despues lo envio






data: objpack like sopcklsti1 occurs 2 with header line.
data: objhead like solisti1 occurs 1 with header line.
data: objbin like solisti1 occurs 10 with header line.
data: objtxt like solisti1 occurs 10 with header line.
data: reclist like somlreci1 occurs 5 with header line.
data: doc_chng like sodocchgi1.
data: tab_lines like sy-tabix.
data l_num(3).

* Creation of the document to be sent
doc_chng-obj_name = 'SENDFILE'.
* Mail Subject
doc_chng-obj_descr = 'Prueba de Correo via Sap'.
* Mail Contents
objtxt = 'Este es el contenido del mensaje'.
append objtxt.

describe table objtxt lines tab_lines.
read table objtxt index tab_lines.
doc_chng-doc_size = ( tab_lines - 1 ) * 255 + strlen( objtxt ).
* Creation of the entry for the compressed document
clear objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
append objpack.

* Creation of the document attachment

data: saltolinea type x.

saltolinea = '0D'.

describe table objbin lines tab_lines.
objhead = 'PDF'.
append objhead.

** Creation of the entry for the compressed attachment
describe table i_cont_bin lines tab_lines.
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'PDF'.
objpack-doc_size = numbytes.
move objhead to objpack-obj_descr.
move objhead to objpack-obj_name.
objpack-doc_size = tab_lines * 255.
append objpack.

clear reclist.
reclist-receiver = 'XXXXXXXXX@hotmail.com'.
reclist-express = 'X'.
reclist-rec_type = 'U'.
reclist-copy = 'X'.
append reclist.

* Sending the document
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = doc_chng
put_in_outbox = 'X'
commit_work = 'X'
tables
packing_list = objpack
object_header = objhead
contents_bin = i_cont_bin
contents_txt = objtxt
receivers = reclist
exceptions
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
others = 99.


if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.


el error que tira es en la tranformacion a pdf dentro de la funcion
Responder Con Cita
  #2  
Viejo 21/12/09, 13:46:43
Avatar de mysmb2
mysmb2 mysmb2 is offline
Senior Member
 
Fecha de Ingreso: ene 2007
Localización: Cordoba
Mensajes: 406
¿podrías decirnos que dump te tira?
__________________
Sebastián Chiavia
Responder Con Cita
  #3  
Viejo 21/12/09, 14:14:17
Hasurac Hasurac is offline
Member
 
Fecha de Ingreso: nov 2009
Mensajes: 41
si es este

Err.tmpo.ejec. CONVT_NO_NUMBER
Fecha y hora 21.12.2009 16:12:00



Texto breve
Unable to interpret "*401" as a number.



¿Qué ha sucedido?
Error in the ABAP Application Program

The current ABAP program "SAPLSTXW" had to be terminated because it ha
come across a statement that unfortunately cannot be executed.



Anál.errores
An exception occurred that is explained in detail below.
This exception cannot be caught in the context of the current statemen
The reason for the exception is:
The program attempted to interpret the value "*401" as a number, but
since the value contravenes the rules for correct number formats,
this was not possible.



Posición desencadenante de error tiempo ejecución
Programa SAPLSTXW
Include LSTXWU06
Línea 114
Tp.módulo (FUNCTION)
Nombre módulo CONVERT_OTF




Lín. Txt.fte.

84 *************************************************************
85 * Adobe Acrobat PDF format
86 *************************************************************
87 WHEN 'PDF'.
88 BIN_FILESIZE = 0.
89 if bin_file is supplied. "630
90 pdf_destination = c_pdfcnv_pdfdst_xstring.
91 clear bin_file.
92 else.
93 pdf_destination = c_pdfcnv_pdfdst_inttab.
94 endif.
95 perform pdfcnv_trace_otf tables otf.
96 perform pdfcnv_convertotf tables otf
97 lines
98 using C_PDFCNV_OTFSRC_INTTAB
99 archive_index
100 copynumber
101 spoolid
102 pdf_destination
103 dst_device
104 dst_spoolid
105 bin_filesize
106 bin_file
107 pdf_delete_otftab.
108 subrc = sy-subrc.
109 if pdf_delete_otftab = space.
110 perform pdfcnv_save_otf_tospool tables otf
111 using bin_filesize.
112 endif.
113 set locale language cur_system_lang.
>>>>> IF BIN_FILESIZE < 0 or subrc <> 0.
115 RAISE ERR_CONV_NOT_POSSIBLE. "unable to convert to PDF
116 ENDIF.
117 *************************************************************
118 * unsupported format
119 *************************************************************
Responder Con Cita
  #4  
Viejo 21/12/09, 16:48:05
Hasurac Hasurac is offline
Member
 
Fecha de Ingreso: nov 2009
Mensajes: 41
ya solucione ese problema pero ahora cuando lo mando al mail lo recivo como pdf-2 el programa que uso para convertir es 'CONVERT_OTF_2_PDF' alguien me podria decir por que XD
Responder Con Cita
  #5  
Viejo 06/01/12, 15:51:28
quake1107 quake1107 is offline
Junior Member
 
Fecha de Ingreso: dic 2011
Mensajes: 1
Convt_no_number

Hola HASURAC

Disculpa cómo solucionaste lo del DUMP CONVT_NO NUMBER, tengo un problema similar,

de antemano muchas Gracias!
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Reglas de Mensajes
no puedes crear nuevos temas
no puedes responder temas
no puedes adjuntar archivos
no puedes editar tus mensajes

El código vB está On
Las caritas están On
Código [IMG] está On
Código HTML está Off
Saltar a Foro


Husos Horarios son GMT. La hora en este momento es 23:57:02.


www.mundosap.com 2006 - Spain
software crm, crm on demand, software call center, crm act, crm solutions, crm gratis, crm web