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: 

Hi all, how to check the second copy in the smartform

Former Member
0 Kudos

HI all,

I must print the text 'Duplicate Copy' in the second time printing document in the smarrform, i how can i check whether the pages that are given for printing and which one is the first copy of printing and which one is the second copy of printing.

Can any one give the answer for this.

Thanks,

Ravi Kumar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Ravi,

You have to make use of <b>Alternative</b> node. Keeping your window name selected, right click, Create -> Flow Logic -> Alternative.

<b>%CONDITION</b> will be created under the window. In this <b>%CONDITION</b>, <b>General Attributes</b> tab, give

<b>

 Field Name                                    Comparison Value
 SFSY-COPYCOUNT             =                       2

</b>

Under <b>%CONDITION1</b>, under <b>True</b>, create a <b>text</b> (%text1) node, in that write <b>Duplicate Copy</b>. This text <b>Duplicate Copy</b> will only be printed if you take the printout for the second time.

Hope it helps!

Regards,

Abdul

P.S: Reward points, if useful!

5 REPLIES 5

Former Member
0 Kudos

hi,

In the system variables u wil find jobpages which would be the total number of pages and also form pages which are corresponding to form.

write a logic such that how u know how many pages are there in ur form.

ex

g_var = sfsy-jobpages - sfsy-formpages.

and then i hope u know how to deal.

santhosh

Former Member
0 Kudos

Hi Ravi,

You have to make use of <b>Alternative</b> node. Keeping your window name selected, right click, Create -> Flow Logic -> Alternative.

<b>%CONDITION</b> will be created under the window. In this <b>%CONDITION</b>, <b>General Attributes</b> tab, give

<b>

 Field Name                                    Comparison Value
 SFSY-COPYCOUNT             =                       2

</b>

Under <b>%CONDITION1</b>, under <b>True</b>, create a <b>text</b> (%text1) node, in that write <b>Duplicate Copy</b>. This text <b>Duplicate Copy</b> will only be printed if you take the printout for the second time.

Hope it helps!

Regards,

Abdul

P.S: Reward points, if useful!

Former Member
0 Kudos

hi

good

try to use this logic in your driver program and see the difference

Declare a variable

DATA L_PAGE_COUNT(5) TYPE C.

  • Copy this code to the end of program

  • Page count will be printed on each page here

WRITE SY-PAGNO TO L_PAGE_COUNT LEFT-JUSTIFIED.

DO SY-PAGNO TIMES.

READ LINE 1 OF PAGE SY-INDEX.

REPLACE '-----' WITH L_PAGE_COUNT INTO SY-LISEL.

MODIFY CURRENT LINE.

ENDDO.

TOP-OF-PAGE.

WRITE: /(70) 'Heading' CENTERED, 70 SY-PAGNO,'of ', '-----'.

thanks

mrutyun^

Former Member
0 Kudos

Hi

U can insert a parameter in the interface of SF where it can indicate the copy number and so you can manage which is the copy numbero in the drive program.

do copy times.

  call function SF_FUNCIONT
    exporting
      ..............
      copy  = sy-index  
      ...............

enddo.

Max

Former Member
0 Kudos

hi,

in order to print as ORIGINAL for first copy and DUPLICATE from second copy onwards.

we have to check the fields in the table NAST

in NAST we have 2 fields ANZL and VSTAT.

ANZAL - NUMBER OF MESSAGEs ie. original or copies

VSTAT- Processing status of message

we have to check these fields in order to print the form as orginal or copy.

Regards

srinivas