Hi,
I have a trigger on POR1 table, which updates a UDF field when Insert/Update is done on POR1 lines.
If PO has a single line, it works great.
But, if there is more than one line, I'm getting the error message : 'Invalid Cursor' while trying to update PO.
I have stripped down the trigger, so that it is in its simplest form.
Still I'm getting the invalid cursor error.
Simplest form of Trigger:
Create Trigger AIT_FWA_POR ON POR1
AFTER INSERT
AS
Begin
Update POR1 Set U_ShipCost = '10'
FROM POR1,Inserted where POR1.DocEntry = Inserted.DocEntry
End
If I see what happens in SQL profiler, it appears that SAP is deleting the POR1 rows (and reinserts?).
Please let me know how I can fix it, or more details about the internal functionality.
Your valuable inputs in fixing the problem will be highly appreciated.
Thanks in advance.
Regards,
Geetha