cancel
Showing results for 
Search instead for 
Did you mean: 

multi row selection in document search view in webui

Former Member
0 Kudos

hi,

I  have a requierement to add button of allselect, alldeselect and multi selection functionality into the table of component FICACMP_COR/FicaCorListAll.

for that i have added the code in method DO_INIT_CONTEXT of FICACMP_COR/FicaCorListAll.

  me->typed_context->FICACORRESPONDENCE->set_selection_mode(
     iv_selection_mode = cl_bsp_wd_context_node_tv=>selmode_multi ).



But it is not working

Accepted Solutions (1)

Accepted Solutions (1)

ashik_k2
Contributor
0 Kudos

Hello,

While debugging  what is the value of "FicaCorrespondence->SELECTION_MODE" in  FicaCorListAll.htm page ?

I think your values are being overwritten in CL_FICACMP__FICACORLIST_IMPL->DO_PREPARE_OUTPUT()

Regards,

Ashik

Former Member
0 Kudos

Yes you are right ...i have done above changes suggested by prabhanjan reddy g ...but still not working ....please ashik can you suggest

thanks in advance

ashik_k2
Contributor
0 Kudos

Hello,

In which method you have done the changes?

Regards,

Ashik

Former Member
0 Kudos

DO_INIT_CONTEXT

  me->typed_context->ficacorrespondence->set_selection_mode( cl_bsp_wd_context_node_tv=>selmode_multi ).

   IF me->typed_context->ficacorrespondence->collection_wrapper->if_bol_bo_col~multi_select NE      abap_true.

     me->typed_context->ficacorrespondence->collection_wrapper->if_bol_bo_col~set_multi_select( ).

   ENDIF.

   typed_context->ficacorrespondence->build_table( ).



Same code done in
DO_VIEW_INIT_ON_ACTIVATION

ashik_k2
Contributor
0 Kudos

Hello,


Like I explained CL_FICACMP__FICACORLIST_IMPL->DO_PREPARE_OUTPUT() will be called after

your DO_INIT_CONTEXT. So your changes will be overwritten to single mode in DO_PREPARE_OUTPUT method.


What you have to do?


1) Redined CL_FICACMP__FICACORLISALL_IMPL=>DO_PREPARE_OUTPUT() to include below code


    super->do_prepare_output().

     paste your  code from DO_INIT_CONTEXT.


OR


in FicaCorListAll.htm page


include below code


<%

me->typed_context->ficacorrespondence->set_selection_mode(cl_bsp_wd_context_node_tv=>selmode_multi ).

%>


before configTable tag.

Hope it helps,

Regards,

Ashik

Former Member
0 Kudos

Hi ashik,

Now i am able to see button but multi selection not working ...even single select not working...

i have added code only in DO_PREPARE_OUTPUT



    super->do_prepare_output( ).

   me->typed_context->ficacorrespondence->set_selection_mode( cl_bsp_wd_context_node_tv=>selmode_multi ).

   IF me->typed_context->ficacorrespondence->collection_wrapper->if_bol_bo_col~multi_select EQ      abap_true.

     me->typed_context->ficacorrespondence->collection_wrapper->if_bol_bo_col~set_multi_select( ).

   ENDIF.

   typed_context->ficacorrespondence->build_table( ).





ashik_k2
Contributor
0 Kudos

Remove the last line from htm page. that is not needed.

Additionally the syntax is wrong.

Former Member
0 Kudos

<%@page language="abap" %>
<%@extension name="chtmlb" prefix="chtmlb" %>
<%@extension name="thtmlb" prefix="thtmlb" %>

<chtmlb:configTable id                    = "FicaCorrespondenceTable"
                     actions               = "<%= controller->create_button( ). %>"
                     actionsMaxInRow       = "5"
                     selectedRowIndex      = "<%= FicaCorrespondence->SELECTED_INDEX %>"
                     selectedRowIndexTable = "<%= FicaCorrespondence->SELECTION_TAB %>"
                     selectionMode         = "<%= FicaCorrespondence->SELECTION_MODE %>"
                     iterator              = "<%= FicaCorrespondence %>"
                     onRowSelection        = "select"
                     downloadToExcel       = "<%= CL_CRM_IU_IC_APPL=>IS_TABLE_DOWNLOAD2EXCEL_ACTIVE( ) %>"
                     personalizable        = "<%= CL_CRM_IU_IC_APPL=>IS_TABLE_PERSONALIZABLE_ACTIVE( ) %>"
                     fillUpEmptyRows       = "FALSE"
                     usage                 = "SEARCHRESULT"
                     table                 = "//FicaCorrespondence/Table"
                     visibleRowCount       = "10" />



Last line removed



i am able to see button but one row coming selected at initial level ..i am able to select any other row ...

ashik_k2
Contributor
0 Kudos

Hello,

In standard could you let me know from which business role I can navigate to this view? Let me try.

Regards,

Ashik

Former Member
0 Kudos

Hi

its Z but i think it is

Former Member
0 Kudos

collection specialist enter account id then click on invoice

ashik_k2
Contributor
0 Kudos

You can debug "build_table" method which will be called in do_prepare_output to see why the first line is selected.

Regards,

Ashik

Former Member
0 Kudos

Hi Ashik,

Debugged the method come to know that do_prepare_output triggered two times...first time it is populating correctly but second time it is not working returning only one selected record.

Former Member
0 Kudos

SOLVED THANKS TO ALL

Answers (4)

Answers (4)

merveguel
Participant
0 Kudos

Actually, it not a strange request since anyone can see it on any website. My customer's need is to use such a multiple selection feature on a field on Web UI. But according to SAP, multiple selectable search helps are not supported. So I decided to crate an assignment block and use checkboxes to achieve this requirement.

Regards,

Merve

merveguel
Participant
0 Kudos

Hello,

I came across with the same problem. I have been trying to use your solution but it didnt work for my situation. I have to be able to use multiple selection for search help in Request For Change. The component is SRQM_RFC_H and I enhanced DO_INIT_CONTEXT method to use your code sample. But under the typed_context I can find my Context Node which is BTADMINH, but under the Context Node there is not any set_selection_mode method. Is there any other solution that I can use?


I appreciate your prompt reply.


Regards,


Merve

Former Member
0 Kudos

Hi

We use set selection mode method for make view result list multi select . I believe u try to make multiselect a field search help in header.

merveguel
Participant
0 Kudos

Hello Acar,

Sorry for delay. Exactly like you said, I want to make a multiselectable search help for a field. Do you have any suggestion how can I do this?

Regards,

Merve

ashik_k2
Contributor
0 Kudos

Hello Merve,

Multi select for search help of a single field? looks strange requirement for me.

Regards,

Ashik

Former Member
0 Kudos

Hello Merve

Could you please give me more information about your requirement. What you want is not make sense at all. Check create_decision_popup can help you.

Former Member
0 Kudos

Hi shilpi

Can you pls explain how did u solve ur problem ?


I enchanced componenet and made it multiselect but when ı go order with   object_id and return with back button to my multiselect componenet , it acts like a single selection.

Any help will be awesome .

Former Member
0 Kudos

use "MULTISELECT" in Do_init method.

Former Member
0 Kudos

i want this button

prabhanjan_reddy
Participant
0 Kudos

Hi Agarwal,

Please find the below sample code

me->typed_context->contextnode->set_selection_mode( cl_bsp_wd_context_node_tv=>selmode_multi ).

    IF me->typed_context->contextnode->collection_wrapper->if_bol_bo_col~multi_select NE      ABAP_TRUE.

      me->typed_context->contextnode->collection_wrapper->if_bol_bo_col~set_multi_select( ).

    ENDIF.

typed_context->contextnode->build_table( ).

In the contextnode pass your contextnode which you are referring.

Thanks,

prabhanjan reddy g