Delete a sales order line

SUGGESTED

In X3 V12 I’m attempting to delete a sales order line when an order is copied using Call SUP_LIG(NLIG,WRET) From SUBSOHB where NLIG is the line number ([M:SOH4]NBLIG) to be deleted. The correct row is deleted but when the order is saved, I’m getting the error:

Table: SORDERP [SOP]

Key [Order Number] 3000 3000

No current records. 

Any help is appreciated.

Thanks