Application Development 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: 

script

Former Member
0 Kudos

hi all ,

i have a scenario like this . i have to print an invoice five times for each time when they give the print with different headings . can anybody tell me the way how to do it.

thanks & regards

magesh

4 REPLIES 4

Former Member
0 Kudos

If u are using Smart Forms u've this option, don't know if there is anything similar in Scripts

create a window of type COPIES window in ur smartform and capture the no.of the copy that is currently output using the system variables SFSY-COPYCOUNT or SFSY-COPYCOUNT0, and display the headings text accordingly.

Also check this link

http://help.sap.com/saphelp_47x200/helpdata/en/b1/243fe0beee11d4b633006094192fe3/content.htm

Message was edited by:

Rajesh

Former Member
0 Kudos

Hi Magesh,

In scripts you have the current copy stored in Nast structure field is anzal. Use this field and you can programatically handle the situation.

Award points if useful,

Aleem.

Former Member
0 Kudos

<b>Copies Window</b>

Use

You use the copies window to define an output area for the print output, whose content you want to appear either only on the copy or only on the original. This allows you to flag copies as copies when the form is printed.

Prerequisites

You use this window type only if you want to print copies of your form. In the spool dialog in the Number input field of the Copies group box enter the number of copies (including the original).

Features

You can determine where to print the inferior nodes of a copies window:

  • Both on the original and on the copies (

  • Original and Copies ) Only on the original (

  • Only Original ) Only on the copies (

Only Copies )

You can use the system fields SFSY-COPYCOUNT or SFSY-COPYCOUNT0 to query whether the current output is the original or, respectively, which number the copy has.

Extras

You frequently print a graphic on the copies to flag them as copies. If, independent of the copy, the graphic is always the same, SAP Smart Forms can buffer the graphic before printing the page and thus increase performance. To do this, you must flag the copies window accordingly:

  • If you mark

  • Identical Copies SAP Smart Forms buffers the output to increase performance. Within such a window, any queries of the system fields SFSY-COPYCOUNT or SFSY-COPYCOUNT0 have no effects. If you mark

Different Copies SAP Smart Forms generates the contents again for each copy. You use this option if, for example, you want to number your copies consecutively (Copy 1, Copy 2, Copy 3, and so on).

Regards,

Pavan

Former Member
0 Kudos

HI,

if you look at the table NAST there is a field ANZAL, look at the field, this field will contain the Number of copies of the Script, based on this write the header ...

Write the select based on the Output type, then

IF &NAST-ANZAL& = 1.
 First header.
ELSEif &NAST-ANZAL& = 2.
 Second header.
ELSEif &NAST-ANZAL& = 3.
 Third header.
Endif.

Regards

Sudheer