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

program for read_text

Former Member
0 Likes
606

Dear all,

Can u send me some sample programs using Read_text function module

Regards,

Shanmugaperumal

3 REPLIES 3
Read only

Former Member
0 Likes
523

Hi,

Try to findout first the Text Object,

Sample code:

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = business_partner

IMPORTING

output = business_partner.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = contract_account

IMPORTING

output = contract_account.

wa_thead-tdid = 'FKK'.

wa_thead-tdspras = sy-langu.

CONCATENATE contract_account business_partner INTO wa_thead-tdname.

wa_thead-tdobject = 'FKKVKP'.

CASE flag.

WHEN 'R'.

CALL FUNCTION 'READ_TEXT'

EXPORTING

id = wa_thead-tdid

language = wa_thead-tdspras

name = wa_thead-tdname

object = wa_thead-tdobject

IMPORTING

header = wa_thead

TABLES

lines = notes

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

WHEN 'I'.

wa_thead-tdfuser = sy-uname.

wa_thead-tdfdate = sy-datum.

wa_thead-tdftime = sy-uzeit.

wa_thead-mandt = sy-mandt.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

header = wa_thead

insert = 'X'

savemode_direct = 'X'

IMPORTING

newheader = wa_thead

TABLES

lines = notes

EXCEPTIONS

id = 1

language = 2

name = 3

object = 4

OTHERS = 5.

WHEN 'D'.

REFRESH notes.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

header = wa_thead

savemode_direct = 'X'

IMPORTING

newheader = wa_thead

TABLES

lines = notes

EXCEPTIONS

id = 1

language = 2

name = 3

object = 4

OTHERS = 5.

WHEN 'M'.

wa_thead-tdluser = sy-uname.

wa_thead-tdldate = sy-datum.

wa_thead-tdltime = sy-uzeit.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

header = wa_thead

savemode_direct = 'X'

IMPORTING

newheader = wa_thead

TABLES

lines = notes

EXCEPTIONS

id = 1

language = 2

name = 3

object = 4

OTHERS = 5.

ENDCASE.

Mark points if helpful.

Regs

Manas

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
523

Hi,

Check here.

http://www.google.com/custom?q=read_text&client=pub-0901176218310532&forid=1&ie=ISO-8859-1&oe=ISO-88...

You can find lot of sample code.

search in sapfans.com for read_text.

Read only

Former Member
0 Likes
523

Hi

You can double click on the text entered... it will take you to a window, whr it will show the text... click on '<b>Header'</b> from the Menu...Here you will find the details of the standard text like <b>TEXTID, TEXTNAME, OBJECT, LANG</b>UAGE etc...

If you run <b>READ_TEXT</b> FM in SE37 giving these values as input, you will know how this FM works....

Regards,

Raj