Ver Mensaje Individual
  #1  
Viejo 05/06/13, 16:37:47
minerva0112 minerva0112 is offline
Senior Member
 
Fecha de Ingreso: nov 2009
Mensajes: 116
Question Formulario en smartforms a pdf

Hola estoy haciendo lo siguiente:

* Funcion para llamar el formulario
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZHRO_LSTD_NTFCCNS'(031)
IMPORTING
fm_name = g_funcion
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.

g_control_parameters-no_dialog = 'X'.
g_output_options-tddest = 'PDF '.
g_output_options-tdnewid = 'X'.
g_output_options-tdimmed = 'X'.


CALL FUNCTION g_funcion
EXPORTING
indicador = g_indicador
texto = g_texto
output_options = g_output_options
control_parameters = g_control_parameters
user_settings = ' '
TABLES
it_data = it_data
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.


* Busqueda de Orden de Spool
SELECT SINGLE rqowner MAX( rqident ) AS rqident INTO (g_uname, g_n_spool)
FROM tsp01
GROUP BY rqowner
HAVING rqowner = sy-uname.
SELECT SINGLE rqclient rqo1name INTO (g_client, g_name)
FROM tsp01
WHERE rqident = g_n_spool.
CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
EXPORTING
authority = 'SP01'
client = g_client
name = g_name
part = 1
IMPORTING
type = g_tipo
objtype = g_tipo_obejto
EXCEPTIONS
fb_error = 1
fb_rsts_other = 2
no_object = 3
no_permission = 4.

IF g_tipo_obejto(3) = 'OTF'.
* Convertir el spool en pdf, desde un fomulario


CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = g_n_spool
no_dialog = ' '
IMPORTING
pdf_bytecount = g_numbytes_pdf
pdf_spoolid = g_pdf_spool_id
btc_jobname = g_job_name
btc_jobcount = g_job_id
TABLES
pdf = it_pdf
EXCEPTIONS
err_no_otf_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_dstdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11.

ELSE.

* Convertir el spool en pdf, desde una tabla de sap
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = g_n_spool
no_dialog = ' '
IMPORTING
pdf_bytecount = g_numbytes_pdf
pdf_spoolid = g_pdf_spool_id
btc_jobname = g_job_name
btc_jobcount = g_job_id
TABLES
pdf = it_pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11.
ENDIF.

lo cual me funciona perfectamente en desarrollo, pero cuando lo transporto a calidad simplemente no me genera la orden de spool.
realizando el debuging observo que es la variable g_funcion que no me trae ningún dato en calidad

que me falta?????
Responder Con Cita