2007 Aug 10 6:26 AM
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,
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
2007 Aug 10 6:31 AM
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
2007 Aug 10 12:14 PM
Hi Sudheer.
please give sample code for that.
did you seen my code. i given it,but it not working..
pls help me..........
2007 Aug 10 1:24 PM
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
2007 Aug 10 7:42 AM
2007 Aug 10 12:20 PM
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
2007 Aug 10 12:27 PM
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.
2007 Aug 10 12:55 PM
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
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |