cancel
Showing results for 
Search instead for 
Did you mean: 

Copies window printing in VF02/VF03 through output type

former_member267445
Participant
0 Kudos

Dear Experts,

I have copied the standard smartform of the Invoice into YLB_BIL_INVOICE and i did the modification according to the client's requirement.

In YLB_BIL_INVOICE, i have taken one window type as Copies Window and i have chosen the radio button Original and Copies. In the window I wrote the code for Copies like Original, Factory Copy, Buyer Copy, Triplicate and Marketing Copy based on SFSY-COPYCOUNT checking. I haven't changed the standard program(RLB_INVOICE).

And I have assigned the smartform YLB_BIL_INVOICE and RLB_INVOICE in NACE settings. When I am viewing the print using VF02/VF03 with output type which configured by SD Consultant it is not showing the Copies means if I mention Number of Copies as 4 in print preview it is showing only single Page and when I gave the print with number of copies as 4 Pages are printing 4 copies but the name of the copies is same for all 4 pages like 1st page as Original and 2nd page as Original etc..

I debugged the code and i am getting NAST-ANZAL = 1. in program, I think it should be 4. Please give me some input to resolve this issue?

Thanks n Regards,

Muralikrishna

Edited by: muraliabap on Feb 14, 2011 6:35 AM

Accepted Solutions (1)

Accepted Solutions (1)

asik_shameem
Active Contributor
0 Kudos

Hi,

In the pgm RLB_INVOICE, goto routine set_print_param.

After the FM 'WFMC_PREPARE_SMART_FORM' call,

Check the values of NAST-ANZAL and LS_ITCPO-TDCOPIES, both should be 4.

former_member267445
Participant
0 Kudos

Hi Asik,

As I have the another work in client's place I haven't seen your message. My Apologies for the same. After seeing your message I debug the code RLB_INVOICE and find the both values of NAST-ANZAL and LS_ITCPO-TDCOPIES are same but the value is 1, not 4.

Regards,

Muralikrishna

Edited by: muraliabap on Feb 14, 2011 1:39 PM

asik_shameem
Active Contributor
0 Kudos

Hi,

I am not sure where you are giving the value 4.

Basically it can be given globally in Condition Records (tcode-VV32),

OR it can be given in the messages ( VF02->Issue Output To->Print Options->Number of messages [X-Print Immediately] )

OR if print dialog is enabled, it can be given in Number of copies block->Number.

Instead of going to Print Preview, try to issue (Print) the output directly.

former_member267445
Participant
0 Kudos

Hi Asik,

I did like VF02->Issue Output To->Print Options->Number of messages X-Print Immediately and I tried to give the print at that time also the name of the Copy window's Text is not changing.

Edited by: muraliabap on Feb 15, 2011 1:40 PM

Former Member
0 Kudos

Hi Murali,

I have created on copy window with option orignal and copy differ.

Now i have added three text element each with conditions SFSY-COPYCOUNT0 = 1. SFSY-COPYCOUNT0 = 2 and SFSY-COPYCOUNT0 = 3.

Now i have added orignal, copy1 and copy 2 in these three text elemnets.

These are working fine as u required.

Please try this.

Hope this will help.

Thanks

Dhiraj.

former_member267445
Participant
0 Kudos

Hi Dhiraj,

I did what you mention in the post, still i am not getting the Copy1 and Copy2 pages. While giving the print i am getting 3 pages with the Original only. I dont know where I did a mistake

Thanks n Regards,

Muralikrishna

Former Member
0 Kudos

strange.

try to delete copy window and add text elements again.

may be it work.

Good luck

Dhiraj

former_member267445
Participant
0 Kudos

Dhiraj,

I tried it but still not working. When I debug the smartforms Copycount value is not iterating means SFSY-COPYCOUNT value is coming 1 only

Regards,

Muralikrishna

Former Member
0 Kudos

hii murali,

Its strange problem now but

1.can u check whether copy window is above the Main window.

2. your document coming in single page or going to 2 nd page sometimes.

3.while giving print ru specifying 3 pages.

regards,

Sri

Former Member
0 Kudos

hii murali,

1.check whether you have given in NACE and in VF02 output type same.

2.Again create a driver program ,reconfigure again printer output type. for both NACE and VF02.

regards,

Sri

former_member267445
Participant
0 Kudos

Hi Sridhar,

=>Yes I am maintaining Copy window is above the MAIN window, but between Copy window and MAIN window secondary windows are there

=>My Document Contains only Single Page

=>I am giving 3 pages in Print Options

Edited by: muraliabap on Feb 16, 2011 8:09 AM

asik_shameem
Active Contributor
0 Kudos

Hi,

I just checked the standard code

IF ls_composer_param-tdcopies EQ 0.
      nast_anzal = 1.
    ELSE.
      nast_anzal = ls_composer_param-tdcopies.
    ENDIF.
    ls_composer_param-tdcopies = 1. " Here it is defaulted
    DO nast_anzal TIMES.
      "...
* call smartform invoice
      CALL FUNCTION lf_fm_name

Since ls_composer_param-tdcopies is defaulted as 1, you are not able to acheive SFSY-COPYCOUNT increment in smartform. According to the standard program, it is just repeating the output again and again which does help you for the copies window.

Solution here is go for Z program and change ls_composer_param-tdcopies as the way you need.

former_member267445
Participant
0 Kudos

Hi Sridhar,

I dont know what I did mistake, still i am facing the problem. If any other option please let me know

Thanks and Regards,

Muralikrishna

former_member267445
Participant
0 Kudos

Hi Asik,

Thank you for replyl. Let me check suggestion given by you. If any concerns I will asks

Thanks and Regards,

Muralikrishna

Edited by: muraliabap on Feb 16, 2011 8:31 AM

former_member267445
Participant
0 Kudos

Hi Asik,

Now I am getting the copies when I changed as suggested by you, but the problem is not showing the preview when I assign Driver program as YRLB_INVOICE in NACE settings. But the print is coming. I need to show the preview also

Regards,

Muralikrishna

asik_shameem
Active Contributor
0 Kudos

Check the value ls_control_param-PREVIEW and us_screen upon giving Print Preview.

ls_control_param-PREVIEW should be X before calling Smartform.

former_member267445
Participant
0 Kudos

Hi Asik,

Thanks alot. I resolved the issue. I have set ls_control_param-preview as 'X'. Now its working.

Thanks and Regards,

Muralikrishna

former_member267445
Participant
0 Kudos

Hi,

Resolved the issue. Thanks Sridhar and Asik.

Former Member
0 Kudos

Hey Murali,

Just to confirm

You have selected radio button orignal and copies -copies differ

and

use SFSY-COPYCOUNT0 not SFSY-COPYCOUNT

Dhiraj

former_member267445
Participant
0 Kudos

Hi Dhiraj,

Yes I have selected radio button Original and Copies - Copies differ and I am using SFSY-COPYCOUNT if I am using SFSY-COPYCOUNT0 it is not coming thats why I have used SFSY-COPYCOUNT.

Thanks for you also.

Thanks and Regards,

Muralikrishna

Answers (3)

Answers (3)

asik_shameem
Active Contributor
0 Kudos

Hi,

I am not clear about the following context.

if I mention Number of Copies as 4 in print preview it is showing only single Page and when I gave the print with number of copies as 4 Pages are printing 4 copies

Where did you give the no of copies as 4? In the message or Print Dialog?

NAST-ANZAL is from message and OUTPUT_OPTIONS-TDCOPIES is from the Print Dialog. For copies window, no of copies is fetched through OUTPUT_OPTIONS-TDCOPIES (or the Print Dialog), thus SFSY-COPYCOUNT is changed accordingly .

Check the this [link|http://wiki.sdn.sap.com/wiki/display/ABAP/Copies(duplicate,etc.)]

former_member267445
Participant
0 Kudos

Hi Asik,

Actually with out assigning my driver program and smartform in NACE, when I execute my driver program in the print there is a option called number of copies there if i enter 4 then i am getting the 4 pages with Original and Duplicates.

If i assigned in NACE and I am issuing the out put in VF02 or VF03 i am getting the pages with the same Original copy to all 4 pages. So, how can i resolve this issue?

Regards,

Muralikrishna

SuhaSaha
Advisor
Advisor
0 Kudos

Hello Murali,

Did you read the SAp documentation on "Copies Window": [http://help.sap.com/saphelp_sm40/helpdata/en/b1/243fe0beee11d4b633006094192fe3/content.htm]

BR,

Suhas

Former Member
0 Kudos

hii,

1. create a window with window type as copy window.

2. create a text feild under that window.

3. In text feild under condition tab specify sfsy-copycount = 1(similarly for many copies you need)

4. specify how many copies u need in print preview.

regards,

Sri.

former_member267445
Participant
0 Kudos

Hi Sridhar,

Thank you for replying. I did what you mentioned, but my problem is when I am issuing the output in VF02 or VF03, if I mention the copies as 4 in preview it is showing only one that to Original, remaining are not showing and in Copies window i have chosen Original and copies with Differ option in Attributes.

Thanks n Regards,

Muralikrishna