Skip to Content
avatar image
Former Member

Stored Procedure to set required value in UDF

Hi,

For the purpose of an external application I need to have following information in Item Master Data UDF. The UDF is [U_StockStatus] in OITM table.

If stock status is 0 then value 0

If stock status is greater than 0 then value 1

Something like in following query:

SELECT CASE WHEN T1.[OnHand] <= 0 THEN '0' ELSE '1' END FROM OITM T0 INNER JOIN OITW T1 ON T0.[ItemCode] = T1.[ItemCode] WHERE T1.[WhsCode] = '01'

My question is:

Is it possible to achieve it by Stored Procedure to set automatically mentioned values in [U_StockStatus] field when [OnHand] field from OITW changes.

If Yes

What code should I insert to SBO_SP_TransactionNotification ?

Regards

Wojtek

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 13, 2016 at 10:03 AM

    Hi

    It is not advised to update the OITM UDF field with the SP.

    Rgds

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 13, 2016 at 03:31 PM

    Hi,

    Have you tried with FMS instead of SP?

    Thank you

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi

      I was thinking about FMS but rather could not rely on such a solution. (Copy to, Copy from etc will not trigger it)

      Rgds