Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to fetch text data from structure

Former Member
0 Likes
526

using this code to get text from ME52N this is a structure still not getting output

DATA:BEGIN OF TA_ROW occurs 0,

TXZ01(1000) TYPE C,

END OF TA_ROW.

DATA:BEGIN OF IT_ROW OCCURS 0,

TXZ01(1000) TYPE C,

END OF IT_ROW.

DATA: thread LIKE thead.

DATA: headerid TYPE char24.

DATA: it_text LIKE tline OCCURS 0 WITH HEADER LINE.

data:wa_banfn like eban-banfn.

thread-tdid = 'B01'.

thread-tdname = headerid.

thread-tdobject = 'EBAN'.

select txz01 from eban into corresponding fields of table ta_row

where banfn = wa_banfn.

headerid = ' '.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = thread-tdid

language = sy-langu

name = thread-tdname

object = thread-tdobject

  • ARCHIVE_HANDLE

  • = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

lines = it_text

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

LOOP AT it_text.

CLEAR ta_row.

  • BREAK-POINT.

    • FROM THIS POINT TEXT IS COMING

ta_row-txz01 = it_text-tdline.

APPEND ta_row TO it_row.

ENDLOOP.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
398

hi

you have to CONCATENATE BANFN with ITEM into thread-tdname.

example:

if BANFN = 176547, and item = 20,

then you have to concatenate both the values and pass as name into thread-tdname. then the value would be '000017654700020'.

hope this works...

thx

rams

*reward for helpful answers

1 REPLY 1
Read only

Former Member
0 Likes
399

hi

you have to CONCATENATE BANFN with ITEM into thread-tdname.

example:

if BANFN = 176547, and item = 20,

then you have to concatenate both the values and pass as name into thread-tdname. then the value would be '000017654700020'.

hope this works...

thx

rams

*reward for helpful answers