Hi,

This code in DD works for me in 16.1 (and previous)

Code:
    Procedure Creating
        Integer iField iLastID iOrden
        String sCodCliente
        Date dFecha_Dia
        
        SysDate4 dFecha_Dia
        
        Forward Send Creating            
            
        Move FAC_D004.CODIGO to sCodCliente
                     
        Clear CLIENTES
        Move sCodCliente to CLIENTES.CODIGO
        Get_FieldNumber CLIENTES.ORDEN to iField
        Fill_Field CLIENTES.File_Number iField With DF_HIGH
        Find LE CLIENTES by 1
            If ((Found) and (CLIENTES.CODIGO = sCodCliente)) Move CLIENTES.ORDEN to iLastID
                Else Move -1 to iLastID
        Increment iLastID                         
                                 
        Clear CLIENTES
        Send Request_Entry_Update of (Record_Buffer(Self)) (Main_File(Self)) 3
        Move sCodCliente to CLIENTES.CODIGO
        Move iLastID     to CLIENTES.ORDEN
        Move dFecha_Dia  to CLIENTES.FECHA
        
        Get piOrden to iOrden
        Move iOrden      to CLIENTES.ORDEN_LINEAS
        Set piOrden to 2    //valor por defecto    
    End_Procedure
In this version the record is not created.