Skip to Content
author's profile photo Former Member
Former Member

Trigger new search from result list view

Hello everybody,

at the moment I have to realize a quite tricky requirement in our SAP CRM system:

Per default only ten result datasets are displayed in a search result table. To request the complete result list, a button shall be placed above the result table in the result view. When clicking this button, the a new search shall be triggered without any result hits limitation.

The problem is that the event handler which triggers the search is located in the search view (viewset structure with search parameters view and separat view with search results, like in standard search components).

My question:

Is there an elegant way to trigger an event handler in another view (within the same component)?

Would be great if somebody could give me a hint how to solve this.

Thanks a lot and have a nice day everybody!

Markus

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 05, 2012 at 07:40 AM

    Hi Markus,

    Below is the way I tried:

    DATA: lr_parent TYPE REF TO cl_bsp_controller2,
    lr_search TYPE REF TO zl_zsample__flightef_impl.

    FIELD-SYMBOLS: <fs_subcontroller> TYPE lbsp_controller_item.


    * get viewset controller
    lr_parent ?= m_parent.

    * get search view controller
    READ TABLE lr_parent->m_subcontrollers ASSIGNING <fs_subcontroller>
    WITH KEY component_id = 'v14'.

    lr_search ?= <fs_subcontroller>-instance.

    * trigger search event
    lr_search->eh_onsearch( ).

    Put these in the result event. but don't know how you define the default row in the first step search. this is just the way to trigger an event in another view.

    Regards,

    Eric

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 05, 2012 at 07:12 AM

    HI Markus ,

    You can change the no of default rows to be displayed in the configuration(bsp_wd_cmpwb->configuration of the view) of the table view by changing the default no of rows in the result view.

    Regards

    Kavindra

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 05, 2012 at 07:46 AM

    Hi Markus,

    You can change the default value at run time using field visiblerowcount in configtable tag as shown below.

    <chtmlb:configTable xml = "<%= lv_xml %>"

    .....................................

    ........................................
    visibleRowCount = "<%= lv_visiblerows %>"
    ...........................

    ................................................/>

    The value in lv_visiblerows should be dependent upon your requirement . I think you requirement is to dispaly all records in single list , if this is the case then you can fill the lv_visiblerows as

    lv_visiblerows = me->typed_context->result(use your result context nope)->collection_wrapper->size( ).

    Regards,

    Nithish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 05, 2012 at 08:23 AM

    Helly everybody!


    my questions is answered. Thanks everybody for your help! 😊

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.