cancel
Showing results for 
Search instead for 
Did you mean: 

One search help for multiple select-options in webdynpro abap

Former Member
0 Kudos

Hi,

I need a way to use one search help for multiple select-options fields. My scenario is :

I have a table for keeping different organizational units' values of different systems. I have pasted some sample data from this table at the end of this mail. On the screen I want to have 1 select-options filed for werks, and 1 select-options filed for vkorg. (In fact I will have more org. unit fields...) In the beginning of my application the user will select sid.

If the user selects ADS as SID, when he opens search-help for the first org. unit (werks), he will see the records with SID: ADS, VARBL = $WERKS, LANGU = SY-LANGU.

If the user selects AGT as SID, when he opens search-help for the second org. unit (vkorg), he will see the records with SID: AGT, VARBL = $VKORG, LANGU = SY-LANGU.

I have created a search-help taking SIDD, VARBL and LANGU as import parameters; used field mapping and bound this search help to my table. I have created 2 context nodes : org1 and org2 having attributes SID, VARBL, VALUE, LANGU .

I have assigned related SID, VARBL and Langu values to these attributes at runtime as I needed. That way, if I use input field and reference to the related context attributes org1-value and org2-value2 accordingly, search help works well as I want.

However, when I use select-options field , I can not bind the field to the context data. I can give reference only to ddic structure. Is there any way to reference to a context attribute? I searched for this in SDN, but could find nothing.

I think I won't be able to use this way. What do you say?

As I read from forums maybe using OVS help will be suitable for me. But I have to use one search-help for all select-options fields. Do you know how I can determine the active select-options field and pass its name (for instance "werks" ) as parameter to this OVS search help. (Also I'll pass SID and LANGU.)

MY TABLE (ZBYYT080) CONTENTS:

SID VARBL VALUE LANGU VTEXT

ADS $WERKS 1 T Werk 0001

ADS $WERKS 11 T OZYAS GIDA URETIM YERI

ADS $WERKS 5501 T BOYA GEBZE FABRİKASI

ADS $WERKS 5502 T BOYA CIGLI FABRİKASI

AGT $WERKS 2301 T KAMLI DAMIZLIK

AGT $WERKS 9601 T PANAR DENIZ URETIM YERI

ADS $VKORG 22 T AA KİMYASALLAR

ADS $VKORG 8001 T İINSAAT BOYALARI

AGT $VKORG 6500 T DAMk St.Org

AGT $VKORG 5400 T PANAR St.Org.

I wish I'm clear enough..

I will be gald if someone answers me as soon as possible...

Thanks İn advance..

MERAL

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you for your answer Manas , but that's not what I ask.

In fact I have 2 questions:

1- Is there a way to bind a select-options filed to a context attribute?

2- If I want to use one ovs search help for multiple select-options, how can I get the name of select-options field that has focus? Can I use "OVS_CALLBACK_OBJECT->CONTEXT_ATTRIBUTE" for instance?

MERAL

Former Member
0 Kudos

Hi,

Your ques is how to refer to a DDIC search help to refer to selection screen parameter ?

Am I right ?

If Yes, then in the interface IF_WD_SELECT_OPTIONS

method ADD_SELECTION_FIELD, ADD_PARAMETER_FIELD etc

have importing param like I_VALUE_HELP_TYPE and I_VALUE_HELP_ID, I_VALUE_HELP_MODE, I_VALUE_HELP_STRUCTURE

etc which may help you to link your create DDIC Search help to selection screen params.

this is just a clue from my side. I haven't tried it myself.

You can go to the where used list of this method and find some sample implementations which use these params.

Hope this helps.

Regards

Manas Dua