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

Smartforms Multiple Page Printing

Former Member
0 Likes
1,007

Hi Guys,

I know this could be regular posting from others but it seems that i can't any solutions around.

The Problem is about printing multiple copies from Billing Document at a time. What user requested was to have the word "Original" in the first copy and the subsequent copies will have the word "COPY". i know that this can be done in SAPScript by modifying the print program but how about Smartforms???

I tried NAST (IS_NAST) table as passed by smartform but the field ANZAL seemed to return '2' when i need 2 copies. How do i know when is printing the first copy and when is printing the subsequent copies? any status from any tables indicating i am printing the first or the subsequent copies? Tried NACH but it didn't help much neither....

Please help!!!!!! Thanks a lot....

Cheers,

Andrew

6 REPLIES 6
Read only

FredericGirod
Active Contributor
0 Likes
728

Hello Andrew,

Just give a parameter to your SmartForm function module, and in this parameter just set a flag to know if this the first page.

In the Smartform, you just have to check the value of the parameter and if the value equal X you set 'ORIGINAL'.

Regards

Frédéric

Read only

0 Likes
728

Hi Frédéric,

It seems abit tough to understand it technically, how can i create the parameter for the FM? are you able to show some examples to me as i not quite familiar with smartform. Thanks a lot for the trouble.

Cheers,

Andrew

Read only

0 Likes
728

Ok,

so transaction SMARTFORMS

set the name, press CHANGE

Select Form Interface (in the tree)

You are in the Import parameter, you have to create one import parameter. Choose a name for example WV_TYPE, with assignment TYPE and reference CHAR1.

After this just generate the function module.

And now, when you will show the new function module you have the WV_TYPE parameter that is present.

So, in the Text_Element or anything else you just have to set in the Conditions the test WV_TYPE = 'X' to display this Text_Element

I hope it's clear (sorry for my english)

Frederic

Read only

0 Likes
728

Hi Frederic,

You are certainly quick in replying the thread. Your post is very detail as well. i did try but when i tried to print the second message (2nd copy) it just go back to normal, even i set 'X' in the variable. if we are printing multiple pages then is ok.

Cheers,

Andrew

Read only

0 Likes
728

The solution that I gived to you, just work with multiple printing. If you want that system remember that you have already print the document, you have to check that the message type for the document number already exist in the NAST table.

Read only

Former Member
0 Likes
728

&SFSY-PAGE& for the current page number

&SFSY-FORMPAGES& for the total number of pages in the form

&SFSY-JOBPAGE& for the total number fo pages in all forms in the print job