09-15-2008 2:20 PM
Hi,
i want to export the material sales long text from each material to a xls sheet. I've read in this forum that it should be possible with the READ_TEXT function.
Could anybody tell me the program code for it or could anyone give me a description how to do this?
THX!
strobbel
09-15-2008 2:29 PM
Hi,
you can use function as following:
data : tbody like TLINE occurs 0 with header line.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'ST'
LANGUAGE = sy-langu
NAME = 'SO10_NAME'
OBJECT = 'TEXT'
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
TABLES
LINES = tbody
* 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.
Hope helps.
deniz.
09-15-2008 2:35 PM
Hi,
First get the OBJNR from AUFK table
Now go to table IHPA with the OBJNR value and PARNTER Function VU (VU is for User Responsible)
Get the PARNR value from IHPA table.
Now Go to Table USR21 with the PARNR from IHPA, as BNAME. Then you get the
PERSNUMBER and
ADDRNUMBER
Now go to the Table ADR6 with the Above PERSNUMBER and ADDRNUMBER , Get the email address .
Thanks&Regards,
Naresh
09-15-2008 2:48 PM
Are you both sure what i mean?
I mean the sales text in the mm03 for each material.
Could anybody else help me?
Edited by: strobbel on Sep 15, 2008 4:04 PM
09-16-2008 9:50 AM
Now i've getting the program to run, but when i execute it ... nothing happens?!?
Could anybody help me?
09-16-2008 9:55 AM
TDOBJECT : MVKE
TDNAME : Matl no. (18 char.) + Sales organization +
distribution channel
TDID : 0001
Language : Sy-langu
The above are the parameters you need to use while calling the Function READ_TEXT function.
09-16-2008 9:59 AM
I had these settings before, but nothing happened ...
Here is the code:
*&---------------------------------------------------------------------*
*& Report ZREADVERTRIEBSTEXT
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZREADVERTRIEBSTEXT.
data : tbody like TLINE occurs 0 with header line.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = '0001'
LANGUAGE = SY-LANGU
NAME = '5007093 101101'
OBJECT = 'MVKE'
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
TABLES
LINES = tbody
* 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.