cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Material basic data text.

Former Member
9,326

Hi All,

I would like to retrive material "Basic Data Text" (material master additional data) value form a group of materilas. I tried table STXL but it did not give the text vale as readable.

Please help me for a better solution.

Thanks

John K.

View Entire Topic
JL23
Active Contributor

Long Text is certainly stored in STXH and STXL.

But you cannot read the text with SE16, because it is stored in binary format.

If you want read it, then you have to use function module READ_TEXT.

So for a download you would need to develope a small ABAP, with a selection screen to enter your material numbers, then you need to loop thru this material numbers and call READ_TEXT for each material followed by a WRITE statement.

0 Likes

REPORT ztest NO STANDARD PAGE HEADING.

*Read Basic data text for material

PARAMETERS: p_matnr TYPE matnr OBLIGATORY DEFAULT '101-0001'.

DATA: tdname TYPE stxh-tdname,

xline TYPE TABLE OF tline,

wline TYPE tline.

START-OF-SELECTION.

tdname = p_matnr.

CALL FUNCTION 'READ_TEXT'

EXPORTING

id = 'GRUN'

language = sy-langu

name = tdname

object = 'MATERIAL'

TABLES

lines = xline

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

IF sy-subrc = 0.

LOOP AT xline INTO wline.

WRITE: / wline-tdline.

ENDLOOP.

ELSE.

WRITE: / 'Error', sy-subrc.

ENDIF.

ULINE.