cancel
Showing results for 
Search instead for 
Did you mean: 

how do i get text from key in BW4HANA Sql Scripts

0 Kudos
294

hello All,

i have a calculated field where i need to get the text/description of the values based on the keys. but i cannot use associated by infoobject due to the length limitation. how can i get the text/description based on key using sql script?

thanks and regards

Sid

Accepted Solutions (0)

Answers (1)

Answers (1)

vishalakshmi
Contributor

Hello Sid,

You need to know which tables contain the key and text information. In BW/4HANA, key tables store the unique identifiers (keys), while text tables store the corresponding descriptions or texts.

Determine how the key tables and text tables are related. Typically, there will be a common key field that links the two tables together. This field is used for joining.

Create an SQL query in your SQL script that joins the key table with the text table based on the common key field. Use the SQL JOIN clause for this purpose.

SELECT

K.KeyField, T.TextField

FROM

KeyTable K

INNER JOIN

TextTable T

ON

K.KeyField = T.KeyField

WHERE

-- Add any additional conditions or filters as needed

Replace KeyTable and TextTable with the actual names of your key and text tables.

Replace KeyField with the actual name of the common key field.

Thanks,

Lakshmi.