cancel
Showing results for 
Search instead for 
Did you mean: 

Stored Procedure to set required value in UDF

wojciech_domanski
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

KennedyT21
Active Contributor
0 Kudos

Hi

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

Rgds

Answers (1)

Answers (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Have you tried with FMS instead of SP?

Thank you

wojciech_domanski
Participant
0 Kudos

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