Application Development 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: 

how to get basic text lines from mara

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

8 REPLIES 8

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

max

i need to print these texts in smartform

so plz tell me how to do

regards

0 Kudos

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

0 Kudos

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

former_member188685
Active Contributor
0 Kudos

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