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: 

Duplicate printing

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos

Hi

ensur the data passed to the functional module of the samrt forms for two data are different

regards

priya

Former Member
0 Kudos

Hi,

Comment the select on the table T166U,It is from that table that the "duplicate" will be picked.

Former Member
0 Kudos

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

0 Kudos

Thank you.

I was working on that same solution.

0 Kudos

Hi,

Great . My Reply helped you in resolving your issue.

Please check Standard print program RLB_INVOICE for data declarations.

Lanka