EXPERT RESPONSE
The message control table NAST contains the information you seek. So one way to handle the requirement in a Smart Form is to add logic to the form' Initialization section, which queries this table with all relevant keys (e.g. your particular output type and document number) plus an output status indicator (VSTAT) = '1' (completed successfully). If such a record is found, this likely is a reprint. You could then set a global flag which is passed out of this section and added as a condition to the node which prints 'REPRINT/DUPLICATE'.
For the SAPscript version, see SAP program RVADDN01, form routine CHECK_REPEAT.
|