serial number Answered

João Antonio

Need help!
I need to set up a serial number for production order, in the serial configuration I need to run a procudure and display an error.
Image one where proc is.
The second image is the field size error.
Do you Any idea.

 

 

Comments

1 comment

  • Comment author
    João Antonio
    Hi friends,
    The problem is already solved.
    Here's the solution:
     
    function nextnumber
     
    setvar=ItemCode=<select Itemcode from OITM  where ItemCode = '{dw_1.item.ItemCode.value}'>
    sql=execute dbo.FRANumeroSerie <ItemCode>
    setvar=beas_numberfirst=<select RTRIM(LTRIM(CAST(RTRIM(LTRIM(A.U_CODMOD)) +''+ RTRIM(LTRIM(CAST(A.U_SEQPREF AS CHAR)))+ ''+ RTRIM(LTRIM(CAST(A.U_SEQ AS CHAR))) AS CHAR(40)))) as chassi from "@FRV_CCHA" a inner join OITM i on i.U_codmod = a.Code where i.ItemCode = '{dw_1.item.ItemCode.value}'>
    setvar=beas_localserial=<beas_numberfirst>
    setstr=s_parm1=<beas_localserial>
     
    end function

     

    0

Please sign in to leave a comment.