Application Development and Automation 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: 
Read only

languages

Former Member
0 Likes
598

hi all,

i have to get all languages text for a material.

so i am using READ_TEXT Function module.

in this functional module laguage = what should i give.

ig i am giving sy-langu i am not getting remaining laguages.

please suggest how to get all the laguages.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = '0001'

language = sy-langu

name = lv_name

object = 'MVKE'

  • ARCHIVE_HANDLE = 0

thanks in advance

5 REPLIES 5
Read only

vinod_vemuru2
Active Contributor
0 Likes
558

Hi Hema,

Check below logic.


Select * INTO TABLE i_t002 FROM t002.
 "Get All languages maintained in ur system.

LOOP AT i_t002 INTO wa_t002.
CLEAR l_language.
MOVE wa_t002-spras TO l_language.
CALL FUNCTION 'READ_TEXT'
EXPORTING

CLIENT = l_language
id = '0001'
language = sy-langu
name = lv_name
object = 'MVKE'

ARCHIVE_HANDLE = 0 

"Do ur processing for each language. i.e Take each language 
"text into some internal table, Write to o/p etc.
ENDLOOP.

Thanks,

Vinod.

Edited by: Vinod Kumar Vemuru on Jun 16, 2008 4:26 PM

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
558

Hi Hema,

If you to have fetch all the texts in all languages , then fecth all the lanaguage keys in the system from table T002 and loop over this table for language key to pass it to the FN 'READ_TEXT' .

Hope this helps.

Regards,

Sandeep

Read only

Former Member
0 Likes
558

Hi,

FM - READ _TEXT Language is the mandatory field,

IF u want description in all the languges,GO for a SELECT from

table MAKTX pass the material number and get the material description in all the languages.

Rgds

Read only

Former Member
0 Likes
558

suggestion

check data in table 'STXH' and get all the langauge for that ID

and then you get all the langauges avilable for that id.

May be this may work.

Read only

Former Member
0 Likes
558

Hiii Hema...

As the text will be read fro mthe strucutre THEAD as run time ...ans as at a time only one SPRAS is valid for fetching ...

Just read all the languages availabale from T002 table and store it ina a ITAB...

and now loop the <itab>

call the READ_TEXT.

pass SPRAS value with <itab-spras>

***however tdid and tdname will be same*****

and now append tha details into an itab type Tline-tdline.

endloop...

hope this would sove the problem ....

regards

chandu reddy

Edited by: chandu reddy sunkari on Jun 16, 2008 1:06 PM