cancel
Showing results for 
Search instead for 
Did you mean: 

'repeat print' for every print other than first print.

Former Member
0 Kudos

Hello All,

I have Z smartform for Purchase order. In that i require that text "repeat print" should be printed if a particular Purchase order is printed more than once.

for ex. if i am printing a PO no. 12345 for first time then "repeat print" should not be printed. for every other print for PO no.12345 it should print "repeat print".

Can anyone Please tell me how can i achieve this . i hope i have explained my problem clearly, if anyone requires any futher clarification then let me know.

Thanks in advance

regards

Prakash

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi All,

I have created a Ztable which contains the status of the PO(wether printed or not). I have written code in SF to update the table. Now my problem is that the table is only updated when i give print directly without preview my ztable is updated properly but if i preview it first and then print from preview screen then my table is not updated. following is the code i am using for it.

if JOB_OUTPUT_OPTIONS-tdpreview = ' '.

move PO_NO TO IT_REPRINT-DOC_NO.

MOVE 'X' TO IT_REPRINT-STATUS.

MOVE SFSY-TIME TO IT_REPRINT-ETIM.

MOVE SFSY-DATE TO IT_REPRINT-EDATE.

MOVE SFSY-USERNAME TO IT_REPRINT-ENAM.

MODIFY ZREPRINT FROM IT_REPRINT.

ENDIF.

CAN anyone suggest me some event or some system flag that is set only if the SF is printed and not in preview.IF u have any other suggestion it is welcomed.

Thanks in Advance.

Prakash.

Former Member
0 Kudos

hi,

One way to go for it

Maintain a flag in z-table for the PO to check if the print is first or reprint

if it is first then set the flag , if the flag is set it is reprint

in the program maintain a variable which will hold the value reprint if it is reprint

and manage the check number s accordingly

other way is to ask the details on select screen .

That is radio button for print or re-print

if for reprint they need layout changes then

make another smartform and based on the print or reprint criteria call the appropriate form

Based on the inputs from functional and how the first Print program is coded make the necessary changes

Former Member
0 Kudos

Hello rohit,

i have maintained the flag for reprint in my z table .Now my problem is the flag is set even when i see the print preview without taking a print. i want the flag should be set only when the print is taken n not when preview is seen.Can u please tell me what condition i should use to update my ztable accordingly.

regards

Prakash

Former Member
0 Kudos

hi

see when u click on print button

the sy-ucomm = 'PRNT' .

so if sy-ucomm = 'PRNT' .

then update the flag ..

endif.

i guess this will solve the issue

Do give points to helpful answers..

Edited by: rohit dugaya on Apr 20, 2009 9:12 PM

Former Member
0 Kudos

Hi,

Try the below solutions..

1. If your Z smart form is configured in the NACE transaction than check the NAST table which holds the print details in the field vstat if it is 1 then the form has already printed.

2. Try using Copies Window.https://

Former Member
0 Kudos

hello Avinash,

my Zsmartform is not configured with NACE so i tryed using the copies windows option.

i have created a new window type copies window., but still the text in the window is printed every time i print. can u please tell me what else i can do for it.

Former Member
0 Kudos

Hi,

Under Copy window you need to create the Text element & program lines and write this code..

IF SFSY-COPYCOUNT GT 001.
  TEXT = 'Repeat Print'.
ENDIF.

Refer to this link..

http://help.sap.com/saphelp_nw70/helpdata/EN/b1/243fe0beee11d4b633006094192fe3/content.htm

Check the example Sap technical.com with search term Demo on Copies Window (Real time scenario)