on 10-15-2015 10:04 AM
Hi,
I need to monitor changes on the additions and updates for the business partners special prices. I have a challenge while implementing the
@num_of_cols_in_key because I understand a special price object number 7 has two keys i.e CardCode and ItemCode both from OSPP table.
I have tested with this sql code:
IF ((@object_type = 7) AND (@transaction_type = 'U'))
BEGIN
IF EXISTS (SELECT T0.ItemCode, T0.CardCode, T0.Price, T0.Currency, T0.Discount, T0.ListNum FROM OSPP T0 WHERE
T0.ItemCode = @list_of_key_cols_tab_del)
BEGIN
What am I doing wrong?
Hi Paul,
I know this answer is way too late already, however the script below works for my transaction notification regarding special prices. I hope you can use this as your guide in writing your script.
----Uncheck the Auto Box in OSPP
if @object_type = '7' and @transaction_type in ('A','U')
begin
if exists
( Select * from OSPP
where (RTRIM(@list_of_key_cols_tab_del) LIKE 'CardCode' + CHAR(9) + 'ItemCode')
and cardcode = left(@list_of_cols_val_tab_del,len(cardcode))
and itemcode = right(@list_of_cols_val_tab_del,len(itemcode))
and AutoUpdt = 'Y'
)
Begin
set @error = 7000014
set @error_message ='Please Uncheck the "Auto" Box'
select @error, @error_message
return
End
End
Sincerely,
Melvin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can you explain your requirement in detail
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I would like to create insert into select where I am getting the updated fields from the OSPP whenever a change occurs.
I am having a problem with Sp transaction notification for the "Special Prices object" as it has two keys and two values that is CardCode and ItemCode. I have also trie using "T0.ItemCode in (@list_of_cols_val_tab_del) " to no avail.
What could be the problem?
Regards,
Paul.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.