cancel
Showing results for 
Search instead for 
Did you mean: 

Search Help for input field2 based on value entered in input field 1

Former Member
0 Kudos

Hi All,

I have a requirement where in my view, i have two fields.

1. PO

2. PO Item

For PO i could get the standard search help from DDIC, but i need to provide search help for PO Item based on PO selected.

How can i do that. Any help is highly appreciated.

Thanks,

Ajay

Accepted Solutions (1)

Accepted Solutions (1)

gopi_narendra
Active Contributor
0 Kudos

Hi,

You may use the OVS for this.

In the OVS Method of the Item field, read the value of the of the PO Number and fill the Search Help with those of the PO.

Regards

Gopi

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Ajay ,

following steps cn help u :

1 Declare the WDR_OVS Component in the used component list in your WD component .

2 Now go to the View, in the Properties Tab click the Create Controller Usage Button.

3 It will open a screen with Component Use Entries. There select the Component Use OVS with Interface Controller . Press Enter.

4 Go to the Context Tab, Right Click the Context and select Create à Attribute , for PO item in ur case .

5 In the Input Help Mode Field, Select u2018Object Value Selectoru2019 from the dropdown. Then press F4 in the Field OVS Component Usage.

6 Declare one event handler method with Name ON_OVS in the Method tab of the view. Then Press F4 in the Column Event.

Select the Event OVS as shown below and Press Enter.

for more info and illustration , also refer :

http://help.sap.com/saphelp_erp2005/helpdata/EN/30/d7fa41c915da6fe10000000a1550b0/content.htm

https://wiki.sdn.sap.com/wiki/display/WDABAP/ABAPWDObjectValueSelector(OVS)

http://wiki.sdn.sap.com/wiki/display/Snippets/OVSSearchHelpinWebDynproAbap

regrds,

amit

Former Member
0 Kudos

hi,

You can even design a Dictionary search help and do the same.

Only problem would be to have the value of first field in dictionary serach help. For that you can use export statement to export the value of first field to a memory id and finally import the same in search help.

EXPORT l_bukrs FROM lv_bukrs TO MEMORY ID 'Z3AF_BUKRS'. < lv_bukrs have value of first field.>

Import in Search help and write the rest logic.

IMPORT l_bukrs TO ls_bukrs FROM MEMORY ID 'Z3AF_BUKRS'.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You can use a Data Dictionary Search help for this, but you don't have to use the EXPORT commands. The Web Dynpro ABAP framework will automatically do this work for you. You just need to make sure that both fields are bound to the same context node, that this context node uses a data dictionary structure or table as its source and that these fields are linked via DDic Search Help in this structure. No need to recreate the search help in OVS if you follow these rules. Here is the online help that talks about this:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/9f724642314aabe10000000a42189b/frameset.htm

If an input help structure is stored in a field in the ABAP Dictionary, and if you want to use the field mapping of search help parameters stored in the ABAP Dictionary as the field name for the structure for your Web Dynpro input help, then map your context nodes to this structure. This ensures that all components of the structure are available dynamically at runtime as attributes of the node.

If the context node is not mapped to the structure, the data element's input help can be used if there is one.

Former Member
0 Kudos

u cn use component usage for OVS regarding this

Former Member
0 Kudos

hi,

U can use the OVS search help for that. In the OVS search help u can get the value of the PO Item and based on that can search that.

Refer this link for OVS search help.

http://help.sap.com/erp2005_ehp_04/helpdata/EN/47/9ef8c99b5e3c5ce10000000a421937/frameset.htm

Regards,

Pankaj Aggarwal

Former Member
0 Kudos

Hi,

Can you give me a simple code sample or steps to go about it.

or is there any demo component that i can refer to?

Thanks,

Ajay

Former Member
0 Kudos

hi ,

u can refer the standard component, DEMO_VALUE_HELP

Former Member
0 Kudos

Hi,

For Ex:

uSing the Get attribute you got the PO into lv_po_num.

Now,

Create a OVS as component usage as mentioned in above links.

Create a method for OVS.

For PO item, at context attribute level give the Help mode

as OVS and then the OVS method name.

Now,

In the OVS, In the phase 2

select * from ebap into lt_ebap where ebeln = lv_po_num.
      LOOP AT lt_ebap INTO ls_ebap.
        ls_search_input-ebelp = ls_ebap-ebelp.
        APPEND ls_search_input TO lt_select_list.
      ENDLOOP.
ovs_callback_object->set_output_table( output = lt_select_list ).

Regards,

Lekha.

Edited by: Lekha on Oct 7, 2009 2:42 PM

Former Member
0 Kudos

Hi,

U can refer this thread also, check the ans given by Abhimanyu .