Tabela B0H

CTB PLS – CRD Custos
10camposNome físicoB0H010(empresa 01)

Campos da tabela B0H

10 campos no dicionário de dados do TOTVS Protheus.

10
CampoDescrição
B0H_FILIAL
Caractere (C)(2)
Filial
Contexto:
Real
B0H_TPBENE
Caractere (C)(1)
Tipo Benefic
Máscara:
@!
Contexto:
Real
Validação:
Pertence('123456')
6 valores possíveis
  • 1B-Benef.Exposto
  • 2ENB-Exp.N.Benef
  • 3BNE-Benf.N.Exp.
  • 4PS-Preste.Servicos
  • 5BF-Benef. Funcionario
  • 6BE-Habitual
B0H_TIPPRE
Caractere (C)(3)
Classe RDA
Máscara:
@!
Contexto:
Real
Consulta F3:
B42PLS
Validação:
ExistCpo('BAG')
B0H_DESPRE
Caractere (C)(60)
Desc.Classe
Máscara:
@!
Contexto:
Virtual (não existe no banco)
B0H_TPPRES
Caractere (C)(1)
Tp.Prestador
Máscara:
@!
Contexto:
Real
Validação:
Pertence('0123456').AND. NaoVazio()
7 valores possíveis
  • 0Nulo
  • 1Proprio/Assal.
  • 2Prestador
  • 3Nao Prestador
  • 4Rede Propria
  • 5Rede Conven.
  • 6Intercambio
B0H_GRUOPE
Caractere (C)(2)
Grupo Operad
Máscara:
@!
Contexto:
Real
Consulta F3:
BA2PLS
Validação:
Vazio() .OR. BA2->(ExistCpo("BA2", M->B0H_GRUOPE,1))
B0H_DESGRP
Caractere (C)(20)
Desc.Grp.Ope
Máscara:
@!
Contexto:
Virtual (não existe no banco)
B0H_CONTA
Caractere (C)(20)
Conta Contab
Máscara:
@!
Contexto:
Real
Consulta F3:
CT1
Validação:
ExistCpo('CT1').or.Vazio()
B0H_DESCTA
Caractere (C)(60)
Desc.Conta
Máscara:
@!
Contexto:
Virtual (não existe no banco)
B0H_CODPRO
Caractere (C)(4)
Cod Produto
Máscara:
@!
Contexto:
Real
Consulta F3:
BI7PLS
Validação:
ExistCpo('BI3',PlsIntPad()+M->B0H_CODPRO,1).OR.VAZIO()

SELECT de exemplo da tabela B0H

No Protheus a tabela física leva o código da empresa (01 → 010) e registros excluídos ficam com D_E_L_E_T_ = '*'.

SQL · SQL Server
SELECT TOP 100
  B0H.B0H_FILIAL,
  B0H.B0H_TPBENE,
  B0H.B0H_TIPPRE,
  B0H.B0H_TPPRES,
  B0H.B0H_GRUOPE,
  B0H.B0H_CONTA,
  B0H.B0H_CODPRO
FROM B0H010 B0H
WHERE B0H.D_E_L_E_T_ = ' '

Tabelas próximas no índice do Protheus

O ERPSeeker é um projeto independente, sem vínculo com a TOTVS. A estrutura pode variar conforme a versão e as customizações do seu ambiente.