I'm not a SAP developer. We already have a big SSIS package that pulls data from the SQL Server instance that our SAP installation uses and I need to add discount data to it. I've usually had pretty good luck looking through this package and the SAP UI and then using Google & SAP Data Sheets to figure out how the tables are laid out, but this time I'm totally lost.

In the SAP UI, the data I'm searching for is listed under the order document conditions. The Googling I have done makes it pretty clear that I'm supposed to use VBAK.KNUMV and JOIN to KONV.KNUMV. Here's the problem: our server doesn't have KONV. I found a forum post that says that I can JOIN to KONP.KNUMH instead, but for the sample document I'm working on, there's no corresponding record in KONH.

I can't find an explanation for why KONV doesn't exist, and I don't know why JOINing VBAK.KNUMV to KONH.KNUMH doesn't work. If anyone could guide me down the right path, I would appreciate it.

I don't know SAP, so I am not really clear on what a cluster table is. They kind of sound like views, which is fine, but no object with the name KONV exists in SQL Server. Saying that KONV is a combination of KONH and KONP is also fine, but that doesn't appear to actually be true. I need to know where this data physically lives in SQL Sever and that's what I can't figure out.


1 Answer 1


Konv is a cluster table you cannot easily join it in SQL query.

From the SAP page linked above:

Table Clusters

Several logical data records from different cluster tables can be stored together in one physical record in a table cluster.

A cluster key consists of a series of freely definable key fields and a field ( Pageno ) for distinguishing continuation records. A cluster also contains a long field ( Vardata ) that contains the contents of the data fields of the cluster tables for this key. If the data does not fit into the long field, continuation records are created. Control information on the structure of the data string is still written at the beginning of the Vardata field. A table cluster has the following structure:

Field Data type Meaning
CLKEY1 * First key field
CLKEY2 * Second key field
CLKEYn * nth key field
Pageno INT2(5) Number of the continuation record
Timestamp CHAR(14) Time stamps
Pagelg INT2(5) Length of the string in Vardata
Vardata RAW (n) Contains the entries from the data fields of the assigned cluster tables as a string, max. length n depends on the database system used

The records of all cluster tables with the same key are stored under one key in the assigned table cluster. The values of the key fields are stored in the corresponding key fields of the table cluster. The values of all data fields of the assigned cluster tables are written as a string to the Vardata field of the table cluster. Besides the actual data values, the data string contains information on the structure of the data and which table it comes from. If the string exceeds the maximum length of the Vardata field, a continuation record is written with the same key values. The continuation records for a key are distinguished by their value in field Pageno . The actual length of the string in the Vardata field is stored in the Pagelg field by the database interface.

If you can determine what physical table has this data structure, you may be able to find the row that holds the data you want and possibly extrapolate from there.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.