‎2006 Feb 24 4:42 PM
Hello all.
I have a program that prints a smartform.
The program and the smartform are prepared to print 2 copies of the document in wich the second copie contains the word duplicate.
The question is: how can i control duplicate messages so the user can't print the original again?
Thank you in advance.
Nuno Silva
‎2006 Feb 24 4:48 PM
Hi ,
Please check NAST for Duplicate records .
add the following code in your print program :
PERFORM check_repeat.
FORM CHECK_REPEAT .
CLEAR REPEAT.
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'.
REPEAT = 'X'.
ENDIF.
ENDSELECT.
ENDFORM. " CHECK_REPEAT
you just write logiC to exit your print program if you found REPEAT = 'X'.
OR
Then pass the REPEAT flag to smartform to write a text as 'DUPLICATE' .
Regards,
Lanka
‎2006 Feb 24 4:45 PM
Hi
ensur the data passed to the functional module of the samrt forms for two data are different
regards
priya
‎2006 Feb 24 4:48 PM
Hi,
Comment the select on the table T166U,It is from that table that the "duplicate" will be picked.
‎2006 Feb 24 4:48 PM
Hi ,
Please check NAST for Duplicate records .
add the following code in your print program :
PERFORM check_repeat.
FORM CHECK_REPEAT .
CLEAR REPEAT.
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'.
REPEAT = 'X'.
ENDIF.
ENDSELECT.
ENDFORM. " CHECK_REPEAT
you just write logiC to exit your print program if you found REPEAT = 'X'.
OR
Then pass the REPEAT flag to smartform to write a text as 'DUPLICATE' .
Regards,
Lanka
‎2006 Feb 24 5:02 PM
‎2006 Feb 24 5:07 PM
Hi,
Great . My Reply helped you in resolving your issue.
Please check Standard print program RLB_INVOICE for data declarations.
Lanka