cancel
Showing results for 
Search instead for 
Did you mean: 

How to get SapScript and Smartform printed in one spool request?

Former Member
0 Kudos

Hello experts,

I want to print the production order package in one spool request.

Print program consists of Smartform and SapScript.

First page is in landscape format with barcode(Smartform) and the rest is in portrait format(Sapscript).

In SAP documentation is written that it is possible for several Smartforms to be printed in one spool request.

Is it possible for 1 Smartform and 1 SapScript called from a single program to be printed in one spool request?

I have tested it with calling first the Smartform control-no_close= 'X' without success.

Can anyone tell me if this is possible and how?

Thank you.

Kind regards,

Danijela

Accepted Solutions (1)

Accepted Solutions (1)

naimesh_patel
Active Contributor
0 Kudos

I don't think this will work because both SapScript and SmartForms uses different OTF stream to generate the Output.

OTF of the SapScript is being closed by the CLOSE_FORM.

OTF of the Smartforms is being closed by the SSF_CLOSE FM internally from the Smartform FM.

Regards,

Naimesh Patel

Answers (4)

Answers (4)

Former Member
0 Kudos

Maybe SAP Note No. 85318 solves the mistery. All criteria are listed.

I think the biggest problem is to make the output type identical for script and smartforms.

(there are some test abaps available)

Regards

Annemarie

Former Member
0 Kudos

Hi

In the driver program .

*"Selection screen elements............................................
SELECTION-SCREEN BEGIN OF BLOCK block  WITH FRAME.
PARAMETERS:
p_script   RADIOBUTTON GROUP rad1,
p_smartform RADIOBUTTON GROUP rad1,
SELECTION-SCREEN END OF BLOCK block.


*"Selection screen elements............................................
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME.
PARAMETERS:
p_single RADIOBUTTON GROUP rad2,      " All the spool request
p_ind    RADIOBUTTON GROUP rad2.
SELECTION-SCREEN END OF BLOCK block1. " Single spool request

If p_script EQ 'x'.
 w_form = 'Y_SCRIPT'.
  Elseif p_smartfom EQ 'X'.
   w_form = 'Y_SMARTFORM'. 
ENDIF.


call function 'SSF_FUNCTION_MODULE_NAME'.

Call function 'SSFCOMP_OPEN'.

w_control-no_open   = ' '.
    w_control-no_close  = ' '.
*"Single spool request..................................................
    IF p_single EQ 'X'.
      w_control-no_open   = 'X'.
      w_control-no_close  = 'X'.
    ELSE.
*"Individual spool request.............................................
      IF w_flag NE '1'.
        w_control-no_open  = 'X'.
        w_control-no_close = ' '.
        w_flag = 1.

CALL FUNCTION '    '-----> smartform function module.

CALL FUNCTION 'SSFCOMP_CLOSE'.

Regards,

Sravanthi

naimesh_patel
Active Contributor
0 Kudos

There is one standard report RSPOPRNT which can create a composite spool request from your different spool requests.

What you can do is:

Create a separate spool for Smartforms output and SAPScript output.

Submit this report RSPOPRNT to create a composite spool request from both of the requets.

This program doesn't accept the spool number, so, you have to give some common title for this spools but unique which can idenfy different group.

Regards,

Naimesh Patel

Former Member
0 Kudos

In your tests when printing the SAPscript was the field ITCPO-TDNEWID set to 'X'? This field determines whether a new spool is created.

Regards,

Steve.

Former Member
0 Kudos

Hi Steve,

In Sapscript, the field ITCPO-TDNEWID was not set on 'X'.

Regards,

Danijela