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

READ_TEXT

Former Member
0 Likes
1,063

hi,

i tried below program and how to see the texts.

data xname like THEAD-TDNAME.

data i_xtline like tline occurs 10.

data: begin of i_vbak,

vbeln type vbak-vbeln,

end of i_vbak.

clear i_xtline.

refresh i_xtline.

move i_vbak-vbeln to XNAME.

CALL FUNCTION 'READ_TEXT'

EXPORTING

ID = '0001'

LANGUAGE = 'E'

NAME = XNAME

OBJECT = 'VBBP'

TABLES

LINES = i_XTLINE

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6.

12 REPLIES 12
Read only

Former Member
0 Likes
1,040

Please give me Reward points...

Read only

Former Member
0 Likes
1,040

Hi,

Check in this table of urs i_XTLINE. loop and write this table and check the output.

Reward if helpful..

Regards,

ramya

Read only

0 Likes
1,040

hi,

but i_xtline is itab.

how i will see the o/p.

Read only

0 Likes
1,040

HI,

add this code...

loop at i_xtline.
write / i_xtline-TDLINE.
endloop.

Cheers,

jose

Read only

0 Likes
1,040

loop at i_xline.

write i_xline-tdline.

endloop.

This will print the text

Hope dis helps..

Reward if it does

Read only

0 Likes
1,040

hi,

but syntax is correct,its not giving the o/p.

data xname like THEAD-TDNAME.

data i_xtline like tline occurs 10 with header line.

data: begin of i_vbak,

vbeln type vbak-vbeln,

end of i_vbak.

clear i_xtline.

refresh i_xtline.

move i_vbak-vbeln to XNAME.

CALL FUNCTION 'READ_TEXT'

EXPORTING

ID = '0001'

LANGUAGE = 'E'

NAME = XNAME

OBJECT = 'VBBP'

TABLES

LINES = i_XTLINE

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6.

loop at i_xtline.

write / i_xtline-TDLINE.

endloop.

Read only

0 Likes
1,040

Hi

If u want sales order header level text change the

object: VBBK..

or

If u use VBBP and try to passs the name field as(salesordernumber+item number).

CONCATENATE vbeln it_vbap-posnr INTO name.

CONDENSE name.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = 'Z001'

language = sy-langu

name = name

object = 'VBBP'

TABLES

lines = g_tline

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.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

If this solves u r problem rewards

points.

Reagards

Pratap.M

Read only

0 Likes
1,040

I think VBBP is a Sales Order Item Text. And so XNAME passed should be just not sales order number, whereas it should be a combination of sales order number and item number

Say sales order number = 0000012345

Item Number = 000010

XNAME should be 0000012345000010.

If you are looking for a header text of a sales order, then Instead of VBBP you should be passing VBBK.

Hope this helps.

Thanks,

Balaji

Read only

Former Member
0 Likes
1,040

Hi,

Wat is it that you exactly want to know? Can you be more specific

Regards,

Pavithra

Read only

Former Member
0 Likes
1,040

The tables parameter 'LINES' of the READ_TEXT function module will return the text. The field is: LINES-TDLINE.

Even if you open the table STXH in SE11 with all the input parameter you will be able to see the text.

Read only

Former Member
0 Likes
1,040

Hi,

As every one said, looping on the internal table will fetch you the desired output.

However, you can also the same in the table STXH will all the input parameters either in SE11 or SE16.

Thanks,

Shamim

Read only

Former Member
0 Likes
1,040

Please check the sy-subrc value after the read_table call.

see you are getting values in the internal table . if not

check the data with SE11-> go to STXH table give the export parametrs as i/p like id ,lang,name ,object and check the available data.Check u r noit in developement client and be in quality so u havfe some data to test with.