2006 Oct 03 3:38 AM
Friends,
have created one search help with condition type and condition type text, and associated to the field condition type. NOw on the help popup the data is diplayed for two languages eg, EN an TH though the logon language is EN. can we restrict it?
Many Thanks,
Albert.
Friends,
have created one search help with condition type and condition type text, and associated to the field condition type. NOw on the help popup the data is diplayed for two languages eg, EN an TH though the logon language is EN. can we restrict it?
Many Thanks,
Albert.
2006 Oct 03 3:46 AM
Hi,
Try this..
In the database view that you created for the search help have the selection conditions with the following values..
Table - T685T
Field name - SPRAS
Operator - EQ
Comparative value - SY-LANGU..
I believe it will be automatically filtered based on the logon language..
Thanks,
Naren
2006 Oct 03 3:46 AM
Hi Albert,
Yes, we can restrict it. In the select query , use WHERE CLAUSE with LANGU = sy-langu or SPRAS = sy-langu.
Best regards,
Prashant
2006 Oct 03 4:21 AM
if you have problems referring to SYST fields you can get round it by hard-coding the language in a selection condition of your database view,eg
TRDIRT SPRSL EQ 'E'
or you can create a search help exit function module and link it to your search help, something like:
FUNCTION z_wxyz_shlp_exit.
*"----
""Local interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCR_TAB_T
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR_T
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
*"----
DATA:
L_spras TYPE spras.
FIELD-SYMBOLS:
<field> TYPE dfies.
Language filter logic.
This logic only needs to apply at the 'DISP' event - which is just
before the hit list is displayed
CHECK callcontrol-step = 'DISP'.
find the language entry in the field description table
READ TABLE shlp-fielddescr ASSIGNING <field>
WITH KEY fieldname = 'SPRAS'.
*.. exit if one is not present
CHECK <field> IS ASSIGNED.
pass through the proposed hit list...
LOOP AT record_tab.
populate the language of the current record
l_spras = record_tab+<field>-offset(<field>-intlen).
check if it is different from the system language
IF l_spras <> sy-langu.
*... and if so remove current record from the hit list
DELETE record_tab.
ENDIF.
ENDLOOP.
ENDFUNCTION.
2006 Oct 03 4:25 AM
hi,
just give SPRAS = 'EN' in the WHERE condition of the
select query.
rgds
anver
pls marl all hlpful answers
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |