cancel
Showing results for 
Search instead for 
Did you mean: 

Passing parameters in Dictionary Search Help

Former Member
0 Kudos

Hi,

I am using Dictionary search help for an input help. I have to make the search help according to the employee no of the employee who have log-in.

Now my que is, how can i pass the employee no from wd-abap screen to dictionary search help.

Regards,

Pankaj Aggarwal

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

I does not have to use OVS.

Please suggest how can i achieve that.

Thomas please any inputs.

Regards,

Pankaj

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You don't have to use OVS for this. You can pass parameters into the data dictionary based search help. The key is that all the parameters must be in the same context node and the context node must be based upon a data dictionary structure and that data dictionary structure must be mapped to the parameters of the search help.

From the online help:

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.

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

Former Member
0 Kudos

Hi Thomas,

Is there any example available in which some parameters are passed to the data dictionary based search help ? It would be very useful for me.

Thanks and Regards,

Sharath

Former Member
0 Kudos

Hi Sharath,

Yes there is a way to set values to importing parameters of dictionary search help.From your application use set parameter id to set the value of search help parameter.

Do the following in your search help.

1.Select IMP check box for the parameter,which you want to pass the value and in "Default Value" column give the parameter id.

Eg : If search help parameter is language give SPRAS in serach help paramter column and give parameter id SPR in the default value.

Now from your application set the value like below

SET PARAMETER ID 'SPR' FIELD sy-langu.

Now when you click F4 from the filed the default value will be displayed.

Former Member
0 Kudos

Hi,

Also chk dis link,

It mite b very helpful!!!

Regards,

Divya.S

Former Member
0 Kudos

Hi,

In this case ,u can use OVS.

Set the employee number in the Context attibute or assign the value under the attributes tab of the view.

Then In the event handler foe the Ovs,

CASE ovs_callback_object->phase_indicator.

WHEN if_wd_ovs=>co_phase_0. "configuration phase, may be omitted

  • in this phase you have the possibility to define the texts,

  • if you do not want to use the defaults (DDIC-texts)

ovs_callback_object->set_configuration(

window_title = lv_group_header

col_count = 3

row_count = lv_line ).

WHEN if_wd_ovs=>co_phase_2.

REFRESH : wd_this->lt_emp_ovs.

SORT lt_select_list_ovs BY emptype AS TEXT.

wd_this->lt_emp_ovs = lt_select_list_ovs.

ovs_callback_object->set_output_table( output =

lt_select_list_ovs ).

WHEN if_wd_ovs=>co_phase_3.

  • apply result

ASSIGN ovs_callback_object->selection->* TO <ls_selection>.

IF <ls_selection> IS ASSIGNED.

ovs_callback_object->context_element->set_attribute(

name = `EMP_NO`

value = <ls_selection>-pernr ).

  • set single attribute

lo_el_nd_emp_no->set_attribute(

EXPORTING

name = `EMP_NAME`

value = <ls_selection>-name ).

****

IF <ls_selection>-emptype = lv_direct.

ls_nd_create_ena-create = abap_true.

ELSE.

ls_nd_create_ena-create = abap_false.

ENDIF.

  • set all declared attributes

lo_el_nd_create_ena->set_static_attributes(

EXPORTING

static_attributes = ls_nd_create_ena ).

ENDIF.

ELSE.

lo_el_nd_emp_no->set_attribute(

EXPORTING

name = `EMP_NAME`

value = ' ' ).

ENDIF.

ENDCASE.

Regards,

Divya.S

Former Member
0 Kudos

Hi Pankaj,

I don't think it is possible this with dictionary search help and 'Click on value help' for dictionary help will not trigger any round trip(event).

You can use OVS value help for this scenario and refer below location on how to use OVS help.

[https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9502] [original link is broken] [original link is broken] [original link is broken];

Regards,

Manne.