Application Development and Automation 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: 
Read only

4 Prints in SAP Script

Former Member
0 Likes
430

HI,

I have a typical query in SAP Script.

I am printing invoice and I want to have 4 printout sets of each invoice.

While printing, I am stating the number of messages = 4 (NAST-ANZAL = 4)

Here I am getting my invoice printed 4 times.

But the requirement is.. The original should print as it is.

The second should print as Duplicate as heading on invoice.

similarly Triplicate and so on.

Any idea?

thanks in advance.

pranu

HI,

I have a typical query in SAP Script.

I am printing invoice and I want to have 4 printout sets of each invoice.

While printing, I am stating the number of messages = 4 (NAST-ANZAL = 4)

Here I am getting my invoice printed 4 times.

But the requirement is.. The original should print as it is.

The second should print as Duplicate as heading on invoice.

similarly Triplicate and so on.

Any idea?

thanks in advance.

pranu

1 REPLY 1
Read only

Former Member
0 Likes
411

Hi pranu,

May I know the current info of the layout? I assume that it is only a static text in your form. If so, then make it dynamic. Store the text in a variable. While looping, check the counter ( SY-index can be used). Depending on the value, pass to the variable the necessary text.

DO NAST-ANZAL times.

case sy-index.

when 1.

v_text = 'Original'

when 2.

v_text = 'Duplicate'

when 3.

v_text = 'XXX'

when 4.

v_text = 'XXX'

when others.

ENDDO.

In the window where the text is displayed, if hardcoded, remove it and replace by &V_TEXT&.

Reward points if useful.

Regards,

Dru