Cartões de Clientes
A tabela G3J faz parte do sistema ERP Protheus da TOTVS e é utilizada para cartões de clientes.
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 G3J 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 G3J, incluindo todos os campos e índices relacionados.
| Propriedade | Valor |
|---|---|
| X2_CHAVE | G3J |
| X2_PATH | \DATA\ |
| X2_ARQUIVO | G3J990 |
| X2_NOME | Cartões de Clientes |
| X2_NOMESPA | Tarjetas de Clientes |
| X2_NOMEENG | Customer Cards |
| X2_ROTINA | - |
| X2_MODO | C |
| X2_MODOUN | C |
| X2_MODOEMP | E |
| X2_DELET | 0 |
| X2_TTS | - |
| X2_UNICO | G3J_FILIAL+G3J_CODIGO |
| X2_PYME | S |
| X2_MODULO | 89 |
| X2_DISPLAY | G3J_CODIGO+G3J_DESCR+G3J_CODBAN |
| 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_ | 4608 |
| 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| G3J | 01 | G3J_FILIAL | C | 2 | 0 | Filial | Sucursal | Branch | Filial do Sistema | Sucursal del sistema | Branch System | - | - | x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | - | - | - | - | - | - | - | - | - | - | 033 | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74160 | 0 |
| G3J | 02 | G3J_CODIGO | C | 6 | 0 | Código | Codigo | Code | Código sequencial. | Codigo secuencial. | Sequential Code | @! | - | x x x x x x x x x x x x x x x x | GETSXENUM("G3J","G3J_CODIGO") | - | 1 | x xxx | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74161 | 0 |
| G3J | 03 | G3J_CODCLI | C | 6 | 0 | Cod.Cliente | Cod.Cliente | Cust Code | Código do Cliente | Codigo del cliente | Customer Code | @! | ExistCpo('SA1',FWFldGet('G3J_CODCLI')) | x x x x x x x x x x x x x x x x | - | SA1 | 1 | x xxx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | 001 | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74162 | 0 |
| G3J | 04 | G3J_LOJA | C | 2 | 0 | Loja | Tienda | Store | Loja do Cliente. | Tienda del cliente. | Customer Store | @! | ExistCpo('SA1',FWFldGet('G3J_CODCLI')+FWFldGet('G3J_LOJA')) | x x x x x x x x x x x x x x x x | - | SA1LJ | 1 | x xxx | - | S | - | S | A | R | - | - | - | - | - | - | - | - | 002 | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74163 | 0 |
| G3J | 05 | G3J_CLIENT | C | 40 | 0 | Razao Social | Razon social | Comp Name | Razao Social Cliente. | Razon social cliente. | Customer Company Name | @! | - | x x x x x x x x x x x x x x x x | IIF(!INCLUI,Posicione('SA1', 1, xFilial('SA1')+G3J->G3J_CODCLI+G3J->G3J_LOJA , 'A1_NOME'),'') | - | 1 | x xx | - | - | - | S | V | V | - | - | - | - | - | - | - | Posicione("SA1",1,xFilial("SA1")+G3J->G3J_CODCLI+G3J->G3J_LOJA,"A1_NOME") | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74164 | 0 |
| G3J | 06 | G3J_DESCR | C | 60 | 0 | Descricao | Descrpcion | Description | Descr.Cartao do Cliente | Descr. Tarjeta cliente | Customer Card Description | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x xxx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74165 | 0 |
| G3J | 07 | G3J_TIPO | C | 6 | 0 | Classific. | Clasific. | Classif | Class.Cartao do Cliente | Clas.Tarjeta de cliente | Customer Card Classif | @! | ExistCpo('G8Q',FWFldGet('G3J_TIPO')) | x x x x x x x x x x x x x x x x | - | G8Q | 1 | xxx | - | S | - | S | A | R | - | - | - | - | - | - | INCLUI | - | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74166 | 0 |
| G3J | 08 | G3J_DESCTP | C | 40 | 0 | Desc Classi | Desc Clasif | Classif Desc | Desc. Class. de Cartão | Desc. Clas. de tarjeta | Card Classif. Desc. | @! | - | x x x x x x x x x x x x x x x x | IIF(!INCLUI,Posicione('G8Q', 1, xFilial('G8Q')+G3J->G3J_TIPO, 'G8Q_DESCR'),'') | - | 1 | xx | - | - | - | S | V | V | - | - | - | - | - | - | - | Posicione('G8Q', 1, xFilial('G8Q')+G3J->G3J_TIPO, 'G8Q_DESCR') | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74167 | 0 |
| G3J | 09 | G3J_NCARD | C | 32 | 0 | Num.Cartao | Nº Tarj. | Card Numb | Numero Cartao do Cliente | Numero tarjeta cliente | Customer Card Number | @R 9999.9999.9999.9999 | Len(Alltrim(FWFLDGET("G3J_NCARD"))) >= 4 | x x x x x x x x x x x x x x x x | - | - | 1 | x xxx | - | S | - | N | A | R | - | - | - | - | - | - | Inclui | - | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74168 | 0 |
| G3J | 10 | G3J_NRESU | C | 19 | 0 | N.Res.Cartão | Nº Res.Tarj. | Card Summ No | Numero resumido do Cartao | Numero resumido tarjeta | Card Summary Number | @R ****.****.****.9999 | - | x x x x x x x x x x x x x x x x | - | - | 1 | x xxx | - | - | - | S | V | R | - | - | - | - | - | - | Inclui | - | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74169 | 0 |
| G3J | 11 | G3J_CODSEG | C | 8 | 0 | Cod.Segur. | Cod.Segur. | Insur Code | Cod. seguranca Cartao | Cod. Segur. Tarjeta | Card Security Code | @* | IF(LEN(ALLTRIM(FWFLDGET('G3J_CODSEG')))>4, .F.,.T.) | x x x x x x x x x x x x x x x x | - | - | 1 | x xx | - | - | - | N | A | R | - | - | - | - | - | - | Inclui | - | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74170 | 0 |
| G3J | 12 | G3J_MVALID | C | 2 | 0 | Mes Validade | Mes Validez | Validity Mth | Mes validade Cartao | Mes validez tarjeta | Card Validity Month | 99 | Vazio() .Or. ((Val(FWFldGet("G3J_MVALID"))>=1 .And. Val(FWFldGet("G3J_MVALID"))<=12) .and. TA008VLDDT()) | x x x x x x x x x x x x x x x x | - | - | 1 | x xxx | - | S | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74171 | 0 |
| G3J | 13 | G3J_AVALID | C | 4 | 0 | Ano Validade | Ano validez | Validity Yr | Ano validade Cartao | Ano validez tarjeta | Card Validity Year | @! | TA008VLDDT(FwFldGet("G3J_AVALID")) | x x x x x x x x x x x x x x x x | - | - | 1 | x xxx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74172 | 0 |
| G3J | 14 | G3J_TITULA | C | 60 | 0 | Titular | Titular | Holder | Nome titular Cartao | Nombre titular tarjeta | Card Holder Name | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x xxx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74173 | 0 |
| G3J | 15 | G3J_CODBAN | C | 2 | 0 | Cod.Band. | Cod.Marca | Flag Code | Codigo bandeira Cartao | Codigo marca tarjeta | Card Flag Code | @! | ExistCpo("SX5","L9"+FWFldGet("G3J_CODBAN")) | x x x x x x x x x x x x x x x x | - | L9 | 1 | x xxx | - | S | - | N | A | R | - | - | - | - | - | - | INCLUI | - | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74174 | 0 |
| G3J | 16 | G3J_BAND | C | 20 | 0 | Bandeira | Marca | Flag | Nome bandeira Cartao | Nombre marca tarjeta | Card Flag Name | @! | - | x x x x x x x x x x x x x x x x | IIF(!INCLUI,POSICIONE('SX5', 1, XFILIAL('SX5')+'L9'+G3J->G3J_CODBAN, 'X5_DESCRI' ),'') | - | 1 | x xx | - | - | - | S | V | V | - | - | - | - | - | - | - | POSICIONE('SX5', 1, XFILIAL('SX5')+'L9'+G3J->G3J_CODBAN, 'X5_DESCRI') | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74175 | 0 |
| G3J | 17 | G3J_DFECHA | N | 2 | 0 | Dia Fecha | Dia Cierre | Close Day | Dia fechamento Cartao | Dia cierre de tarjeta | Card Closing Day | 99 | FWFldGet("G3J_DFECHA")>=0.and.FWFldGet("G3J_DFECHA")<=31 | x x x x x x x x x x x x x x x x | - | - | 1 | x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74176 | 0 |
| G3J | 18 | G3J_DVENC | N | 2 | 0 | Dia Vencto | Dia Vencto | Exp Day | Dia vencimento Cartao | Dia vencimiento tarjeta | Card Expiration Date | 99 | FWFldGet("G3J_DVENC")>=0.and.FWFldGet("G3J_DVENC")<=31 | x x x x x x x x x x x x x x x x | - | - | 1 | x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74177 | 0 |
| G3J | 19 | G3J_DIADE | N | 2 | 0 | Dia De | De dia | Day From | Dia inicial de utilizacao | Dia inicial de utilizacio | Start day of use | 99 | FWFldGet('G3J_DIADE') >=0 .And.FWFldGet('G3J_DIADE') <= 31 | x x x x x x x x x x x x x x x x | - | - | 1 | x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74178 | 0 |
| G3J | 20 | G3J_DIAATE | N | 2 | 0 | Dia Ate | A dia | Day to | Dia final de utilizacao | Dia final de utilizacion | Use End Date | 99 | FWFldGet('G3J_DIAATE') >= 0 .And.FWFldGet('G3J_DIAATE') <= 31 | x x x x x x x x x x x x x x x x | - | - | 1 | x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74179 | 0 |
| G3J | 21 | G3J_CODFOR | C | 6 | 0 | Cod.Fornec. | Cod.Prov. | Suppl Code | Codigo do Fornecedor | Codigo del proveedor | Supplier Code | @! | Vazio() .Or. ExistCpo("SA2",FWFldGet("G3J_CODFOR")) | x x x x x x x x x x x x x x x x | - | SA2A | 1 | x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | 001 | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74180 | 0 |
| G3J | 22 | G3J_LJFOR | C | 2 | 0 | Loja | Tienda | Store | Loja Fornecedor | Tienda proveedor | Supplier Store | @! | Vazio() .Or. ExistCpo("SA2",FWFldGet("G3J_CODFOR")+FWFldGet("G3J_LJFOR")) | x x x x x x x x x x x x x x x x | - | SA22 | 1 | x xx | - | S | - | S | A | R | - | - | - | - | - | - | - | - | 002 | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74181 | 0 |
| G3J | 23 | G3J_FORNEC | C | 40 | 0 | Fornecedor | Proveedor | Supplier | Razao Social do Fornecedo | Razon social proveedor | Supplier Company Name | @! | - | x x x x x x x x x x x x x x x x | IIF(!INCLUI,POSICIONE('SA2', 1, XFILIAL('SA2')+G3J->G3J_CODFOR+G3J->G3J_LJFOR, 'A2_NOME'),'') | - | 1 | x xx | - | - | - | S | V | V | - | - | - | - | - | - | - | POSICIONE('SA2', 1, XFILIAL('SA2')+G3J->G3J_CODFOR+G3J->G3J_LJFOR, 'A2_NOME') | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74182 | 0 |
| G3J | 24 | G3J_CORP | L | 1 | 0 | Corporativo | Corporativo | Corporate | Segmento Corporativo | Segmento corporativo | Corporate segment | - | - | x x x x x x x x x x x x x x x x | .F. | - | 1 | x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | 002 | 1 | 1 | - | - | - | 74183 | 0 |
| G3J | 25 | G3J_EVENTO | L | 1 | 0 | Eventos | Eventos | Event | Segmento Eventos | Segmento eventos | Events Segment | - | - | x x x x x x x x x x x x x x x x | .F. | - | 1 | xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | 002 | 1 | 1 | - | - | - | 74184 | 0 |
| G3J | 26 | G3J_LAZER | L | 1 | 0 | Lazer | Ocio | Leisure | Segmento Lazer | Segmento ocio | Leisure Segment | - | - | x x x x x x x x x x x x x x x x | .F. | - | 1 | x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | 002 | 1 | 1 | - | - | - | 74185 | 0 |
| G3J | 27 | G3J_MSBLQL | C | 1 | 0 | Bloqueado? | ¿Bloqueado? | Blocked? | Registro bloqueado? | ¿Registro bloqueado? | Blocked Record? | @! | Pertence("12") | x x x x x x x x x x x x x x x x | "2" | - | 1 | x x | - | - | - | S | A | R | - | - | 1=Sim;2=Não | 1=Si;2=No | 1=Yes;2=No | - | - | - | - | - | S | - | - | N | - | N | - | - | 001 | 1 | 1 | - | - | - | 74186 | 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| G3J | 1 | G3J_FILIAL+G3J_CODIGO | Código | Codigo | Code | S | - | - | S | 2 | 3 | - | 10961 | 0 |
| G3J | 2 | G3J_FILIAL+G3J_CODBAN+G3J_TIPO+G3J_NRESU | Cod.Band. + Classific. + N.Res.Cartão | Cod.Marca + Clasific. + Nº Res.Tarj. | Flag Code + Classif + Card Summ No | S | - | - | S | 2 | 3 | - | 10962 | 0 |
| G3J | 3 | G3J_FILIAL+G3J_CODCLI+G3J_LOJA+G3J_CODIGO | Cod.Cliente + Loja + Código | Cod.Cliente + Tienda + Codigo | Cust Code + Store + Code | S | - | - | S | 2 | 3 | - | 10963 | 0 |
Ela é utilizada para cartões de clientes 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
G3J_FILIAL,
G3J_CODIGO,
G3J_CODCLI,
G3J_LOJA,
G3J_CLIENT,
G3J_DESCR,
G3J_TIPO,
G3J_DESCTP,
G3J_NCARD,
G3J_NRESU,
G3J_CODSEG,
G3J_MVALID,
G3J_AVALID,
G3J_TITULA,
G3J_CODBAN,
G3J_BAND,
G3J_DFECHA,
G3J_DVENC,
G3J_DIADE,
G3J_DIAATE,
G3J_CODFOR,
G3J_LJFOR,
G3J_FORNEC,
G3J_CORP,
G3J_EVENTO,
G3J_LAZER,
G3J_MSBLQL
FROM G3J
WHERE
D_E_L_E_T_ = ' '
AND G3J_FILIAL = 'VALOR'
AND G3J_CODIGO = 'VALOR'
AND G3J_CODCLI = 'VALOR'
AND G3J_LOJA = 'VALOR'
AND G3J_CLIENT = 'VALOR'
AND G3J_DESCR = 'VALOR'
AND G3J_TIPO = 'VALOR'
AND G3J_DESCTP = 'VALOR'
AND G3J_NCARD = 'VALOR'
AND G3J_NRESU = 'VALOR'
AND G3J_CODSEG = 'VALOR'
AND G3J_MVALID = 'VALOR'
AND G3J_AVALID = 'VALOR'
AND G3J_TITULA = 'VALOR'
AND G3J_CODBAN = 'VALOR'
AND G3J_BAND = 'VALOR'
AND G3J_DFECHA = 0
AND G3J_DVENC = 0
AND G3J_DIADE = 0
AND G3J_DIAATE = 0
AND G3J_CODFOR = 'VALOR'
AND G3J_LJFOR = 'VALOR'
AND G3J_FORNEC = 'VALOR'
AND G3J_MSBLQL = 'VALOR'