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

issue in read_text

Former Member
0 Likes
640

hi friends - i have one issue.

i'm calling read_text in a program to read a std text.

its asking me to pass 'OBJECT', otherwise it is not accepting the FM and producing dump.

how can i assign a object to a std text.

Plz help me.......

Thanks

Praveen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
616

hi,

pls go through

*& Form process_read_text

&----


FORM process_read_text USING w_tdid.

DATA : BEGIN OF inline OCCURS 0,

tdformat TYPE tdformat,

tdline TYPE tdline,

END OF inline.

DATA: thead LIKE thead OCCURS 0 WITH HEADER LINE.

DATA: w_count TYPE i.

CLEAR: w_text1, w_text2, w_text3, w_text4, w_text5.

thead-tdobject = 'EKKO'.

thead-tdname = p_ebeln.

thead-tdid = w_tdid.

thead-tdspras = sy-langu.

thead-tdlinesize = '072'.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = thead-tdid

language = thead-tdspras

name = thead-tdname

object = thead-tdobject

TABLES

lines = inline

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

LOOP AT inline.

IF sy-tabix EQ '1'.

w_text1 = inline-tdline.

ELSEIF sy-tabix EQ '2'.

w_text2 = inline-tdline.

ELSEIF sy-tabix EQ '3'.

w_text3 = inline-tdline.

ELSEIF sy-tabix EQ '4'.

w_text4 = inline-tdline.

ELSEIF sy-tabix EQ '5'.

w_text5 = inline-tdline.

ELSE.

EXIT.

ENDIF.

ENDLOOP.

ENDFORM. " process_read_text

pls give reward if it helpfu;

thanks

vana

hi friends - i have one issue.

i'm calling read_text in a program to read a std text.

its asking me to pass 'OBJECT', otherwise it is not accepting the FM and producing dump.

how can i assign a object to a std text.

Plz help me.......

Thanks

Praveen

4 REPLIES 4
Read only

Former Member
0 Likes
616

hi,

To retrieve which data you are using the read_text.for eg if you want to read the Purchase order text got me23n ->got o header text ->press f1 you will findo out the object ,object id.pass those values to the functiona module.

reward points if it is helpful.

regards

sangeetha.a

Read only

Former Member
0 Likes
616

Hi,

the valid text objects are available in table TTXOB.

Sudheer.A

Read only

Former Member
0 Likes
617

hi,

pls go through

*& Form process_read_text

&----


FORM process_read_text USING w_tdid.

DATA : BEGIN OF inline OCCURS 0,

tdformat TYPE tdformat,

tdline TYPE tdline,

END OF inline.

DATA: thead LIKE thead OCCURS 0 WITH HEADER LINE.

DATA: w_count TYPE i.

CLEAR: w_text1, w_text2, w_text3, w_text4, w_text5.

thead-tdobject = 'EKKO'.

thead-tdname = p_ebeln.

thead-tdid = w_tdid.

thead-tdspras = sy-langu.

thead-tdlinesize = '072'.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = thead-tdid

language = thead-tdspras

name = thead-tdname

object = thead-tdobject

TABLES

lines = inline

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

LOOP AT inline.

IF sy-tabix EQ '1'.

w_text1 = inline-tdline.

ELSEIF sy-tabix EQ '2'.

w_text2 = inline-tdline.

ELSEIF sy-tabix EQ '3'.

w_text3 = inline-tdline.

ELSEIF sy-tabix EQ '4'.

w_text4 = inline-tdline.

ELSEIF sy-tabix EQ '5'.

w_text5 = inline-tdline.

ELSE.

EXIT.

ENDIF.

ENDLOOP.

ENDFORM. " process_read_text

pls give reward if it helpfu;

thanks

vana

Read only

Former Member
0 Likes
616

Hai,

The Name & Object of the Text is Mandatory for this Function Module.Valid text objects are defined in table TTXOB.

Regards,

Padmam.