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: 

Blocking of Multiple SAPScript print outputs

Former Member
0 Kudos

Dear All,

Is there a way where we can stop users from printing a SAPScript Output,if its already printed once...

Regards,

srini

2 REPLIES 2

christian_wohlfahrt
Active Contributor
0 Kudos

Hi Srini,

in standard invoice print program (Report RVADIN01) following routine can be found:


*---------------------------------------------------------------------*
*       FORM CHECK_REPEAT
*---------------------------------------------------------------------*
*       A text is printed, if it is a repeat print for the document.  *
*---------------------------------------------------------------------*
FORM check_repeat.

  CLEAR repeat.
  CLEAR anzal.
  SELECT * INTO *nast FROM nast WHERE kappl = nast-kappl
                                AND   objky = nast-objky
                                AND   kschl = nast-kschl
                                AND   spras = nast-spras
                                AND   parnr = nast-parnr
                                AND   parvw = nast-parvw
                                AND   nacha BETWEEN '1' AND '4'.
    IF *nast-vstat = '1'.
      anzal = anzal + *nast-anzal.
      repeat = 'X'.
    ENDIF.
  ENDSELECT.
ENDFORM.                    "CHECK_REPEAT

Variable <i>repeat</i> can be used to add an additional text like 'COPY' or to exit print program without printing second version.

I guess, this select is not fool proofed - users still might find a way to print twice without your notice, but it's a start. You should have a look at <i>anzahl[/i), too - this variable steers the number of copies and should be set to 1 in your requirement.

Regards,

Christian

Former Member
0 Kudos

Yes it can be done,

For a example in PM module table/field T392_V-TDCOPIES is used to store number of copies printer.

Prabhu Rajesh.