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

help with READ_TEXT

Former Member
0 Likes
989

hi all,

somebody could give me an example for using this function. And how can i manipulate the result? of the function?

regards,

Jose Roberto

1 ACCEPTED SOLUTION
Read only

gopi_narendra
Active Contributor
0 Likes
938

TDOBJECT1 = 'ZES_RFQ'.

TDNAME1 = TD_NAME1.

TDID1 = 'Z01'.

TDSPRAS1 = SY-LANGU.

call function 'READ_TEXT'

exporting

ID = TDID

LANGUAGE = SY-LANGU

NAME = TDNAME1

OBJECT = TDOBJECT1

importing

HEADER = HEADER1

tables

LINES = LINES1

exceptions

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6.

In order to edit the lines returned in the READ_TEXT fun module u will have to use EDIT_ TEXT & SAVE_TEXT function modules

For better understanding of using these function modules <b>see the program RM07METI

also see the table STXH</b>

Regards

- Gopi

8 REPLIES 8
Read only

gopi_narendra
Active Contributor
0 Likes
939

TDOBJECT1 = 'ZES_RFQ'.

TDNAME1 = TD_NAME1.

TDID1 = 'Z01'.

TDSPRAS1 = SY-LANGU.

call function 'READ_TEXT'

exporting

ID = TDID

LANGUAGE = SY-LANGU

NAME = TDNAME1

OBJECT = TDOBJECT1

importing

HEADER = HEADER1

tables

LINES = LINES1

exceptions

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6.

In order to edit the lines returned in the READ_TEXT fun module u will have to use EDIT_ TEXT & SAVE_TEXT function modules

For better understanding of using these function modules <b>see the program RM07METI

also see the table STXH</b>

Regards

- Gopi

Read only

0 Likes
938

The standard function module Read_text read data from 'STXL' table. for reading we have to provide header information .

ie.

ID

LANGUAGE)

NAME

OBJECT

ARCHIVE_HANDLE

a text object should be created using se75

and value returned in the table

eg:

CALL FUNCTION 'READ_TEXT'

EXPORTING

id = '0001'

language = sy-langu

name = l_guid

object = 'Y9055'

TABLES

lines = it_textline

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

Read only

0 Likes
938

hi thanks all for the response,

its for me more clear the use of read_text function, but i need to know how obtein the name, because is a string with diferent fields, so i need to know how obtein that name because in the c203 transaction obtein the text with the read_text but i can't find how to generate the name field

regards,

Jose Roberto

Read only

0 Likes
938

Hi Jose,

I am not able to follow with the transaction C203, but in general the fields needed to be passed to the READ_TEXT can be available from the header of long text.

Check my solution in the below thread to follow accordingly with PO Purchase Order.

Regards

- Gopi

Read only

0 Likes
938

Hi Jose,

Go to the text header and check on the value. Let say if you are retrieving a material text from MM03, you need to check on the header part for your text and it will show all those 3 fields. Wheareas for name, you have no choice but need to concatenate a few fields together and make the name key. Unless the text is directly created from SO10, then you no need to do any concatenation.

Message was edited by: Justin

Read only

0 Likes
938

hi Gopi,

it could help me but for example the tdname is built by mandt 200

doc type 2

receips group 50000001

ID receip group .08

Pos. 00000002

2002500000010800000002

So, the data is in the table plko but i dont know how identify in where pos is each planning receip.

that is tha change every time.

Read only

0 Likes
938

as what i cud see from the tables PLKO and PLPO i think taht the field Pos. 00000002 is the field PLNKN from table PLPO.

Please check these

doc type is <b>PLKO-PLNTY</b>

receips group <b>PLKO-PLNNR</b>

ID receip group <b>PLKO-PLNAL</b>

Pos. <b>PLPO-PLNKN</b>

<u><b>PLEASE CORRECT ME IF I WAS WRONG

is ur problem solved,if so plz close this thread</b></u>

Regards

- Gopi

Read only

Former Member
0 Likes
938

Hi,

Please have a look.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

ID = 'LTXT'

LANGUAGE = sy-langu

NAME = '%000000000010004'

OBJECT = 'QMFE'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

LINES = l_text_tab

  • 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.

basically the ID, object and name are coming from text where you can check in tcode SO10.