---
title: "Identificador desconocido \u0027COMPANY_CODE"
language: es
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/es/forum/4871/unknown-identifier-company-code
original: https://documentation.invantive.eu/en/forum/4871/unknown-identifier-company-code
updated: 2026-12-03T20:06:13Z
license: https://documentation.invantive.eu/es/
---

# Identificador desconocido 'COMPANY_CODE

Cuando ejecuto una solicitud en el editor de UniversalSQL:

```
select *
from   VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions
       ( COMPANY_CODE = 'compcode'
       )
```

¿obtengo el siguiente mensaje de error:

> itgensql001
> Identificador desconocido ‘COMPANY_CODE’.
> No hay identificadores similares.

Mientras que la tabla parece pedir precisamente esta parte:

```
select *
from   VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions
       ( :COMPANY_CODE                  -- Partition to retrieve data from.
       , :branch                        -- The branch CD
       , :ledger                        -- Mandatory. The ledger in which you want to view the account balances.
       , :fromPeriod                    -- The financial period that begins the date range of the batches you want to view. Format YYYYPP
       , :toPeriod                      -- The financial period that ends the date range of the batches you want to view. Format YYYYPP
       , :account                       -- The account CD for which you want to view activities in the selected financial period.
       , :subaccountId                  -- The Subaccount
       , :fromDate                      -- The first date of the interval within the period. Format YYYY-MM-DD
       , :toDate                        -- The last date of the interval within the selected period. Format YYYY-MM-DD
       , :includeUnposted               -- Checkmark indicating if unposted batches are included.
       , :includeUnreleased             -- Checkmark indicating if unreleased (balanced) batches are included.
       , :skipRecords                   -- This field has been deprecated and will be removed in future versions. Use pagenumber and pagesize for pagination purposes. Pagenumber and pagesize does not work with NumberToRead and SkipRecords.
       , :numberToRead                  -- This field has been deprecated and will be removed in future versions. Use pagenumber and pagesize for pagination purposes. Pagenumber and pagesize does not work with NumberToRead and SkipRecords.
       , :lastModifiedDateTime          -- This value, generated by the system, indicates the last time the record was modified. Use it to retrieve all records that have been modified since that time, up to the present.  Accepted format: * ```yyyy-MM-dd``` * ```yyyy-MM-dd HH:mm:ss``` * ```yyyy-MM-dd HH:mm:ss.FFF``` * ```yyyy-MM-ddTHH:mm:ss``` * ```yyyy-MM-ddTHH:mm:ss.FFF```  _Note:_ __LastModifiedDateTime__ and __LastModifiedDateTimeCondition__ are __mutually inclusive__.
       , :lastModifiedDateTimeCondition -- This value represents the condition to be applied when retrieving records.  Accepted values (without the single quotes): * '&gt;' for greater than * '&lt;' for less than * '&gt;=' for greater than or equal * '&lt;=' for less than or equal  _Note:_ __LastModifiedDateTime__ and __LastModifiedDateTimeCondition__ are __mutually inclusive__.
       , :expandAccountInfo             -- By default, if no value is provided, False and the account information will include only Number, Description, Type and GlConsolAccountCD. If True, each transaction returned will include extended information about account.
       , :expandBranchInfo              -- By default, if no value is provided, False and branch information will include only branch number. If True, each transaction returned will include extended information about Branch (number and name).
       , :includeTransactionBalance     -- By default, if no value is provided, False and the transactions returned will not include their balances (fields BegBalance, EndingBalance, CurrBegBalance, CurrEndingBalance) If True, each transaction returned will include its balance.
       , :pageNumber                    -- Pagination parameter. Page number.
       , :pageSize                      -- Pagination parameter. Number of items to be collected. Please use a page size lower or equal to the allowed max page size which is returned as part of the metadata information. If requested page size is greater than allowed max page size, request will be limited to max page size.
       , :erp-api-background            -- If a URL value is provided, then API endpoint will be queued and executed in background. When the execution of the background operation is finished, the system will POST the response to the specified URL. The endpoint itself responds in this case with a 202-Accepted status and a reference to a state document for the background operation.
       )
```

Si uso parámetros sin nombre, funciona, pero con esto no puedo lograr lo que quiero (es decir, no rellenar todos los parámetros).

¿Cómo debo ejecutar la solicitud para obtener resultados?

## Respuesta aceptada

Gracias por informarnos. Esto es un error que se deriva de la eliminación del confuso `COMPANY_CODE` como parámetro de función de tabla. En la próxima versión se habrá realizado una mejora para esto en las siguientes cuatro vistas:

- `GeneralLedgerBalancesAll`
- `GeneralLedgerTransactions`
- `JournalTransactionLines`
- `JournalTransactions`

El soporte del antiguo protocolo de autenticación VNI para [Visma.net](http://Visma.net) se elimina definitivamente con la versión 24.0.388 y posteriores.

El consejo es usar por ahora la siguiente consulta, específicamente en Invantive Cloud, en lugar de la vista `GeneralLedgerTransactions` (para Invantive Bridge Online esto no aplica porque usa una versión anterior):

```
select lgr.company_code
,      fpd.period
,      lgr.number ledger_number
,      lgr.description ledger_description
,      txn.* except period, ledger_id, ledger_description, company_code
from   VismaNet.Ledger.Ledgers lgr
join   VismaNet.FinancialPeriod.FinancialPeriods fpd
join   VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions(ledger => lgr.number, fromPeriod => fpd.period, toPeriod => fpd.Period) txn
limit 100 /* Kies gewenst aantal. Voeg eventueel filter toe voor periode. */
```

## Responder 2

¿Usa el antiguo VNI como conexión a [Visma.net](http://Visma.net) o a Visma Connect?

## Responder 3

La configuración de mi contenedor dice `use-VNI=False`, así que sospecho de Visma Connect.

## Responder 4

[Visma.net](http://Visma.net) pasó recientemente de VNI ([Interfaz de Visma.net](http://Visma.net)) a Visma Connect. Una de las desventajas es que solo se puede acceder a un máximo de 1 company (véase también [Migración de Visma.net ERP Integrations (VNI) a Visma Connect para Visma.net](https://forums.invantive.com/t/migrating-from-visma-net-erp-integrations-vni-to-visma-connect-for-visma-net/4210)).

El campo `COMPANY_CODE` se ha dejado intencionadamente en las filas, para que sea más fácil consolidar, a pesar de las limitaciones, varias companies igual que con SnelStart, tal como se describe en [Consolidar datos en tiempo real de varias administraciones SnelStart](https://forums.invantive.com/t/data-uit-meerdere-snelstart-administraties-real-time-consolideren/3689).

Sin embargo, por error, el campo `COMPANY_CODE` sigue presente como parámetro de función de tabla al usar Visma Connect. Esto solo debería haberse mostrado en caso de una conexión basada en VNI.

En la próxima versión, el parámetro de función de tabla `COMPANY_CODE` habrá desaparecido de las tablas. Solo permanecerá la columna de salida. La disponibilidad de esta versión se desarrolla como se describe en [Frecuencia de publicación de Invantive Cloud](https://forums.invantive.com/t/releasefrequentie-invantive-cloud/4713).

Por ahora, el consejo es que, al usar parámetros de función de tabla, trabaje pasando valores por posición, como se describe en [¿Qué son las funciones de tabla y los parámetros de funciones de tabla?](https://forums.invantive.com/t/wat-zijn-tabelfuncties-en-tabelfunctieparameters/1316#tablefunctieparameters-6). Por ejemplo `select ... from NAAM@platform( NAAM => WAARDE )`.

Por último, tenga en cuenta que en general no es necesario indicar valores para los parámetros de funciones de tabla en [Visma.net](http://Visma.net). Una cláusula `where` o un filtro bien elegido en Power BI se reescribe automáticamente para usar parámetros de funciones de tabla.

Si esta optimización de rendimiento no funciona como se espera, por favor añada como respuesta la instrucción SQL exacta deseada con los parámetros de funciones de tabla y sus valores.

## Responder 5

En su respuesta indica lo siguiente

> Por ahora, el consejo es que, al usar parámetros de función de tabla, trabaje pasando valores por posición, como se describe en [¿Qué son las funciones de tabla y los parámetros de funciones de tabla?](https://forums.invantive.com/t/wat-zijn-tabelfuncties-en-tabelfunctieparameters/1316#tablefunctieparameters-6). Por ejemplo `select ... from NAAM@platform( NAAM => WAARDE )` .

Así que esto no funciona como mostré en mi primera solicitud. Y además lo siguiente tampoco funciona:

> select top 10 *
> from   VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions@platform
> (ledger = ‘WERKELIJK’),

Al hacerlo recibo un mensaje de error.

Y también

> select top 10 *
> from   VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions@platform
> where ledger = ‘werkelijk’
> Muestra un error: se requiere un valor para el parámetro ‘ledger’ en la tabla ‘VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions’. itgendid357

donde he sustituido @platform por la plataforma.

¿Qué acción se puede tomar ahora para obtener de todos modos los resultados deseados? (la solicitud sobre una vista de generalledgertransactions da un timeout porque contiene demasiados datos, incluso con una cláusula where)_

## Responder 6

Para limitar el volumen de datos puede usar `limit` o `top`. El motor SQL trabaja con datos en streaming siempre que sea posible, de modo que solo se recuperan los datos necesarios.

Tenga en cuenta que los datos se obtienen en tiempo real. Como alternativa, también se puede trabajar copiando los datos a, por ejemplo, SQL Server. La persona que recibió la explicación podrá informarle más al respecto.

Para la posición por nombre es necesario usar `=>` en lugar de `=`, como en:

```
select top 10 *
from   VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions@vnt
       ( ledger => 'WERKELIJK'
       , fromPeriod => '202010'
       , toPeriod => '202012'
       )
```

Por último, en general también resulta más fácil trabajar con administraciones grandes mediante la vista `GeneralLedgerTransactions`. Los filtros se transmiten en general a lo largo de toda la cadena («filtrado en el lado del servidor»).

## Responder 7

Gracias. Si queremos usar la vista con la siguiente consulta (en el editor en línea):

```
select top 10 *
from   VismaNet.Views.GeneralLedgerTransactions
```

obtenemos el siguiente resultado:

![imagen](/img/edc1b68dfaf15778c780ac6a5df12277edf07bb1493efb029bcae50806e8a690/574x300.png)

> itgenttn290
> Ha proporcionado un parámetro con el nombre ‘COMPANY_CODE’, pero no existe ningún parámetro con ese nombre en ‘VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions’.
> Posibles alternativas válidas: branch, ledger, fromPeriod, toPeriod, account, subaccountId, fromDate, toDate.

---

Fuente: [https://forums.invantive.eu/t/unknown-identifier-company-code/4871](https://forums.invantive.eu/t/unknown-identifier-company-code/4871)
