Ocorrência de viagens
A tabela G56 faz parte do sistema ERP Protheus da TOTVS e é utilizada para ocorrência de viagens.
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 G56 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 G56, incluindo todos os campos e índices relacionados.
| Propriedade | Valor |
|---|---|
| X2_CHAVE | G56 |
| X2_PATH | \DATA\ |
| X2_ARQUIVO | G56990 |
| X2_NOME | Ocorrência de viagens |
| X2_NOMESPA | Ocurrencia de viaje |
| X2_NOMEENG | Travel occurrences |
| X2_ROTINA | - |
| X2_MODO | C |
| X2_MODOUN | E |
| X2_MODOEMP | E |
| X2_DELET | 0 |
| X2_TTS | - |
| X2_UNICO | G56_FILIAL+G56_CODIGO |
| X2_PYME | N |
| X2_MODULO | 88 |
| 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_ | 4667 |
| 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| G56 | 01 | G56_FILIAL | C | 2 | 0 | Filial | Sucurs | 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 | x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | 033 | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75371 | 0 |
| G56 | 02 | G56_CODIGO | C | 6 | 0 | Código | Código | Code | Código da ocorrência | Código de ocurrencia | Occurrence code | @! | - | x x x x x x x x x x x x x x x x | GETSXENUM("G56","G56_CODIGO") | - | 1 | x x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 75372 | 0 |
| G56 | 03 | G56_TPOCOR | C | 6 | 0 | Tp Ocorren | Tp Ocurren | Occur Type | Tipo de Ocorrência | Tipo de ocurrencia | Occurrence Type | @! | - | x x x x x x x x x x x x x x x x | - | G6Q | 1 | x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75373 | 0 |
| G56 | 04 | G56_NMTPOC | C | 40 | 0 | Descrição | Descripción | Description | Descrição Tipo Ocorrência | Descrip Tipo Ocurrencia | Occurrence Type Descripti | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | S | V | V | - | - | - | - | - | - | - | POSICIONE("G6Q",1,XFILIAL("G6Q") + G56->G56_TPOCOR,"G6Q_DESCRI") | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75374 | 0 |
| G56 | 05 | G56_VIAGEM | C | 6 | 0 | Viagem | Viaje | Travel | Viagem Ocorrência | Viaje ocurrencia | Travel Occurrence | @! | - | x x x x x x x x x x x x x x x x | - | GYN | 1 | x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75375 | 0 |
| G56 | 06 | G56_DTVIAG | D | 8 | 0 | Dt Viagem | Fch Viaje | Travel Dt | Data da Viagem | Fecha del viaje | Travel Date | - | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75376 | 0 |
| G56 | 07 | G56_LOCORI | C | 6 | 0 | Origem | Origen | Origin | Localidade Origem | Lugar de origen | Origin Location | @! | - | x x x x x x x x x x x x x x x x | - | GIEINI | 1 | x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75377 | 0 |
| G56 | 08 | G56_NMLOCA | C | 40 | 0 | Descrição | Descripción | Description | Descrição Localidade | Descrip Localidad | Location Description | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | S | V | V | - | - | - | - | - | - | - | POSICIONE("GI1",1,XFILIAL("GI1") + G56->G56_LOCORI,"GI1_DESCRI") | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75378 | 0 |
| G56 | 09 | G56_LOCDES | C | 6 | 0 | Destino | Destino | Destination | Localidade Destino | Lugar de destino | Destination Location | @! | - | x x x x x x x x x x x x x x x x | - | GIEDES | 1 | x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75379 | 0 |
| G56 | 10 | G56_NMDEST | C | 40 | 0 | Descrição | Descripción | Description | Descrição Destino | Descripción destino | Destination Description | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | S | V | V | - | - | - | - | - | - | - | POSICIONE("GI1",1,XFILIAL("GI1") + G56->G56_LOCDES,"GI1_DESCRI") | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75380 | 0 |
| G56 | 11 | G56_HORA | C | 5 | 0 | Hora | Hora | Time | Hora da Ocorrência | Hora de la ocurrencia | Occurrence Time | @! 99:99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75381 | 0 |
| G56 | 12 | G56_MEMO | M | 10 | 0 | Descrição | Descripción | Description | Descrição da Ocorrência | Descripción de la ocurren | Occurrence Description | - | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75382 | 0 |
| G56 | 13 | G56_USRPRT | C | 8 | 0 | Usr Protheus | Usr Protheus | Protheus Use | Usuario Protheus | Usuario Protheus | Protheus User | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75383 | 0 |
| G56 | 14 | G56_STSOCR | C | 1 | 0 | Status | Estatus | Status | Status Ocorrência | Estatus ocurrencia | Occurrence Status | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75384 | 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| G56 | 1 | G56_FILIAL+G56_CODIGO | Código | Código | Code | S | - | - | S | 2 | 3 | - | 11066 | 0 |
| G56 | 2 | G56_FILIAL+G56_STSOCR+DTOS(G56_DTVIAG)+G56_HORA | Status + Dt Viagem + Hora | Estatus + Fch Viaje + Hora | Status + Travel Dt + Time | S | - | - | S | 2 | 3 | - | 11067 | 0 |
| G56 | 3 | G56_FILIAL+G56_VIAGEM | Viagem | Viaje | Travel | S | - | - | S | 2 | 3 | - | 11068 | 0 |
| G56 | 4 | G56_FILIAL+G56_LOCORI+G56_LOCDES | Origem + Destino | Origen + Destino | Origin + Destination | S | - | - | S | 2 | 3 | - | 11069 | 0 |
Ela é utilizada para ocorrência de viagens 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
G56_FILIAL,
G56_CODIGO,
G56_TPOCOR,
G56_NMTPOC,
G56_VIAGEM,
G56_DTVIAG,
G56_LOCORI,
G56_NMLOCA,
G56_LOCDES,
G56_NMDEST,
G56_HORA,
G56_MEMO,
G56_USRPRT,
G56_STSOCR
FROM G56
WHERE
D_E_L_E_T_ = ' '
AND G56_FILIAL = 'VALOR'
AND G56_CODIGO = 'VALOR'
AND G56_TPOCOR = 'VALOR'
AND G56_NMTPOC = 'VALOR'
AND G56_VIAGEM = 'VALOR'
AND G56_DTVIAG BETWEEN '20260401' AND '20260430'
AND G56_LOCORI = 'VALOR'
AND G56_NMLOCA = 'VALOR'
AND G56_LOCDES = 'VALOR'
AND G56_NMDEST = 'VALOR'
AND G56_HORA = 'VALOR'
AND G56_USRPRT = 'VALOR'
AND G56_STSOCR = 'VALOR'