06-30-2006 2:42 PM
sorry
how to get basic text of material masrter lines from mara table plz guide me
my rwequirement is as follows
1)Manufacture Address
(Manuf) MARA Basic Text of Material Master Lines 7-12
2)Storage Temperature
(Stor. Temp.) MARA Basic Text of Material Master Lines 13 & 14
plz guide me
regards
06-30-2006 2:45 PM
Hi
They seem to be long texts, you should check the ID of those text and so using fm READ_TEXT.
I believe the key should be:
THEAD-TDNAME = <MATERIAL NUMBER>
THEAD-TDID = 'GRUN'
THEAD-TDOBJECT = 'MATERIAL'
THAED-TDSPRAS = <LANGUAGE>.
Max
Max
06-30-2006 2:45 PM
Hi
They seem to be long texts, you should check the ID of those text and so using fm READ_TEXT.
I believe the key should be:
THEAD-TDNAME = <MATERIAL NUMBER>
THEAD-TDID = 'GRUN'
THEAD-TDOBJECT = 'MATERIAL'
THAED-TDSPRAS = <LANGUAGE>.
Max
Max
06-30-2006 2:54 PM
hi max
i am not getting what you said
actually i need to print long texts only
sp plz give brief it will be useful to me
regards
06-30-2006 2:56 PM
Hi
Ok but how do you have to print them?
The long texts are std text so you need to get the keys (just as I and vijay said).
if you want to print in a abap list:
TABLES: THEAD.
DATA: TLINES TYPE TABLE OF TLINE WITH HEADER LINE.
THEAD-TDNAME = <MATERIAL NUMBER>
THEAD-TDID = 'GRUN'
THEAD-TDOBJECT = 'MATERIAL'
THAED-TDSPRAS = <LANGUAGE>.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = THEAD-TDID
LANGUAGE = THEAD-TDSPRAS
NAME = THEAD-TDNAME
OBJECT = THEAD-TDOBJECT
TABLES
LINES = TLINES
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.
LOOP AT TLINES.
WRITE: / TLINE-TDLINE.
ENDLOOP.
If you need to print by sapscript
/: INCLUDE <MATERIAL CODE> OBJECT MATERIAL ID GRUN
LANGUAGE <LANGUAGE>.
So you make sure which kind (ID) of text you need
Max
06-30-2006 2:59 PM
Hi Nayak,
if you want to READ the Long texts , it is possible to read them using the FM READ_TEXT. for that you need to pass the Parameters. which i mentioned in my above Post.
you just fill the parameters with the above mentioned. Just only you need to pass the material number which you want to read the text.and run you will be able to see the long text in the lines.
Regards
vijay
06-30-2006 3:07 PM
max
i need to print these texts in smartform
so plz tell me how to do
regards
06-30-2006 3:12 PM
vijay
i need to write code in application program and in smartform (i need to display these texts in sf)
so plz guide me
regards
06-30-2006 3:18 PM
Hi
Ok you can create a node trxt and choose INCLUDE TEXT as type text.
Now in the tab on your right you should see these input:
Text name = &WA-MATNR&
Text object = 'MATERIAL'
Text ID = 'GRUN'
Language = &WA-SPRAS&
In this example I transfer the name and language as variable because I can know them at run time and object and id are fixed because I want to print only that kind of text.
So I don't know your situation (perhaps you can know all data at runtime and so you have to transfer all as variable).
WA (in this example) is the structure of SF where I store the data of material.
You should set the check box 'No error if no text exist' in this way no dump'll occur if the long text doesn't exist.
I hope it can be helpful for you
Max
06-30-2006 2:53 PM
Hi,
For Mateial Related texts..
1. material description
MAKT-MAKTX
The other texts you can get using READ_TEXT
you need to pass the Below prameters...
for material texts.
<b>OBJECT MATERIAL
TDNAME Material(18)
TDID BEST, GRUN, or IVER
TDSPRAS sy-langu
OBJECT MDTXT
TDNAME Material(18)+PLANT
TDID LTXT
TDSPRAS sy-langu
MAterial Sales Text
OBJECT MVKE
TDNAME Material(18)Sales ORgDist Channel
TDID 0001
TDSPRAS sy-langu</b>
regards
vijay