Composição de Estrutura
A tabela SBU faz parte do sistema ERP Protheus da TOTVS e é utilizada para composição de estrutura.
Ela pertence ao dicionário de dados do Protheus (SX2) e armazena informações essenciais utilizadas em processos como cadastros, movimentações e integrações do sistema.
A tabela SBU possui diversos campos (SX3), cada um com regras específicas como tipo, tamanho e validações, além de índices (SIX) que otimizam a performance das consultas.
Nesta página você pode consultar a estrutura completa da tabela SBU, incluindo todos os campos e índices relacionados.
| Propriedade | Valor |
|---|---|
| X2_CHAVE | SBU |
| X2_PATH | \DATA\ |
| X2_ARQUIVO | SBU990 |
| X2_NOME | Composição de Estrutura |
| X2_NOMESPA | Composición de Estructura |
| X2_NOMEENG | Structure Composition |
| X2_ROTINA | - |
| X2_MODO | E |
| X2_MODOUN | E |
| X2_MODOEMP | E |
| X2_DELET | 0 |
| X2_TTS | - |
| X2_UNICO | BU_FILIAL+BU_BASE+BU_IDC1+BU_IDC2+BU_COMP+BU_TRT |
| X2_PYME | S |
| X2_MODULO | 10 |
| X2_DISPLAY | - |
| X2_SYSOBJ | - |
| X2_USROBJ | - |
| X2_POSLGT | 1 |
| X2_CLOB | 2 |
| X2_AUTREC | 2 |
| X2_TAMFIL | 2 |
| X2_TAMUN | 0 |
| X2_TAMEMP | 0 |
| X2_STAMP | 2 |
| X2_INSDT | 2 |
| D_E_L_E_T_ | - |
| R_E_C_N_O_ | 8104 |
| R_E_C_D_E_L_ | 0 |
| X3_ARQUIVO | X3_ORDEM | X3_CAMPO | X3_TIPO | X3_TAMANHO | X3_DECIMAL | X3_TITULO | X3_TITSPA | X3_TITENG | X3_DESCRIC | X3_DESCSPA | X3_DESCENG | X3_PICTURE | X3_VALID | X3_USADO | X3_RELACAO | X3_F3 | X3_NIVEL | X3_RESERV | X3_CHECK | X3_TRIGGER | X3_PROPRI | X3_BROWSE | X3_VISUAL | X3_CONTEXT | X3_OBRIGAT | X3_VLDUSER | X3_CBOX | X3_CBOXSPA | X3_CBOXENG | X3_PICTVAR | X3_WHEN | X3_INIBRW | X3_GRPSXG | X3_FOLDER | X3_PYME | X3_CONDSQL | X3_CHKSQL | X3_IDXSRV | X3_ORTOGRA | X3_IDXFLD | X3_TELA | X3_PICBRV | X3_AGRUP | X3_POSLGT | X3_MODAL | X3_CHKSUM | X3_ADDSUM | D_E_L_E_T_ | R_E_C_N_O_ | R_E_C_D_E_L_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SBU | 01 | BU_OK | C | 4 | 0 | Ok | Ok | OK | Substituir Componentes | Sustituir Componentes | Replace Components | - | - | x x x x x x x x x x x x x x x | - | - | 1 | x xx | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128550 | 0 |
| SBU | 02 | BU_FILIAL | C | 2 | 0 | Filial | Sucursal | Branch | Filial do Sistema | Sucursal del Sistema | System Branch | - | - | x x x x x x x x x x x x x x x | - | - | 1 | - | - | - | - | N | - | - | - | - | - | - | - | - | - | - | 033 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128551 | 0 |
| SBU | 03 | BU_BASE | C | 14 | 0 | Codigo Base | Codigo Base | Base Code | Codigo Base | Codigo Base | Base Code | @! | - | x x x x x x x x x x x x x x x xx | - | - | 1 | x x xxx | - | - | - | S | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 128552 | 0 |
| SBU | 04 | BU_IDC1 | C | 24 | 0 | Primario | Primario | Primary | Primario | Primario | Primary | @! | - | x x x x x x x x x x x x x x x xx | - | - | 1 | x x xx | - | - | - | S | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128553 | 0 |
| SBU | 05 | BU_IDC2 | C | 24 | 0 | Secundario | Secundario | Secondary | Secundario | Secundario | Secondary | @! | - | x x x x x x x x x x x x x x x xx | - | - | 1 | x x xx | - | - | - | S | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128554 | 0 |
| SBU | 06 | BU_COMP | C | 15 | 0 | Componente | Componente | Component | Componente | Componente | Component | @! | NaoVazio().And.ExistCpo("SB1") | x x x x x x x x x x x x x x x xx | - | SB1 | 1 | x x xxx | - | - | - | S | - | - | - | - | - | - | - | - | - | - | 030 | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 128555 | 0 |
| SBU | 07 | BU_QUANT | N | 12 | 6 | Quantidade | Cantidad | Quantity | Quantidade do Item | Cantidad del Item | Item Quantity | 99999.999999 | NaoVazio() | x x x x x x x x x x x x x x x x | - | - | 1 | x x xx | - | - | - | S | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128556 | 0 |
| SBU | 08 | BU_CONDICA | C | 30 | 0 | Condicao | Condicion | Condition | Condicao | Condicion | Condition | @! | SbtVldForm() | x x x x x x x x x x x x x x x x | - | SBT | 1 | x x xx | - | - | - | S | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128557 | 0 |
| SBU | 09 | BU_FORMSHK | C | 10 | 0 | Formula Qtd. | Formula Ctd. | Formula Qty. | Formula Qtd. x Caracter. | Formula Ctd. vs. Caracter | Formula Qty. x Character | @! | A093VLDFSHK() | x x x x x x x x x x x x x x x x | - | SHKCF1 | 1 | x xx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128558 | 0 |
| SBU | 10 | BU_OBS | C | 30 | 0 | Observacao | Observacion | Note | Observacao | Observacion | Note | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x x xx | - | - | - | S | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128559 | 0 |
| SBU | 11 | BU_INI | D | 8 | 0 | Dt Inicial | Fch. Inicial | Initial Date | Data Inicial | Fecha Inicial | Initial date | @! | NaoVazio() | x x x x x x x x x x x x x x x x | dDataBase | - | 1 | x x xx | - | - | - | S | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128560 | 0 |
| SBU | 12 | BU_FIM | D | 8 | 0 | Dt Final | Fch. Final | Final Date | Data Final | Fecha Final | Final date | @! | NaoVazio() | x x x x x x x x x x x x x x x x | CTOD("31/12/49", "ddmmyy") | - | 1 | x x xx | - | - | - | S | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128561 | 0 |
| SBU | 13 | BU_POTENCI | N | 6 | 2 | Potencia | Potencia | Potency | Potencia de Lote | Potencia de Lote | Lot potency | @E 999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | x xxxx x | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128562 | 0 |
| SBU | 14 | BU_PERDA | N | 5 | 2 | Indice Perda | Indice Perdi | Loss ind. | Indice de Perda | Indice de Perdida | Loss index | @E 99.99 | Positivo() | x x x x x x x x x x x x x x x x | - | - | 1 | x xx x | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128563 | 0 |
| SBU | 15 | BU_TRT | C | 3 | 0 | Sequencia | Secuencia | Sequence | Sequencia | Secuencia | Sequence | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x xx | - | - | - | S | A | - | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128564 | 0 |
| SBU | 16 | BU_TIPVEC | C | 6 | 0 | Tipo vetor | Tipo Vector | Vector Type | Tipo Vetor | Tipo Vector | Vector Type | - | - | x x x x x x x x x x x x x x x x x | SBP->BP_TIPVEC | - | 1 | x xx x | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128565 | 0 |
| SBU | 17 | BU_VECTOR | C | 6 | 0 | Vetor | Vector | Vector | Vetor | Vector | Vector | - | VAZIO().OR.EXISTCPO("SHV",SBP->BP_TIPVEC+M->BU_VECTOR,1) | x x x x x x x x x x x x x x x x x | - | SHVBU | 1 | x xx x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128566 | 0 |
| SBU | 18 | BU_GROPC | C | 3 | 0 | Grupo Opc. | Grupo Opc. | Option.Grp | Grupo de Opcionais | Grupo de Opcionales | Optional Group | @! | Vazio() .Or. ExistCpo('SGA') | x x x x x x x x x x x x x x x x | - | SGA | 1 | x xx | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128567 | 0 |
| SBU | 19 | BU_OPC | C | 4 | 0 | Item Opc. | Item Opc. | Option.Item | Item Grupo de Opcionais | Item Grupo de Opcionales | Optional Group Item | @! | A093VldOpc() | x x x x x x x x x x x x x x x x | - | - | 1 | x xx | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 128568 | 0 |
| INDICE | ORDEM | CHAVE | DESCRICAO | DESCSPA | DESCENG | PROPRI | F3 | NICKNAME | SHOWPESQ | IX_VIRTUAL | IX_VIRCUST | D_E_L_E_T_ | R_E_C_N_O_ | R_E_C_D_E_L_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SBU | 1 | BU_FILIAL+BU_BASE+BU_IDC1+BU_IDC2+BU_COMP+BU_TRT | Codigo Base + Primario + Secundario + Componente + Sequencia | Codigo Base + Primario + Secundario + Componente + Secuencia | Base Code + Primary + Secondary + Component + Sequence | S | - | - | S | 2 | 3 | - | 18662 | 0 |
| SBU | 2 | BU_FILIAL+BU_BASE+BU_GROPC | Codigo Base + Grupo Opc. | Codigo Base + Grupo Opc. | Base Code + Option.Grp | S | - | - | N | 2 | 3 | - | 18663 | 0 |
Ela é utilizada para composição de estrutura dentro do sistema ERP Protheus.
Nesta página você pode visualizar todos os campos, incluindo tipo, tamanho e validações.
Os índices são estruturas que melhoram a performance de busca e acesso aos dados dentro do Protheus.
Modelo de query gerado automaticamente com base na estrutura da tabela.
SELECT
BU_OK,
BU_FILIAL,
BU_BASE,
BU_IDC1,
BU_IDC2,
BU_COMP,
BU_QUANT,
BU_CONDICA,
BU_FORMSHK,
BU_OBS,
BU_INI,
BU_FIM,
BU_POTENCI,
BU_PERDA,
BU_TRT,
BU_TIPVEC,
BU_VECTOR,
BU_GROPC,
BU_OPC
FROM SBU
WHERE
D_E_L_E_T_ = ' '
AND BU_OK = 'VALOR'
AND BU_FILIAL = 'VALOR'
AND BU_BASE = 'VALOR'
AND BU_IDC1 = 'VALOR'
AND BU_IDC2 = 'VALOR'
AND BU_COMP = 'VALOR'
AND BU_QUANT = 0
AND BU_CONDICA = 'VALOR'
AND BU_FORMSHK = 'VALOR'
AND BU_OBS = 'VALOR'
AND BU_INI BETWEEN '20260501' AND '20260531'
AND BU_FIM BETWEEN '20260501' AND '20260531'
AND BU_POTENCI = 0
AND BU_PERDA = 0
AND BU_TRT = 'VALOR'
AND BU_TIPVEC = 'VALOR'
AND BU_VECTOR = 'VALOR'
AND BU_GROPC = 'VALOR'
AND BU_OPC = 'VALOR'