cancel
Showing results for 
Search instead for 
Did you mean: 

different titles for different copies while printing an invoice

Former Member
0 Kudos

I have a Title window as 'Copies Window' and ve three Text elemnts in it.

In the First text element condition tab, condition - 'SFSY-COPYCOUNT = '001' and in general attributes Print 'Original'.

In the second text element condition tab, condition - 'SFSY-COPYCOUNT = '002' and in general attributes Print 'Duplicate'.

In the Third text element condition tab, condition - 'SFSY-COPYCOUNT = '003' and in general attributes Print 'Triplicate'.

Finally in Print Dialog Box, I give 3 as input to the field ' No. of Copies'.

BUT when i check the smartform in debuging mode the system variable SFSY-COPYCOUNT IS ALWAYS 1 so all the copies are printed as 'Original' ... ?????

Points will be rewarded....thnx

Edited by: Poonam Londhe on Jul 15, 2008 3:32 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

try this one : 'SFSY-COPYCOUNT0'

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

One correction...

If the variable value is 2 then print TRIPLICATE.

Regards,

Ram

Former Member
0 Kudos

Hi,

Use program lines to check the NAST entries for the OBJKY as the document no and store the no of entries into some variable.

then print the text elements as follows.

if the variable value is 0 then print ORIGINAL

if the variable value is 1 then print DUPLICATE

if the variable value is 3 then print TRIPLICATE.

Regards,

Ram

Former Member
0 Kudos

Hi Poonam..

can u plz try this n give feedback if its working..i might be using it in the near future..

try this one : 'SFSY-COPYCOUNT0'

Former Member
0 Kudos

hey ... i have tried that as well...but in this case it does not print any thing, it does not satisfy any condition ..

Former Member
0 Kudos

can u try this...

CALL FUNCTION v_form_fm

EXPORTING

p_compensation = p_comp

p_skill = p_skill

p_deci_auhtority = p_da

USER_SETTINGS = ' ' <----


try this

TABLES

s_job = s_job

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

Former Member
0 Kudos

thnx all of u...i have solved the issue using a different logic...

former_member181995
Active Contributor
0 Kudos

Poonam,

i done excatly same what you are trying see how i reached:

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.

CALL FUNCTION w_fmname
      EXPORTING
        copy               = t_copy-copy
        control_parameters = ls_control_param
        w_div              = w_div
        wa_vbrk            = wa_vbrk
        wa_adrc            = wa_adrc
        wa_j_1imocomp      = wa_j_1imocomp
        wa_kna1            = wa_kna1
        w_lines            = w_lines
        w_fact_ind         = w_fact_ind
        w_18c              = w_18c
        w_duty             = w_duty
        wa_j_1iexchdr_prog = wa_j_1iexchdr
        w_mod              = w_mod
        w_juri             = w_juri
      IMPORTING      "l_consignee_e = l_consignee_e
        l_name_co_e        = l_name_co_e
        wa_adrc_l_e        = wa_adrc_l_e
        l_j_1icht1_e       = l_j_1icht1_e
        l_grnd_pcs_e       = l_grnd_pcs_e
        l_grnd_fa_e        = l_grnd_fa_e
        l_amtsum_e         = l_amtsum_e
        wa_j_1iexchdr_e    = wa_j_1iexchdr_e
        l_vbelv_e          = l_vbelv_e
        l_wadat_ist_e      = l_wadat_ist_e
        wa_j_1imocomp_l_e  = wa_j_1imocomp_l_e
        l_name1_e          = l_name1_e
        l_traid_e          = l_traid_e
        wa_j_1imocust_l_e  = wa_j_1imocust_l_e
      TABLES
        t_final_pass       = t_final_pass
        t_tax_pass         = t_tax_pass
      EXCEPTIONS
        formatting_error   = 1
        internal_error     = 2
        send_error         = 3
        user_canceled      = 4
        OTHERS             = 5.

  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

thnx amit..i have closed the other thread....i have checked ur code...but i m not getting it...

how can it suit my requirement??