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

Doubt in READ_TEXT

Former Member
0 Likes
956

HI.

I need to fetch 'Header text' and 'line item text' from ME32L by Using FM READ_TEXT.

is it possible? but it not working on code pls help me.

DATA:id LIKE thead-tdid,

name LIKE thead-tdname,

lines LIKE tline OCCURS 0 WITH HEADER LINE,

HEADER type thead.

*********************************************

LOOP AT it_merge.

name = it_merge-ebeln.

break-point.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = 'L01'

language = 'E'

name = NAME

object = 'EKPO'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

IMPORTING

HEADER = HEADER

TABLES

lines = lines

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8

.

break-point.

  • IF sy-subrc = 0.

it_merge-ebeln = name.

  • it_merge-header_text = HEADER.

it_merge-header_text = lines-tdline.

MODIFY it_merge.

break-point.

  • ENDIF.

ENDLOOP.

Help me.

To be Reward All helpfull answers.

Jay

HI.

I need to fetch 'Header text' and 'line item text' from ME32L by Using FM READ_TEXT.

is it possible? but it not working on code pls help me.

DATA:id LIKE thead-tdid,

name LIKE thead-tdname,

lines LIKE tline OCCURS 0 WITH HEADER LINE,

HEADER type thead.

*********************************************

LOOP AT it_merge.

name = it_merge-ebeln.

break-point.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = 'L01'

language = 'E'

name = NAME

object = 'EKPO'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

IMPORTING

HEADER = HEADER

TABLES

lines = lines

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8

.

break-point.

  • IF sy-subrc = 0.

it_merge-ebeln = name.

  • it_merge-header_text = HEADER.

it_merge-header_text = lines-tdline.

MODIFY it_merge.

break-point.

  • ENDIF.

ENDLOOP.

Help me.

To be Reward All helpfull answers.

Jay

7 REPLIES 7
Read only

Former Member
0 Likes
915

Hi,

Goto ME32L, then goto Header text then press the text button then it will open the Line editor, from the Line editor press Goto --> Header , then it will open a popup there in the popup you will find all the options which needs to pass to the READ_TEXT function module

Regards

Sudheer

Read only

0 Likes
915

Hi Sudheer.

please give sample code for that.

did you seen my code. i given it,but it not working..

pls help me..........

Read only

0 Likes
915

hi,

check this

PARAMETERS: P_EBELN

LIKE EKPO-EBELN.

PARAMETERS: P_EBELP LIKE EKPO-EBELP.

*

DATA: TEMP_TEXT TYPE TABLE OF TLINE WITH HEADER LINE.

*

DATA:

TDNAME LIKE STXH-TDNAME.

*

CONCATENATE P_EBELN P_EBELP INTO

TDNAME.

*

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT

= SY-MANDT

ID

= 'F01'

LANGUAGE

= SY-LANGU

NAME

= TDNAME

OBJECT

= 'EKPO'

TABLES

LINES

= TEMP_TEXT.

IF SY-SUBRC <> 0.

WRITE: SY-SUBRC.

EXIT.

ENDIF.

LOOP AT TEMP_TEXT.

WRITE : / 'READ_TEXT',

TEMP_TEXT-TDLINE.

ENDLOOP.

regards,

Prabhu

reward if it is helpful

Read only

Former Member
0 Likes
915

Hi

Did u define name as

DATA: name TYPE thead-tdname.

Read only

Former Member
0 Likes
915

Hi Jay,

the simplest way is this:

first: use ME32L and insert header and item-text.

second: look into <b>STXH</b> with the user-id and date on wich you have inserted.

here you can see the parameters for READ_TEXT.

third: cange your report with this parameters

fourth: run your report and you get the text.

Regards, Dieter

Read only

Former Member
0 Likes
915

well, tdid, tdname, spras and tdobject are header information. you dont need to pass an additional header.

try to call you FM READ_TEXT ONLY with those 4 and a table for lines.

Read only

Former Member
0 Likes
915

Go to ME32L , there go to header text .Doublc click on the text , it will take you to editor .click goto -> header , it will show u another subscreen in which u will have the following fileds

Text Name

Language

Text ID

Text Object

U will have to use these fields in read_text.

Reward , if useful