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 FM returning LINES table as empty

Former Member
0 Likes
1,955

Hi Experts,

I am using FM 'READ_TEXT' in an ABAP but the FM is not returning LINES table filled with any value. May i know, how can i get the SAP long text value populated in LINES table i.e. i_tl in my case.

Code is as follow -

CALL FUNCTION 'READ_TEXT'

EXPORTING

object = 'BELEG'

name = e_th-tdname

id = '0001'

language = 'R'

IMPORTING

header = e_th

TABLES

lines = i_tl

EXCEPTIONS

not_found = 4.

Probably, no SAP long text maintained for this inputs provided to FM. But, if this is the case then how can we maintain SAP long text for these inputs ?

Useful answers will be appreciated.

Thanks in advance,

Akash

Hi Experts,

I am using FM 'READ_TEXT' in an ABAP but the FM is not returning LINES table filled with any value. May i know, how can i get the SAP long text value populated in LINES table i.e. i_tl in my case.

Code is as follow -

CALL FUNCTION 'READ_TEXT'

EXPORTING

object = 'BELEG'

name = e_th-tdname

id = '0001'

language = 'R'

IMPORTING

header = e_th

TABLES

lines = i_tl

EXCEPTIONS

not_found = 4.

Probably, no SAP long text maintained for this inputs provided to FM. But, if this is the case then how can we maintain SAP long text for these inputs ?

Useful answers will be appreciated.

Thanks in advance,

Akash

5 REPLIES 5
Read only

Former Member
0 Likes
1,205

Akash,

From which transaction you are trying to read the long text?

Are you passing correct parameters?

Regards,

Satish

Read only

Former Member
0 Likes
1,205

Check if the text name has the zeroes appended to its value while passing the same to the FM

Check if the text object is correct.

Check if the text has been maintained in language 'R'.

Hope it solves the issue.

Lokesh

Pls. reward if it helps.

Read only

Former Member
0 Likes
1,205

BELEG object is -- documents

IDs have the following meanings

0001 Correspondence

0002 Note

0003 Payment advice information

0004 Remarks EBPP

u will have to maintain in appropriate Tcodes

Read only

Former Member
0 Likes
1,205

Hi Akash,

Use FMs INIT_TEXT & SAVE_TEXT.

Get Header details by passing the same parameters to INIT_TEXT as you passed in READ_TEXT.

Pass header details & i_tl to SAVE_TEXT, data will get stored in respective place.

<b>Reward Points for helpful answers</b>

Satish

Read only

Former Member
0 Likes
1,205

Hi Satish,

Have tried as per suggested by you i.e. first getting Header details by passing the same parameters to INIT_TEXT as i passed in READ_TEXT.

But i_tl was received as empty in return, and then i tried to pass header details to SAVE_TEXT, but did not find any change.

Please let me know, if i missed something.

Thanks,

Akash