cancel
Showing results for 
Search instead for 
Did you mean: 

how to get spool no in print program of smartforms

Former Member
0 Kudos

hi All,

I am writing a new print program for smart form.i need to pass the spool no to NAST_PROTOCOL_UPDATE FM to see the spool no in processing log. in which structure do i see the spool no at run time? please advice.

Regards,

Sreekanth.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

U can get the spool number in ITCPP structure field TDSPOOLID. pass the TDSPOOLID to msgv1 in Nast Protcol FM...

Eg:

DATA: i_itcpp LIKE itcpp.

CALL FUNCTION 'CLOSE_FORM'

IMPORTING

RESULT = i_itcpp

EXCEPTIONS

OTHERS = 1.

IF i_itcpp-tdspoolid NE space.

PERFORM protocol_update_spool USING '342' i_itcpp-tdspoolid

space space space.

ENDIF.

FORM protocol_update_spool USING syst-msgno h_i_itcpp-tdspoolid

syst-msgv2 syst-msgv3 syst-msgv4.

syst-msgid = 'VN'.

syst-msgv1 = h_i_itcpp-tdspoolid.

CONDENSE syst-msgv1.

CHECK xscreen = space.

CALL FUNCTION 'NAST_PROTOCOL_UPDATE'

EXPORTING

msg_arbgb = syst-msgid

msg_nr = syst-msgno

msg_ty = syst-msgty

msg_v1 = syst-msgv1

msg_v2 = syst-msgv2

msg_v3 = syst-msgv3

msg_v4 = syst-msgv4

EXCEPTIONS

OTHERS = 1.

ENDFORM. "PROTOCOL_UPDATE_SPOOL

Rgds,

Pavan

Former Member
0 Kudos

hi Pavan this seems to be the structure for scripts. i want for smartfroms.how ever if i use this one,i am not getting any spool no in the structure.

Regards,

Sreekanth.

Former Member
0 Kudos

try like below:

DATA: ls_job_info TYPE ssfcrescl.

  • determine smartform function module for invoice

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING formname = lf_formname

  • variant = ' '

  • direct_call = ' '

IMPORTING fm_name = lf_fm_name ---> Get SF Function Module name

EXCEPTIONS no_form = 1

no_function_module = 2

OTHERS = 3.

CALL FUNCTION lf_fm_name

EXPORTING

archive_index = toa_dara

archive_parameters = arc_params

control_parameters = ls_control_param

  • mail_appl_obj =

mail_recipient = ls_recipient

mail_sender = ls_sender

output_options = ls_composer_param

user_settings = space

is_bil_invoice = ls_bil_invoice

is_nast = nast

is_repeat = repeat

importing

job_output_info = ls_job_info

  • document_output_info =

  • job_output_options =

EXCEPTIONS formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

ls_job_info-spoolids will have the Spool request id

Rgds,

Pavan

Former Member
0 Kudos

Thanks mate.

Answers (0)