Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

smart forms

Former Member
0 Likes
408

Hi,

Can anyone tell me how to see the print preview of smart form?

Regards,

Hema

3 REPLIES 3
Read only

Former Member
0 Likes
392

Hi,

you could try and test your smartform and then preview it. While you are in the smartform press the F8.

Regards,

Alexandros.

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
392

Hi,

If you are not passing values from program to Smartform, you activate the smartform and then press F8 twice and then give LOCL as output device to get the print preview.

If you are passing values from program to Smartform, you need to use SSF_FUNTION_MODULE for getting the form name and then use it to pass the parameters.

Check this link.I am explaining the concept here.

https://wiki.sdn.sap.com/wiki/display/Snippets/Smartform-Howtoavoidthedialog+box

Read only

Former Member
0 Likes
392

HI,

by giving the ssf_function_module_name and the function module no in the program while pressing f8 u can see the print preview.

after declaration and u can use like this to view the print preview

DATA : fm_name TYPE rs38l_fnam.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZSMARTG248'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = FM_NAME

  • EXCEPTIONS

  • NO_FORM = 1

  • NO_FUNCTION_MODULE = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION FM_NAME

  • EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

itab1 = itab

  • EXCEPTIONS

  • FORMATTING_ERROR = 1

  • INTERNAL_ERROR = 2

  • SEND_ERROR = 3

  • USER_CANCELED = 4

  • OTHERS = 5

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

regards,

Divya

Message was edited by: Divya

Divya