cancel
Showing results for 
Search instead for 
Did you mean: 

How to Add F4 help to an attribute of the search screen

Former Member
0 Kudos

Hi.. Friends,

I want to create a F4 help to the Search screen attribute, as of my idea it is not possible in get_p method of an attribute so...

please let me know the steps as well as code to create the same....

In BT111s_OPPT component , Search View -> product category ID.

Regards

Srujana

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Gokul , Srujana and All,

My requirement is same but this time result entires come from genric ztable. i am planning to fetch all entries based on my field and display in f4 help.

But dont know how to do it GET_DQUERY_DEFINITIONS

.

Please help.

Thanks,

Raj

Former Member
0 Kudos

Hi Rajan,

please check the following code.

CALL METHOD super->get_dquery_definitions

RECEIVING

rt_result = rt_result.

FIELD-SYMBOLS <ls_result> LIKE LINE OF rt_result.

READ TABLE rt_result ASSIGNING <ls_result> WITH KEY field = 'MODEL'.

IF sy-subrc = 0.

<ls_result>-help_id-help_id = 'ZSH_MODEL'. “se11 search help

<ls_result>-input_mapping-context_attr = 'MODEL'. "field

<ls_result>-input_mapping-f4_attr = 'MODEL'.

<ls_result>-output_mapping-context_attr = 'MODEL'.

<ls_result>-output_mapping-f4_attr = 'MODEL'.

ENDIF.

As you want to filter F4 entries based on some condition. you can use search help exit.

Hope this will meet your requirement.

regards,

Pramod Kumar Mandal

durga_prasad25
Participant
0 Kudos

Hi Srujana,

You can check this link this will helpfull for you ......

same way you can create f4 help as well

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0431452-dfc0-2e10-c296-ce8047291...

Best Regards,

Durga Prasad

Former Member
0 Kudos

Hi Srujana,

You can create a 'Z' Search Component for F4 and integrate it with your search view. This way also you can provide F4. Find below the steps involved in

1. Create you Z search Component(Your Z component shoul have search fields view and result view)

2. Integrate this Z component into your standard component(using Interface Controller)

3. Create navigation link between standard component & Z component

4. On action of F4 in your standard component where you wanted to give F4, create an event handler.

5. In event handler, Fire the outbound plug(navigation link created for Z component and Standard Component). This will take you to Z Search view

Let me know if you have any questions

Thanks & Regards

Gokul Ragunathan

Former Member
0 Kudos

Hi Srujana,

Value Help for an Advanced Search

For the advanced search, you do not have to create a value help getter. Instead, you must

redefine method GET_DQUERY_DEFINITIONS in the implementation class of the view

controller. Table RT_RESULT can be filled in with information relating to the value help.

For example, see structure CRMS_THTMLB_SEARCH_FIELD_INFO and attributes

HELP_ID, INPUT_MAPPING, and OUTPUT_MAPPING in the following code:

Syntax

method GET_DQUERY_DEFINITIONS.

data:

ls_ddlb type CRMS_THTMLB_SEARCH_DDLB_NVP.

field-symbols: <rt_result> type CRMS_THTMLB_SEARCH_FIELD_INFO.

CALL METHOD SUPER->GET_DQUERY_DEFINITIONS

RECEIVING

RT_RESULT = rt_result.

* F4-help for field 'ORDER_NUMBER

read table rt_result with key field = 'ORDER_NUMBER' assigning

<rt_result>.

if sy-subrc = 0.

<rt_result>-help_id-help_id = 'CRM_ORDER_BY_OBJECT_ID'.

<rt_result>-input_mapping-CONTEXT_ATTR = 'ORDER_NUMBER'.

<rt_result>-input_mapping-F4_ATTR = 'OBJECT_ID'.

<rt_result>-output_mapping-CONTEXT_ATTR = 'ORDER_NUMBER'.

<rt_result>-output_mapping-F4_ATTR = 'OBJECT_ID'.

endif.

endmethod.

regards,

vishwanatha