05-21-2009 5:24 PM
Hi Gurus:
I have a query which has selections form extars tab in the
infoset and one selection for language from the selection tab.
The problem is that when this selection in teh selection screen
from the selection tab is filled with no language(blank)
and run withoutselecting anyother selection it gives all teh result,
similaryly if I put in a language and in it and run it still shows up
witha ll the result. Actually I would like to see only thiose
materials with description for which the language is entered and not all .
Since this selection copmes from teh selection tab fo the infoset
its not filtering as required but the other selection criteria which
comes from teh extra tab does filter accordingly.
Could anyone sufggest as how tyo gho about doing it so
that it shows the result by filtering from this languiage criteria also.
My selection screen is as follows.
(General data selection)
TDG Language ___<----- this comes from the selection tab in infoset
(Report-specific selection)
Material Number ____ to ____ (these comes from the extra tab in infoset)
Material Type ____ to ____
Material Desc. Language ____ to ____
Layout ____
Thanks
05-21-2009 6:06 PM
05-21-2009 9:19 PM
Could anyone please suggest as what to do for this . I ahve added a piece of code to it . Thera re two columns for text one for english language text and other for other language tyext and the call function is used . When I put this poiece of code it works for the english one , such that when I enter EN in selection screen it shows only for the materials having EN text , but the same code dosent work with the other language , it shows both the texts in it. The quesry is showing an warning saying 'Recursive sourcing in teh code'. as sequnec for both code is 2 and eitjher of them has the variable used in each other.
Is ther a way I can solve this problem.
Thanks
05-21-2009 9:37 PM
Hi Aarav,
Probably the problem lies in your select query.
Can you give the snippet of your code??
Anyways it should go something like this.
if rad_1 = 'x'.
select *
from table
into corresponding fields of table itab
where (give ur language specification here).
Regards
Abhinab.
05-21-2009 9:46 PM
I have two different columsn(additional field) for two diffrenet texts.
FOr the first one its :and its sequence is 2.
data: name3 type tdobname,
language3 type spras,
tlines3 type table of tline with header line.
language3 = sy-langu.
clear tdgtextz1.
name3 = mara-matnr.
call function 'READ_TEXT'
exporting
id = 'PRUE'
language = language3
name = name3
object = 'MATERIAL'
tables
lines = tlines3
exceptions
others = 1.
if sy-subrc = 0.
loop at tlines3.
if sy-tabix = 1.
tdgtextz1 = tlines3-tdline.
else.
concatenate tdgtextz1 tlines3-tdline into
tdgtextz1 separated by space.
endif.
endloop.
endif.
if p_spras = language3.
check not tdgtextz1 = ' '.
tdg_text = ' '.
endif.
for the second one as follows and has the same sequence in infoset as 2.
data: name2 type TDOBNAME,
language2 type SPRAS,
tlines2 type table of TLINE WITH HEADER LINE.
language2 = sy-langu.
clear tdg_text.
name2 = mara-matnr.
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = 'PRUE'
LANGUAGE = language2
NAME = name2
OBJECT = 'MATERIAL'
TABLES
LINES = tlines2
exceptions
others = 1.
IF SY-SUBRC = 0.
loop at tlines2.
if sy-tabix = 1.
tdg_text = tlines2-tdline.
else.
concatenate tdg_text tlines2-tdline into
tdg_text SEPARATED BY space.
endif.
endloop.
ENDIF.
if p_spras = language2.
check not tdg_text = ' ' .
tdgtextz1 = ' '.
endif.
05-21-2009 9:47 PM
05-21-2009 10:18 PM
Do you suggest anything on this so that I get the text for only the language i enter and only materiuals that have text in them .
Thanks
05-22-2009 6:02 PM