Skip to main content

serial number

Answered

Comments

1 comment

  • 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

     

Please sign in to leave a comment.