cancel
Showing results for 
Search instead for 
Did you mean: 

Multi Segment Journal

Former Member
0 Kudos

HI Guys

is it possible to block a manual journal entry that has different segments on the journal lines through the transaction notification?

I have a udf that has the segment on it but cannot seem to block the journal with a SP.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi!

It's very much possible through SP Trans.

Could u please explain the scenario !

On what basis (condition) do u want to block the entry ?

Former Member
0 Kudos

Hi

Yes i have been trying to get the SP in the Transaction Notification to work but i cannot.

The scenario is that a user will try to post to a different segment, they can post the Journal to either the VER segment or the BLM segment, they should not be allowed to post to the BLM and VER segment accounts in one journal entry.

I have a Formatted Search that returns the VER or BLM segment on the Lines so that is how i get the Value for the Stored Procedure.

Former Member
0 Kudos

Hi!

Please put your code here !

Let me also help on that.

Former Member
0 Kudos

HI

if @object_type = '30' and @transaction_type IN ('A', 'U')

BEGIN

DECLARE @InterCompany as varchar(10)

Select @InterCompany =

t0.transid from jdt1 t0 inner join dbo.oact t1 on t0.shortname = t1.acctcode

inner join dbo.oact t2 on t0.contraAct = t1.acctcode

where (t1.Segment_1 like '%blm' and t1.Segment_1 like '%ver' ) or (t2.Segment_1 like '%ver' and t2.Segment_1 like '%blm') and dt0.docentry = list_of_cols_val_tab_del

IF (@InterCompany '' )

begin

select @error = 1, @error_message = 'You cannot Create JE's across Segments'

end

end

Former Member
0 Kudos

Hi!

Try this working fine !

Close the Thread !!

if @object_type = '30' and @transaction_type IN ('A', 'U')
BEGIN
if exists (select t0.transid from jdt1 t0,oact a0
where
t0.transid = @list_of_cols_val_tab_del and
t0.Account=a0.acctcode and
a0.Segment_1 != (select max(a1.Segment_1) from jdt1 t1,oact a1 where t1.transid = t0.transid and
t1.Account=a1.acctcode	
))
begin
select @error = 1, @error_message = 'You cannot Create JE s across Segments'
end
end

Edited by: Suraj V on Aug 3, 2009 3:24 PM

Former Member
0 Kudos

Awesome, much appreciated

Answers (1)

Answers (1)

former_member197621
Active Contributor
0 Kudos

Hai Euston Ferreira

U want to block manual JE with multiple segment Account Code???