cancel
Showing results for 
Search instead for 
Did you mean: 

attaching smartform and print prog to invoice

former_member188827
Active Contributor
0 Kudos

hi

ive developed a smartform and a print program.

da program has a selection screen dat asks user for doc number(vbeln).

it den displays data in da smartform.

now ive to attach it to va02.

wen i attach it using v/40 output type(RD000) program name : zinvoice and pdf/smartform: zinv .and try to get print preview using vf03 da preview doesnt appear.also wen i click on print it shows message "output cannot be issued".

can ny1 suggest wat da problem is and how to resolve it...

points 'll b rewarded.

rgds

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

i think

u r trying to configure the smartform to the transaction va02

in that case goto nace transaction and select billing andclick on output types.

now select ur output type and click on processing routines .

now against the printout option define ur pprint program and smartform.

Answers (2)

Answers (2)

former_member188827
Active Contributor
0 Kudos

hi,

I have a seperate print program zprint for my smartform also i have already configured the output type iam getting the error "output couldnot be issued".

in my print program iam just doing selections to get the data & calling smartform i.e

CALL FUNCTION '/1BCDWB/SF00000030'

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

ZGVCSERIAL = gvcserial

zgvbezei1 = gvbezei1

zgvbill = gvbill

zgvbstdk = gvbstdk

zgvbstkd = gvbstkd

TABLES

ITAB = itab

  • EXCEPTIONS

  • FORMATTING_ERROR = 1

  • INTERNAL_ERROR = 2

  • SEND_ERROR = 3

  • USER_CANCELED = 4

  • OTHERS = 5

.

do i need to add additional code from rlb_invoice to get print preview

rgds

Former Member
0 Kudos

first call the function module name using ssf_function module _name

and then inluce ur fm.

as below.

  • Reading the NAST and DOC structures

CALL FUNCTION 'ME_READ_PO_FOR_PRINTING'

EXPORTING

ix_nast = nast

ix_screen = ent_screen

IMPORTING

ex_retco = ent_retco

ex_nast = l_nast

doc = l_doc

CHANGING

cx_druvo = l_druvo

cx_from_memory = l_from_memory.

CHECK ent_retco EQ 0.

  • SmartForm from customizing table TNAPR

gv_formname = tnapr-sform.

  • Calling the layout set

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = gv_formname

IMPORTING

fm_name = gv_fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

IF sy-subrc <> 0.

PERFORM protocol_update.

ENDIF.

  • For Print output:

IF nast-nacha = '1'. " Print output

ls_control_param-preview = 'X'.

ls_control_param-no_dialog = 'X'.

ENDIF.

  • For fax output.

IF nast-nacha = '2'. " Fax

  • Create the Recipient Object

CALL FUNCTION 'CREATE_RECIPIENT_OBJ_PPF'

EXPORTING

ip_country = gv_land1

ip_faxno = gv_telfx

ip_type_id = lv_fax_tp

IMPORTING

ep_recipient_id = ls_recipient_id

EXCEPTIONS

invalid_recipient = 1

OTHERS = 2.

IF sy-subrc NE 0.

  • IF write_out = 'X'.

FORMAT COLOR 6.

WRITE AT /5 text-004.

  • ENDIF.

RAISE other.

ENDIF.

  • Create The Sender Object

CALL FUNCTION 'CREATE_SENDER_OBJECT_PPF'

EXPORTING

ip_sender = sy-uname

IMPORTING

ep_sender_id = ls_sender_id

EXCEPTIONS

invalid_sender = 1

OTHERS = 2.

IF sy-subrc NE 0.

  • IF write_out = 'X'.

FORMAT COLOR 6.

WRITE AT /5 text-003.

  • ENDIF.

RAISE other.

ENDIF.

  • Output options

ls_output_options-tdteleland = gv_land1.

ls_output_options-tdtelenum = gv_telfx.

ls_output_options-tdfaxuser = sy-uname.

  • Control parameters

ls_control_param-device = lc_fax.

  • ls_control_param-no_dialog = 'X'.

  • ls_control_param-langu = nast-tdspras.

ENDIF.

IF gv_fm_name IS NOT INITIAL.

  • Below function module is used to show the Smart form

CALL FUNCTION gv_fm_name

EXPORTING

is_nast = l_nast

doc = l_doc

control_parameters = ls_control_param

output_options = ls_output_options

user_settings = ' '

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

IF sy-subrc <> 0.

  • Error handling

cf_retcode = sy-subrc.

PERFORM protocol_update.

ELSE.

ENDIF.

ENDIF.

Former Member
0 Kudos

IN NACE TRANSACTION

select v3 application-> output types->go to your output typr like rd00

select it and click on processing routines give ur smartform name and print program name here save it.