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: 

Selection are getting defaulted with Language English

Former Member
0 Kudos

Hi All,

with the below select statement I am not able to select what ever language key i am passing on selection screen. Its always taking EN default.

SELECT *

INTO TABLE lt_stxh

FROM stxh

WHERE tdobject = gc_tdobject

AND tdspras IN s_lang

AND ( ( tdfdate GT lv_max_date AND tdftime GT lv_max_time )

OR ( tdldate GT lv_max_date AND tdltime GT lv_max_time ) ).

Please point out the error. any suggestion to improve the select are also welcome. I am select all records, where created on date Time and Changed On date Time all four are GT max time and date.

Thanks and Regards,

Anil

7 REPLIES 7

Former Member
0 Kudos

Hi Anil,

check any statement in the pgm you are forcing

s_language = sy-language.


SELECT *
INTO TABLE lt_stxh
FROM stxh
WHERE tdobject = gc_tdobject
AND tdspras IN s_lang                       "Check it should not initial.
AND ( ( tdfdate GT lv_max_date AND tdftime GT lv_max_time )
OR ( tdldate GT lv_max_date AND tdltime GT lv_max_time ) ).

Regds / Prabhudas

0 Kudos

Hi Anil

try this....

pass s_language as 'E' instead ot 'EN'.

Regards,

Prabhudas

Former Member
0 Kudos

Hello

Are you certain that exist record on the other languages, except EN for condition data?

0 Kudos

Yes it having records with other language. selection from Se11 with same condition I am getting records for all language but select statement is providing those.

Regards,

Anil

Former Member
0 Kudos

Hi Anil,

the language for Spanish 'ES' if you are passing ES in the selection screen and internally you declared as 0ne character it takes 'E' instead of 'ES' .

so 'EN represents 'E'

and 'ES' represents 'S'

so waht i suggest is try to enter sigle character in the selection.

it will solve your problem.

Regards,

Prabhudas

0 Kudos

Conversion are geting done automatically. I checked in debugging, I am getting correct language code.

Regards,

Anil

Former Member
0 Kudos

I dont see anything wrong in the query, 2 things that come to my mind

a. check if the data is maitained for other languages.

b. Ensure that the s_lang doesn not have a blank entry.

Also , just for test, declare the s_lang as a parameter and change AND tdspras IN s_lang

to AND tdspras = s_lang see the result, to see if the data is fetched correctly.

regards,

Advait