On some PO are causing  errors when importing.


This can be caused by non valid characters from the integration data.


 Log file need to be set at Debug level to find.


If the character is 0x0b (vertical tab or | ) then this will cause a failure when importing.



Create a function


/****** Object:  UserDefinedFunction [dbo].[fnRemoveNonAlphaCharacters]    Script Date: 20/01/2017 11:58:22 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE Function [dbo].[fnRemoveNonAlphaCharacters](@Temp VarChar(1000))
Returns VarChar(1000)
AS
Begin

    Declare @KeepValues as varchar(50)
    Set @KeepValues = '%[^a-z^0-9 .,!@#$%^&*()]%'
    While PatIndex(@KeepValues, @Temp) > 0
        Set @Temp = Stuff(@Temp, PatIndex(@KeepValues, @Temp), 1, '')

    Return @Temp
End
GO



In the import script for the POLINE section when writing the sgItemDescription use  dbo.fnRemoveNonAplhaCharacters(sgItemDescription)