04-12-2005 9:17 PM
Hi ,
I want to write the material text, which is also carried to the Purchase Order as PO Text to a new z report.
This text is not storted in a table. From where can i get the data to print on a z report.
Thanks,
04-12-2005 10:04 PM
Hi Simi,
I am not sure which text you are looking for. If you are looking for long texts, then you can retrieve these using the READ_TEXT function module. You need to pass ID, LANGUAGE, NAME, and OBJECT. You will find the ID and OBJECT in the long text editor menu under
'Go To --> Header'. NAME will be your material number in the internal format.
STXH and STXD are the tables, but the long text itself is stored as raw data and you have to use the function module.
Let me know if you need any further help.
Srinivas
04-12-2005 10:04 PM
Hi Simi,
I am not sure which text you are looking for. If you are looking for long texts, then you can retrieve these using the READ_TEXT function module. You need to pass ID, LANGUAGE, NAME, and OBJECT. You will find the ID and OBJECT in the long text editor menu under
'Go To --> Header'. NAME will be your material number in the internal format.
STXH and STXD are the tables, but the long text itself is stored as raw data and you have to use the function module.
Let me know if you need any further help.
Srinivas
04-12-2005 10:23 PM
Hi Srinivas,
That is exactly what ia m looking for. I got the information regarding the
ID, LANG, NAME, OBJECT.
what do i have to put in the
TAbles
LINES:
It is not accepting STXH or STXD. Also will it enable it to write also, or so i have to give again an command to write.
Thanks,
04-12-2005 11:44 PM
Hi Simi,
Create an internal table as follows....
<b>DATA: t_tline TYPE tline occurs 0 with header line.</b>
use <b>t_lines</b> in your function call.
Hope that helps!
Rishi
04-13-2005 1:57 PM
Hi,
I tried to create an internal table as you said. But somehow its also not working, its giving dump.
I am writing the process i did, pls suggest where i went wrong.
I created an Internaltable to get the matnr.
in the function module 'read_text' i am entering
DATA: t_tline TYPE tline occurs 0 with header line.
IF SY-SUBRC = 0.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'BEST'
LANGUAGE = 'EN'
NAME = ITAB-MATNR
OBJECT = 'MATERIAL'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = t_tline
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
thanks,
04-13-2005 2:26 PM
Hi Simi,
Try this:
DATA:
NAME LIKE THEAD-TDNAME,
OBJECT LIKE THEAD-TDOBJECT VALUE 'MATERIAL',
ID LIKE THEAD-TDID value 'BEST'.
DATA: BEGIN OF LT_LINES OCCURS 0.
INCLUDE STRUCTURE TLINE.
DATA: END OF LT_LINES.
NAME = ITAB-MATNR.
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = ID
LANGUAGE = SY-LANGU
NAME = NAME
OBJECT = OBJECT
Andreas
04-13-2005 2:55 PM
Hi Andreas,
Thanks for the set of code. How to enable it to write on the report. This just reads the data.
what about writing it.
Thanks,
04-12-2005 10:08 PM
Simi
PO Short text (or the material text copied over to the PO) is stored in the PO line item table <b>EKPO</b> field <b>TXZ01</b>.
Hope that Helps!
Rishi
04-13-2005 3:03 PM
Hello Simi,
you have to make a loop on the return table tline
and print it.
Shravan
04-13-2005 3:11 PM