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

Problem with report

Former Member
0 Likes
2,483

Hi All,

I am trying to run the report which is develop in EN logon system. Now this report has to run in ZH logon system. I have got the output but is displaying in English actually it has two display in Chinese. and my logon system is unicode.


18 REPLIES 18
Read only

Former Member
0 Likes
2,451

Did you maintain the translations?

In your report goto->text elements->selection texts. now again Goto->translation.

Give language ZH and see if texts and messages are translated. you may also use SE63.

Read only

0 Likes
2,451

Hi kartik,

my data is in internal table. So i need to translate the entire internal table.

Read only

0 Likes
2,451

Can you post your code?

Read only

0 Likes
2,451

Hi Kartik,

Suppose my internal table contains data of material description which is in English language.

Now the end user will logon to system with "ZH"(Chinese) language. the data in the internal table which is in English language should converted into the Chinese language.

Read only

Danish
Explorer
0 Likes
2,451

This message was moderated.

Read only

Former Member
0 Likes
2,451

Hi Danishh,

Suppose my internal table contains data of material description which is in English language.

Now the end user will logon to system with "ZH"(Chinese) language. the data in the internal table which is in English language should converted into the Chinese language.

The link which you mentioned above for picking data from the database on language bases mine requirement is different as mentioned above.

Read only

0 Likes
2,451

Hi Quddus,

For the above scenario what ill do is :

Go to table MAKTX and select the maktx field by passing SPRAS = ZH.

Cordially,

Danish

Read only

Former Member
0 Likes
2,451

Hi Danish,

What is the use of it. It will only pick the data of ZH language. My task is to pick all the data and convert it into ZH language.

Read only

0 Likes
2,451

Hi Quddus,

You can pass sy-langu to the same query it will pick the data for the User's logon language.

Cordially,

Danish

Read only

Former Member
0 Likes
2,451

You'll pass the key as SY-LANGU.

For example - SELECT * from MAKTX where MATNR = 'xyz' and SPRAS = sy-langu, now when the user will execute the report by logging in from ZH, then MAKTX will give ZH descriptions if user is logged in using FR login then he'll get FR descriptions, isnt this what you want?

Read only

Former Member
0 Likes
2,451

Hi Kartik,

Irrespective of sy-langu. my select query will pick the data from makt table. now depending upon logon system the data has convert into particular language.

Read only

Former Member
0 Likes
2,451

Hi Danish,

You are not getting my point. I will pick all the data from makt and put it in the internal table usually the material description will be in English language. Now depending upon logon system language the material disc should be converted like french, chinese ect.

Read only

0 Likes
2,451

thats exactly what my code will do. select the fields using SY-LANGU it will display the data in what ever language the user will log on.

pass SPRAS = SY-LANGU, it will solve your problem

Read only

0 Likes
2,451

Hi ,

Karthik is saying right , You need to

translated the text in required Language like ZH so  use SE63, maintain your translation in ZH , and write code like SELECT * from MAKTX where MATNR = 'xyz' and SPRAS = sy-langu.

Thanks.

Read only

Former Member
0 Likes
2,451

Hi all,

I dont think so. If you are specifying sy-langu in where condition it will pick only the records of logon language. My task is pick all the records irrespective of language i.e, english, chinese, spain, de ect.

after picking it i should convert the language english-chinese, chinese-chinese, spain--chinese, de-chinese.

Read only

0 Likes
2,451

Hi Mahammed,

In this case I think you should have maintain entries in  ZH langauge also in the table..

Thanks.

Read only

Former Member
0 Likes
2,451

If you are expecting your program to "translate" it will not happen, SAP by design has added SPRAS to all text tables and if there is any custom table created it has to be based on same design.

The translations will be maintained in DB and your program has to fetch based on SY-LANGU, if want to fetch all languages, you may skip passing SPRAS to where and all languages will be retrieved(though there will no use of that), but translations will be picked up from DB only.

If you need further help you'll have to elaborate your requirement since I believe, there's a mistake in the design, but I'm pretty sure program will not translate languages.

Read only

Former Member
0 Likes
2,451

Why would you want to do that?

SAP has built in the SPRAS domain to handle text translations.

  • If you want texts in a certain language then you pass that as part of your Select - Select * from MAKT Where SPRAS EQ 'EN' or 'ZH' - so you'd get all entries in EN or ZH.
  • If you want the texts in the logon language you'd pas SY-LANGU to the Select
  • If you want to show all texts, don't specific SPRAS in the where condition

I think you need to try and explain your requirement properly, rather than what you think the solution is so that we can help you better.

Cheers,

G.