Skip to Content
0
Dec 15, 2010 at 08:50 AM

Also problems in automatic generation of business partner no.

10 Views

Hello,

I've studied all the entries in the forum concerning automatic BP no. generation, but I am getting

the internal error 8180 with the follwoing script:

if $[ocrd.cardtype] ='S'

begin

select CAST ((MAX (CAST (T0.CardCode AS Numeric)) + 1 ) AS VARCHAR) from [dbo].[ocrd] T0 where T0.cardtype = 'S'

end

else

begin

select CAST ((MAX (CAST (T0.CardCode AS Numeric)) + 1 ) AS VARCHAR) from [dbo].[ocrd] T0 where T0.cardtype != 'S'

end

Our GP Code starts with 2701000000 for customer and leads and 2702000000 for suppliers. Related companies have external numbers like 0009000100 with leading zeros.

Can anyone help ?

Thanks in advance.

Michael