eu tenho uma query que mostra colunas da tabela x campos do forms, nao sei se ajuda:
select OOD.ORGANIZATION_CODE
,RIT.INVOICE_TYPE_CODE
,RIT.DESCRIPTION
— contas credoras:
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.CR_CODE_COMBINATION_ID) "Passivo / Transitória"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.DIFF_ICMS_CODE_COMBINATION_ID) "ICMS a Recolher"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.IPI_LIABILITY_CCID) "IPI a Recolher"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.ISS_CODE_COMBINATION_ID) "ISS a Recolher"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.IR_CODE_COMBINATION_ID) "IR a Recolher"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.INSS_EXPENSE_CCID) "INSS Despesa"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.IMPORT_TAX_CCID) "Tributos Importação"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.IMPORT_INSURANCE_CCID) "Seguros Importação"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.IMPORT_FREIGHT_CCID) "Fretes Importação"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.IMPORT_EXPENSE_CCID) "Outras Despesas Importação"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.SYMBOLIC_RETURN_CCID) "Retorno Simbólico"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.CUSTOMER_CCID) "Devol. Clientes (RMA)"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.RMA_IPI_LIABILITY_CCID) "IPI a recolher (RMA)"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.RMA_ICMS_LIABILITY_CCID) "ICMS a recolher (RMA)"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.RMA_ICMS_ST_LIABILITY_CCID) "ICMS ST a recolher (RMA)"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.INSS_CODE_COMBINATION_ID) "INSS Substituto"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.SISCOMEX_CCID) "SISCOMEX"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.IMPORT_PIS_CCID) "PIS Importação"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.FUNRURAL_CCID) "Contribuição Rural"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.IMPORT_COFINS_CCID) "COFINS Importação"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.SEST_SENAT_CCID) "SEST/SENAT"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.CUSTOMS_EXPENSE_CCID) "Despesas Alfandegárias"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.ICMS_ST_ANT_CCID) "ICMS ST Ant a Recolher"
— contas devedoras
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.ICMS_CODE_COMBINATION_ID) "Recuperação ICMS"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.ICMS_ST_CCID) "ICMS Subst Tributaria"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.IPI_CODE_COMBINATION_ID) "Recuperacao IPI"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.ACCOUNT_RECEIVABLE_CCID) "Ctas a Receber (RMA)"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.RMA_IPI_REDUCTION_CCID) "Redutora IPI (RMA)"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.RMA_ICMS_REDUCTION_CCID) "Redutora Recolher (RMA)"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.RMA_ICMS_ST_REDUCTION_CCID) "Redutora ICMS ST (RMA)"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.PIS_CODE_COMBINATION_ID) "Recuperação PIS"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.VARIATION_COST_DEVOLUTION_CCID) "Variação Custo Devolução"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.RMA_PIS_REDUCTION_CCID) "Redutora PIS ST (RMA)"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.RMA_COFINS_REDUCTION_CCID) "Redutora COFINS ST (RMA)"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.COFINS_CODE_COMBINATION_ID) "Recuperacao de COFINS"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.RMA_PIS_RED_CCID) "Redutora PIS (RMA)"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.RMA_COFINS_RED_CCID) "Redutora COFINS (RMA)"
,(select concatenated_segments from apps.gl_code_combinations_kfv where code_combination_id = RIT.ICMS_ST_ANT_CCID_RECUP) "Recup ICMS ST Ant"
FROM apps.rec_invoice_types RIT
,apps.org_organization_definitions OOD
where RIT.ORGANIZATION_ID = OOD.ORGANIZATION_ID
ORDER BY OOD.ORGANIZATION_CODE, RIT.INVOICE_TYPE_CODE
2015-06-19 14:16 GMT-03:00 Luiz Henrique Canello lhcanello@yahoo.com <>:
Olá grupo,Estou precisando mapear as contas contábeis da tabela rec_invoice_types do RI.Alguém teria um arquivo com a correspondência entre as contas da tabela REC_INVOICE_TYPES e suas descrições KF##_CONTA_CONTABIL?Ex.KF02_CONTA_CONTABIL = ICMS_CODE_COMBINATION_IDObrigadoLuiz Canello