Issuing 'Original' & 'Duplicate' in Smart form Output

...Previous

Step 2 – Implement below logic in INITIALIZATION section of Smartform.

Find out copy number. How? : In NAST table, we get the entries for all messages status. It maintain field VSTAT with any value as shown in below table.

We can use input structure IS_NAST which is available for invoices. This structure has data like application, message type and object key.

Select single entry from NAST table Where  
      Application (KAPPL    = < app. Group like V1, V2, V3 etc >
      Object key (OBJKY)      = < Document number >
      Message type (KSCHL) = < Msg. type like ZR00 >
      Processing status (VSTAT) = 1  .

IF SY-SUBRC <> 0.
     IMG_NAME = 
'TEXT_ORIGINAL'.
ELSE.
     IMG_NAME = 
'TEXT_DUPLICATE'.
ENDIF.

If it selects any entry that means original copy is already been processed and this is a duplicate copy; Else this is original copy.

Step 2 – Show the image in page background. If not required to show in background then instead of setting as page background you can show it in separate graphic window.

Results -

You will see Original text printed only at first time you print output. For rest all attempts it will show output as Duplicate copy.

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image