The various texts for the material (as well as the other objects in SAP) are all sroted in a cluster table in the database.
The concept of a text-object comes into play here. If you go to the table TTXOT and search for the 'Material texts, sales', you will see that the text-object for the sales-text of the material is <b>MVKE</b>.
Now go to the table STXL, where the material text is actually stored in various languages ( obviously those that are maintained for that material ). Now this STXL is a cluster table and the data can only be intelligibly retrieved through a IMPORT statement.
========================================
parameters p_matnr type matnr.
data: temp_text type table of tline with header line,
where_cond(20) type c.
data : begin of text_id ,
tdobject(10) value 'MVKE',
tdname(70),
tdid(4) value '0001',
tdspras value 'D',
end of text_id.
start-of-selection.
concatenate '%'
p_matnr
'%'
into where_cond.
select single tdname
from stxl
into text_id-tdname
where relid = 'TX' and
tdspras = 'E' and
tdname like where_cond.
import tline = temp_text[]
from database stxl(TX) id text_id.
write: / sy-subrc.
loop at temp_text.
write : / temp_text-tdline.
endloop.
========================================
The above code fetches the Sales text for a material from the database and displays it on the list.
You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
Add a comment