disallow duplication on order sale

SOLVED

hello ;

i want to disallow duplication on order sales by showing a message "Duplication disallowd".

i wrote this specific code but it's not working 

$ACTION
Case ACTION
 When default
Endcase
Return

Subprog C_NUM(VALEUR)
Variable Char    VALEUR()
If clalev ([F:SOH])<=0 Local File  SORDER[SOH] Endif
Read [F:SOH]S0H0 = VALEUR
      If  fstat<>0
          GMESSAGE="Duplication disallowd!!"
          mkstat=2
      Endif
End

any one can help me.?