Skip to Content
0

How to create many SBO_TransactionNotification at once time in SAP B1

Aug 04, 2017 at 08:51 AM

36

avatar image
Former Member

Hi all,
I want to create two or more SBO_TransactionNotification at once time
Can you help me pls?

Thanks all.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Balaji Selvaraj Aug 04, 2017 at 08:54 AM
0

Hi Ngoc Nguyen,

Can you brief it for which transaction you want ot create SP and for what condition

Show 7 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Balaji.S
I want to create SP to Block Post AP Invoice Draft document and Block Post Journal Voucher Draft document
But I dont know how to create 2 SP in once time. Can you explain me

Thanks

capture.png (14.6 kB)
0

Hi this one considers draft and then the Document.

Declare @draft_object int

if @object_type = '112' and @transaction_type in ('A', 'U') begin

select @draft_object = ObjType from ODRF where DocEntry = CAST(@list_of_cols_val_tab_del as int)

if @draft_object = 18

if exists (select T0.DocEntry from DRF1 T1 inner join ODRF T0 on T0.DocEntry = T1.DocEntry where (T1.OcrCode is null or T1.OcrCode = '') and T0.[DocEntry] = cast(@list_of_cols_val_tab_del as int) and T0.ObjType = @draft_object) begin

set @error = 30001

set @error_message = '----' end end

0
Former Member

Hi Balaji.S,
Thanks for a lot.
But execept 2 SBO in there. I want to add more SBO. How i can set error massage for many SBO

0

For draft based document you can use this by changing the value of @draft_Object =' '

0
Former Member

Thanks. But I dont know how to set difference error message for other SBO. I see code there and I see only one error message for 2 SBO. Can you explain ?

0

You can set two error message example purpose below SP.

Declare @draft_object int


if @object_type = '112' and @transaction_type in ('A', 'U')


begin


  select @draft_object = ObjType from ODRF where DocEntry = CAST(@list_of_cols_val_tab_del as int)




  if @draft_object = 18 


   if exists (select T0.DocEntry from DRF1 T1 inner join ODRF T0 on T0.DocEntry = T1.DocEntry


    where (T1.OcrCode is null or T1.OcrCode = '')


    and T0.[DocEntry] = cast(@list_of_cols_val_tab_del as int) and T0.ObjType = @draft_object)


    begin


     set @error = 30002


     set @error_message = '-YYY-'  


    end


	if @draft_object = 17


   if exists (select T0.DocEntry from DRF1 T1 inner join ODRF T0 on T0.DocEntry = T1.DocEntry


    where (T1.OcrCode is null or T1.OcrCode = '')


    and T0.[DocEntry] = cast(@list_of_cols_val_tab_del as int) and T0.ObjType = @draft_object)


    begin


     set @error = 30001


     set @error_message = '-X-X-X-'  


    end
	


	 
end

1
Former Member

Hi thanks so much by your help

0