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

smartforms print preview

Former Member
0 Likes
1,095

hey , how to see smartforms printpreview?

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

FredericGirod
Active Contributor
0 Likes
941

Hi,

in the structure parameters to the function you have create with the transaction smartforms, there is a structure : CONTROL_PARAMETERS (SSFCTRLOP), and there is a field PREVIEW. Just set the value 'X' inside.

If you have set the smartforms in a form ENTRY or ENTRY_NEU, you have set US_SCREEN using parameters, you must use this parameters to check if print preview has beend selected by the user.

Rgd

Frédéric

7 REPLIES 7
Read only

FredericGirod
Active Contributor
0 Likes
942

Hi,

in the structure parameters to the function you have create with the transaction smartforms, there is a structure : CONTROL_PARAMETERS (SSFCTRLOP), and there is a field PREVIEW. Just set the value 'X' inside.

If you have set the smartforms in a form ENTRY or ENTRY_NEU, you have set US_SCREEN using parameters, you must use this parameters to check if print preview has beend selected by the user.

Rgd

Frédéric

Read only

0 Likes
941

hi Frédéric Girod ,

can you give me detail description about this?

thanks

Read only

0 Likes
941

Hi Priya,

When you call the FM <b>'SSF_FUNCTION_MODULE_NAME'</b>,you will get the form name & you call that FM,say <b>'FORM_NAME'</b>

In that.

Pass this & call the FM.

<b> LS_CONTROL_PARAM-PREVIEW = 'X'.</b>

CALL FUNCTION FORM_NAME

EXPORTING

ARCHIVE_INDEX = TOA_DARA

ARCHIVE_PARAMETERS = ARC_PARAMS

CONTROL_PARAMETERS = <b>LS_CONTROL_PARAM</b>

MAIL_RECIPIENT = LS_RECIPIENT

MAIL_SENDER = LS_SENDER

OUTPUT_OPTIONS = <b>LS_COMPOSER_PARAM</b>

USER_SETTINGS = SPACE

I_HEADER = I_HEADER

NAST = NAST

IS_REPEAT = REPEAT

TABLES

.............................

............................

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5.

Read only

0 Likes
941

For example, if you try to print invoice, the standart program is RLB_INVOICE.

The program contain the form ENTRY, with the paramters : return_code and us_screen.

Return_code must be clear if everything is ok.

and Us_screen contain a 'X' inside if the user select the print preview. So the simple way is to do a move US_SCREEN to ls_control_params-preview.

Have a look to the program : SF_EXAMPLE_01 / SF_EXAMPLE_02 / SF_EXAMPLE_03 (and the standard RLV_INVOICE).

Fred

Read only

0 Likes
941

WITH OUT PROGRAM I NEED TO SEE TEST PRINT LIKE SCRIPTS.

Read only

0 Likes
941

Hi Priya,

If you want to see the test print.You can simple execute the smartform.It will take you to the FM(SE37 tcode)& then execute the FM.

Read only

0 Likes
941

To test print, you could test directly the function generate by the smartforms using the SE37 and passing values.

Fred