cancel
Showing results for 
Search instead for 
Did you mean: 

each page to be printed with multiple copies

Former Member
0 Kudos

I have the following requirement:

Each page of a document has to printed in the following way:

at first the page is printed on paper from the standard paper tray

then the same page is printed on special paper from a second paper tray.

The print controls for the paper trays are clear.

The problem is to print each page multiple times

and to feed the paper from different trays for the different copies.

And to get it sorted in that order!

And to get it in one spool item.

Is there a solution with SAP-Script/Smartforms or any other way?

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member181995
Active Contributor
0 Kudos

Frank,

Pls look carefully this code which meets exactly your requirement.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' 
            EXPORTING 
              formname           = w_form 
            IMPORTING 
              fm_name            = w_fmname 
            EXCEPTIONS 
              no_form            = 1 
              no_function_module = 2 
              OTHERS             = 3. 
          IF sy-subrc <> 0. 
            MESSAGE e899(5at) WITH 'Smartform call fails'. 
          ENDIF. 
 
          CALL FUNCTION w_fmname 
            EXPORTING 
              control_parameters = ls_control_param 
              wa_vbrk            = wa_vbrk 
              wa_adrc            = wa_adrc 
              wa_j_1imocomp      = wa_j_1imocomp 
              wa_kna1            = wa_kna1 
              l_consignee        = l_consignee 
              l_name_co          = l_name_co_e 
              wa_adrc_l          = wa_adrc_l_e 
              l_j_1icht1         = l_j_1icht1_e 
              l_grnd_pcs         = l_grnd_pcs_e 
              l_grnd_fa          = l_grnd_fa_e 
              l_amtsum           = l_amtsum_e 
              wa_j_1iexchdr      = wa_j_1iexchdr_e 
              l_vbelv            = l_vbelv_e 
              l_wadat_ist        = l_wadat_ist_e 
              wa_j_1imocomp_l    = wa_j_1imocomp_l_e 
              l_name1            = l_name1_e 
              l_traid            = l_traid_e 
              wa_j_1imocust_l    = wa_j_1imocust_l_e. 
FORM set_print_param  CHANGING cs_control_param TYPE ssfctrlop. 
  DATA:    ls_itcpo     TYPE itcpo, 
           cf_retcode   TYPE sy-subrc, 
           lf_repid     TYPE sy-repid, 
           lf_device    TYPE tddevice. 
 
  lf_repid = sy-repid. 
 
  CALL FUNCTION 'WFMC_PREPARE_SMART_FORM' 
    EXPORTING 
      pi_nast             = nast 
*     PI_ADDR_KEY         = ' ' 
*     PI_COUNTRY          = ' ' 
      pi_repid            = lf_repid 
*     PI_SCREEN           = ' ' 
   IMPORTING 
      pe_returncode = cf_retcode 
      pe_itcpo      = ls_itcpo 
      pe_device     = lf_device. 
*      pe_recipient  = cs_recipient 
*      pe_sender     = cs_sender. 
  IF cf_retcode = 0. 
    cs_control_param-device      = lf_device. 
    cs_control_param-no_dialog   = 'X'. 
    cs_control_param-preview     = xscreen. 
    cs_control_param-getotf      = ls_itcpo-tdgetotf. 
    cs_control_param-langu       = nast-spras. 
  ENDIF. 
 
ENDFORM.                    " set
FORM sub_fill_copy . 
 
  IF w_juri = 'KOLKATA'. 
    t_copy-copy = 'ORIGINAL FOR BUYER'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'DUPLICATE FOR TRANSPORTER'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'TRIPLICATE FOR ASSESSE'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'EXTRA COPY'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
  ELSEIF w_juri = 'BEHROR'. 
    t_copy-copy = 'ORIGINAL FOR BUYER'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'DUPLICATE FOR TRANSPORTER'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'TRIPLICATE FOR ASSESSE'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'EXTRA COPY'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'EXTRA COPY'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'EXTRA COPY'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
  ELSEIF w_juri = 'RUDRAPUR'. 
    t_copy-copy = 'ORIGINAL FOR BUYER'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'DUPLICATE FOR TRANSPORTER'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'TRIPLICATE FOR ASSESSE'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'EXTRA COPY'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
 
  ELSEIF w_juri = 'MON'. 
    t_copy-copy = 'ORIGINAL FOR BUYER'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'DUPLICATE FOR TRANSPORTER'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'TRIPLICATE FOR ASSESSE'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'EXTRA COPY'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'EXTRA COPY'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'EXTRA COPY'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'EXTRA COPY'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'EXTRA COPY'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'EXTRA COPY'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
    t_copy-copy = 'EXTRA COPY'. 
    APPEND t_copy. 
    CLEAR  t_copy. 
 
  ENDIF.

Amit.

Former Member
0 Kudos

you need to write in copies window

globally Declare v_text as char25.

in program line you need write like this

IF SFSY-COPYCOUNT = 001.

V_TEXT = 'ORIGINAL'.

ELSEIF SFSY-COPYCOUNT = 002.

V_TEXT = 'DUPLICATE'.

ELSEIF SFSY-COPYCOUNT = 003.

V_TEXT = 'TRIPLICATE'.

ELSEIF SFSY-COPYCOUNT = 004.

V_TEXT = 'QUADRIPLICATE'.

ENDIF.

at time of printing give number copies as 3 or 4

Former Member
0 Kudos

Hi Frank,

you just send the form to spool SP01 for printing

there you change the printer settings

Cheers,

Chinna

Former Member
0 Kudos

Hi,

From where that smartform will triggering , is it from driver programe, or any standard Tcode.

regards

Jana