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

language parameter in search help

Former Member
0 Likes
3,123

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.

4 REPLIES 4
Read only

Former Member
0 Likes
1,422

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

Read only

Former Member
0 Likes
1,422

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

Read only

former_member186741
Active Contributor
0 Likes
1,422

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.

Read only

anversha_s
Active Contributor
0 Likes
1,422

hi,

just give SPRAS = 'EN' in the WHERE condition of the

select query.

rgds

anver

pls marl all hlpful answers