Application Development and Automation 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: 
Read only

Duplicate printing

Former Member
0 Likes
1,556

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
Read only

Former Member
0 Likes
1,280

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
Read only

Former Member
0 Likes
1,280

Hi

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

regards

priya

Read only

Former Member
0 Likes
1,280

Hi,

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

Read only

Former Member
0 Likes
1,281

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

Read only

0 Likes
1,280

Thank you.

I was working on that same solution.

Read only

0 Likes
1,280

Hi,

Great . My Reply helped you in resolving your issue.

Please check Standard print program RLB_INVOICE for data declarations.

Lanka