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 Fuction mudule

Former Member
0 Likes
1,028

Hi Experts,

I need your help i need to read text on text editor .on this editor i use save_text function module and read_text FM.

Read_Text FM call it ask me ID ,LANGUAGE,NAME,OBJECT

is not defied this i hvae to create somewhere(standard) transaction.

Kindly guide me where i have to create all these objects.

Thanks in advance.

Points sure.

Hi Experts,

I need your help i need to read text on text editor .on this editor i use save_text function module and read_text FM.

Read_Text FM call it ask me ID ,LANGUAGE,NAME,OBJECT

is not defied this i hvae to create somewhere(standard) transaction.

Kindly guide me where i have to create all these objects.

Thanks in advance.

Points sure.

7 REPLIES 7
Read only

Former Member
0 Likes
998

Hi,

All these variables are stored in STXH and STXL tables. Go to the above tables then use of it. The text's might be the material test, customer, vendor, sales order text, delivery text and so on. If you save any text in any of the above orders or material then the text would store in the table STXH and the key fields for any particular text are ID ,LANGUAGE, NAME, OBJECT. In the above fields the object might be the value of sales order, delivery, PO number or material....

Rgds,

Bujji

Read only

0 Likes
998

Hi Bajji,

I need to save this text on Texteditor the taxt is 1st save then FM Read_TEXT for protect lines of text.

Here i want 1st taxt save then read for protected.

Looking forward for your prompt response.

Read only

0 Likes
998

Bujji,

Can i enter value of my objects in table STXL and STXH table with my object?

Read only

Former Member
0 Likes
998

Hi,

Please refer to the link below:

http://www.sapdev.co.uk/sapscript/sapscript_texts.htm

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
998

Hi,

For saving text itself,you have to pass these values.Check this code

  • populating THEAD structure

l_v_thead-tdobject = wa_lngtxt-objid.

l_v_thead-tdname = l_v_tdname.

l_v_thead-tdid = wa_lngtxt-txtid.

l_v_thead-tdspras = wa_lngtxt-lang.

  • End

clear l_v_msgno.

call function 'SAVE_TEXT'

exporting

client = sy-mandt

header = l_v_thead

savemode_direct = k_x

tables

lines = i_tlines

exceptions

id = 1

language = 2

name = 3

object = 4

others = 5.

if sy-subrc <> 0.

l_v_msgno = sy-msgno.

For all the tcode,where there is an option for creating a long text,check the properties of that text,you will get all required data.

If your using save_text function module,you can use same object id every thing in read_text function module also.

Hope this will help

Regards

Shibin

Edited by: Shibin on Mar 6, 2008 12:18 PM

Read only

0 Likes
998

Here is my code i need to define text ID :For which transaction we define text ID Object.....

I_HEAD-TDOBJECT = 'ZPRJ'.

I_HEAD-TDNAME = 'BID'.

I_HEAD-TDID = 'ZBID'.

I_HEAD-TDSPRAS = 'E'.

*append I_HEAD.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

CLIENT = SY-MANDT

HEADER = I_HEAD

  • INSERT = ' '

  • SAVEMODE_DIRECT = ' '

  • OWNER_SPECIFIED = ' '

  • LOCAL_CAT = ' '

  • IMPORTING

  • FUNCTION =

  • NEWHEADER =

TABLES

LINES = I_LINE[]

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

OBJECT = 4

OTHERS = 5

.

IF SY-SUBRC <> 0.

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

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

ENDIF.

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

ID = I_HEAD-TDID

LANGUAGE = I_HEAD-TDSPRAS

NAME = I_HEAD-TDNAME

OBJECT = I_HEAD-TDOBJECT

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

IMPORTING

HEADER = I_HEAD

TABLES

LINES = I_LINE[]

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7

OTHERS = 8

.

Read only

Former Member
0 Likes
998

This message was moderated.