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

Print smartform automatically after printing the script

Former Member
0 Likes
534

Hi,

I have a requirement in which i need to print the smartform after script. The program is using script to print the deliveryorder.

After printing the delivery order i need to print the smartform automatically. How can i do it?

Regards,

Arun.

Hi,

I have a requirement in which i need to print the smartform after script. The program is using script to print the deliveryorder.

After printing the delivery order i need to print the smartform automatically. How can i do it?

Regards,

Arun.

2 REPLIES 2
Read only

Former Member
0 Likes
501

Hi arun,

u would be calling script fn module to print.

so under that u can call smartform fn module.for the smartform fn module there would be controls (here i have used z control).

U need to pass X value to control for not making the poup to appear..

MOVE 'X' TO : Z_CONTROL-NO_DIALOG.

u need to specify the printer.

MOVE 'LOCL' TO Z_OPTIONS-TDDEST.

There is one more parameter (for which X should be passed) to make it print,like the ones as above.This u need to search

DATA : Z_CONTROL TYPE SSFCTRLOP,       "Smart Forms: Control structure
           Z_OPTIONS TYPE SSFCOMPOP.       "SAP Smart Forms: Smart Composer (transfer) options.

    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME = V_FORMNAME
      IMPORTING
        FM_NAME  = V_FMNAME.

    CALL FUNCTION V_FMNAME
      EXPORTING
        CONTROL_PARAMETERS = Z_CONTROL
        OUTPUT_OPTIONS     = Z_OPTIONS
        TENDERID           = TENDERID             "" Value Assignments from prgrm to smrtform
      TABLES
        IT_ZBOQ_ITEM       = IT_SMARTFORM.

Regards

Sajid

Read only

0 Likes
501

Thanks for ur reply...but in this case when the user select for print preview my smartform will be printing right....but how can i restrict this..