Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

FMS ISSUE

Hi Expert,

Please Provide Solution

when run FMS than occur internal Error.

Declare @Ref nvarchar(30)

Declare @Dust nvarchar(30)

Declare @Other nvarchar(30)

Declare @Bar nvarchar(30)

Declare @Moist nvarchar(30)

Declare @ActMoist nvarchar(30)

Declare @Per nvarchar(30)

Declare @Price nvarchar(30)

Declare @Total nvarchar(30)

Declare @Ref1 numeric(16,2)

Declare @Dust1 numeric(16,2)

Declare @Other1 numeric(16,2)

Declare @Bar1 numeric(16,2)

Declare @Moist1 numeric(16,2)

Declare @ActMoist1 numeric(16,2)

Declare @Per1 numeric(16,2)

Declare @Price1 numeric(16,2)

Declare @Total1 numeric(16,2)

Set @Ref = $[OPCH.U_REFRACTION]

set @Dust = $[OPCH.U_DUST]

set @Other = $[OPCH.U_OTHERS]

set @Bar = $[OPCH.U_BARDANA]

set @Moist = $[OPCH.U_Moisture]

set @ActMoist = $[OPCH.U_Act_Moisture]

Set @Price=$[PCH1.Price]

Set @Total=$[Pch1.LineTotal]

Set @Per = $[OPCH.DiscPrcnt]

Set @Ref1 = Convert(numeric(16,2),@Ref)

set @Dust1 = Convert(numeric(16,2),@Dust)

set @Other1 = Convert(numeric(16,2),@Other)

set @Bar1 = Convert(numeric(16,2),@Bar)

set @Moist1 = Convert(numeric(16,2),@Moist)

set @ActMoist1 = Convert(numeric(16,2),@ActMoist)

Set @Per1 = CONVERT(numeric(16,2),@Per)

set @Total1=CONVERT(numeric(16,2),@Total)

set @Price=CONVERT(numeric(16,2),@Price)

if((@ActMoist1 - @Moist1) < 0)

begin

    set @ActMoist1 = 0

end

else

Begin

set @ActMoist1 = (@ActMoist1 - @Moist1)

end

set @Ref1=@Ref1+@Dust1+@Other1

set @Ref1=@Ref1*@Price1

set @Bar1=@Bar1*4

set @Ref1=@Ref1+@Bar1

set @Ref1=(@Ref1*100)/@Total1

set @Ref1=@Ref1+@ActMoist1+@Per1

--set @Ref1 = @Ref1 + @Dust1 + @Other1 + @Bar1 + @ActMoist1 + @Per1

Select @Ref1

Not what you were looking for? View more on this topic or Ask a question