on 02-14-2018 2:53 PM
Hi All,
I want to trigger a validation through transaction notification for a document in draft mode.
ODRF - Object Type is 112 is working properly.
OPDF - Object Type is 140 is working properly.
But getting problem while triggering draft validation for Inventory Posting, Inventory Opening Balance, and Inventory Counting.
While adding the document for Inventory Posting in the draft the entry goes in OIPD Table.
While adding the document for Inventory Counting in the draft the entry goes in OICD Table.
While adding the document for Inventory Opening Balance in the draft the entry goes in OIOD Table.
But I am not able to trigger the validation through transaction notification for a draft document for Inventory Posting, Inventory Opening Balance, and Inventory Counting.
Hi Nishant Kamath,
If you create the table below
CREATE TABLE [dbo].[allupdates](
[id] [int] IDENTITY(1,1) NOT NULL,
[updatedatetime] [datetime] NOT NULL,
[object_type] [nvarchar](20) NULL,
[transaction_type] [nchar](1) NULL,
[num_of_cols_in_key] [int] NULL,
[list_of_key_cols_tab_del] [nvarchar](255) NULL,
[list_of_cols_val_tab_del] [nvarchar](255) NULL,
PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[allupdates] ADD DEFAULT (getdate()) FOR [updatedatetime]
GO
and add the code below to the posttransactionnotice
insert into allupdates (
object_type,
transaction_type ,
num_of_cols_in_key ,
list_of_key_cols_tab_del ,
list_of_cols_val_tab_del
)
values(
@object_type,
@transaction_type,
@num_of_cols_in_key ,
@list_of_key_cols_tab_del ,
@list_of_cols_val_tab_del
)
and ALL that comes in to the posttransactionnotice will be logged
and don't forget to check th cnts table.
Regards
Ad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ad Kerremans,
Thanks for your help.
I tried your solution by creating a table of allupdates for tracking object type of Inventory Opening Balance Draft but no luck.
I am getting object type 1470000131 for Inventory Opening Balance Draft but validation is not triggered in the draft.
Do you know the Object Type for Inventory Opening Balance Draft, Inventory Counting Draft and Inventory Posting Draft?
Regards,
Nishant Kamath
Sr Software Developer
Hi,
Use object type 10000071 and then try.
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Share your transaction notification here to check. Did you add correct object type?
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nagaranjan ,
My problem is that I am not getting exact object id of Inventory posting draft validation.
When I add the document of Inventory posting in the draft the entry goes in the OIPD TABLE.
Please help me to find the which object id should I use for Inventory posting draft validation.
The actual object id of Inventory Posting is 10000071 but it is not working from draft validation also I tried 112 object id which is the default for marketing document.
I have also checked Transaction notification setting table i.e CTNS please find the attachment
Which object_type should I use for Inventory posting draft validation
IF :object_type = '112' AND (:transaction_type='A' or :transaction_type='U') THEN
select (select 1 from OIPD T0 where T0."DocEntry" = :list_of_cols_val_tab_del AND IFNULL(T0."SlpCode", '1') = '1') INTO cnt FROM DUMMY;
IF :cnt > 0 THEN
error := -22000;
error_message := 'BF - Enter LOB.';
END IF;
END IF;
Thanks & Regards,
Nishant Kamath
Sr Technical Consultant
Hi,
Did you try logging everything that comes in the transaction notification.
and did you check the records in the CTNS table?
Regards
Ad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ad Kerremans,
My problem is that I am not getting exact object id of Inventory posting draft validation.
When I add the document of Inventory posting in the draft the entry goes in the OIPD TABLE.
Please help me to find the which object id should I use for Inventory posting draft validation.
The actual object id of Inventory Posting is 10000071 but it is not working from draft validation also I tried 112 object id which is the default for marketing document.
I have also checked Transaction notification setting table i.e CTNS please find the attachment
Which object_type should I use for Inventory posting draft validation
IF :object_type = '112' AND (:transaction_type='A' or :transaction_type='U') THEN
select (select 1 from OIPD T0 where T0."DocEntry" = :list_of_cols_val_tab_del AND IFNULL(T0."SlpCode", '1') = '1') INTO cnt FROM DUMMY;
IF :cnt > 0 THEN
error := -22000;
error_message := 'BF - Enter LOB.';
END IF;
END IF;
Thanks & Regards,
Nishant Kamath
Sr Technical Consultant
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.