Skip to Content

create a button in search view of the search result page created by Wizard create search page

We need to add a button 'New'just after the search and clear in the search page of search page creation. Our problem is that once we create search page we dont get html generated for the component.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Nov 11, 2014 at 09:18 AM

    Hi Peeyush,

    Here is one way by which you can attain this. But I am not sure whether this is a recommended way. Also, you will have to check whether there are any other effects.

    1: Create a BSP application and view.

    2: Take the code of bsp application WCF_BSP_SP view SearchQuery_2.htm and paste it in this view. Set the parameters also same as the standard view. Add your button as follows.

    3: Now go to SE24 and copy class CL_WCF_BSP_BASE_SQ_2 to ZCL_WCF_BSP_BASE_SQ_2.

    4: Go to attribute of the newly created class and rename the attribute GC_SEARCH_QUERY_LAYOUT.

    5: Now go back to our custom bsp application view and rename the controller class to ZCL_WCF_BSP_BASE_SQ_2.

    6: Now you have your button ready.

    Create an event handler for this button and write your code there.

    Note: Again, this is a work around solution. Check whether any of the existing functionalities are affected by this. I believe it shouldn't afftect any though.

    Thanks,

    Faisal


    Test.PNG (7.0 kB)
    buttons.PNG (14.2 kB)
    Attribute.PNG (8.1 kB)
    Test search.PNG (6.1 kB)
    Add comment
    10|10000 characters needed characters exceeded

  • Nov 11, 2014 at 07:18 AM

    Hi Peeyush,

    I doubt it's not possible to do so as the common html code SearchQuery_2.htm of bsp application WCF_BSP_SP gets triggered for all search pages created through wizard. And changing this page will affect all applications.

    Thanks,

    Faisal

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 11, 2014 at 06:18 AM

    Hi,

    You have to put the code in View set of the search and result.

    Regards,

    Deepika.

    Add comment
    10|10000 characters needed characters exceeded