cancel
Showing results for 
Search instead for 
Did you mean: 

Lead Selection Problem?

Former Member
0 Kudos

Hi all,

In my application i am using Table and displaying some records, i am displaying with lead selection.

In this table sected records i am copying to another table.

Here problem is, i am using lead selection at node level so first record is selected automatically, and i select some more records and do copy. Here problem is Lead selection record is not copying another records which i manually selected records are

copying??? Why it happens any ideas?

Thanks,

Venkat.

Accepted Solutions (0)

Answers (1)

Answers (1)

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

have you checked with the table properties? i assume that we can choose the table property as multilead rather tab singlelead.

we can you a method cl_* for table relate class to get the records which you have selected

Former Member
0 Kudos

Hi,

Multiple selection is working, my question is default lead selction selected row is not copying.

And in my table Select all also not working. For example assume my table has no elad selection. if i select select all in table( default option ) and i am trying to copy giving error access null object. If i select first record manually and i use default select all function now it is working copying all records.. I am not getting whats the problem?

Any suggestions pelase?

Thanks,

Venkat.

Former Member
0 Kudos

What is SelectionMode set to? can you paste the code for copying the records...how are you doing that...whcih method you are using...

For copying....GET_SELECTED_ELEMENTS of if_wd_context_node method can be used..where there is a option to copy the lead selection please try to use it.

Former Member
0 Kudos

Hi Lekha,

Thanks for your reply.

I am using Multi selection mode.. my cardinality is 0-n and 0-n.

my code..

* navigate from <CONTEXT> to <IT_LIPS> via lead selection
      lo_nd_it_lips = wd_context->path_get_node( path = `ZRETURN_DEL_CHANGE.CHANGING_3.IT_LIPS` ).

      CALL METHOD lo_nd_it_lips->get_selected_elements
        RECEIVING
          set = lt_temp.

      DATA lo_nd_pack_mat TYPE REF TO if_wd_context_node.
      DATA lo_el_pack_mat TYPE REF TO if_wd_context_element.
      DATA ls_pack_mat TYPE wd_this->Element_pack_mat.
      DATA lt_pack_mat TYPE wd_this->Elements_pack_mat.

* navigate from <CONTEXT> to <PACK_MAT> via lead selection
      lo_nd_pack_mat = wd_context->get_child_node( name = wd_this->wdctx_pack_mat ).

      lo_nd_pack_mat->get_static_attributes_table( importing table = lt_pack_mat ).

      LOOP AT lt_temp INTO wa_temp.
        CALL METHOD wa_temp->get_static_attributes
          IMPORTING
            static_attributes = ls_it_lips.
              ls_pack_mat-vbeln = ls_it_lips-vbeln.
              ls_pack_mat-material = ls_it_lips-matnr.
              ls_pack_mat-plant = ls_it_lips-werks.
              ls_pack_mat-item = ls_it_lips-posnr.
              append ls_pack_mat to lt_pack_mat.
endloop.

And i explained my SELECT_ALL problem also pelase check in my previous post.

thanks,

Venkat

Former Member
0 Kudos
CALL METHOD lo_nd_it_lips->get_selected_elements
        RECEIVING
          set = lt_temp.

You need to pass the INCLUDING LEAD SELECTION parameter as abap_true for this method..Please try to use that..you will also get the lead selected for..

Former Member
0 Kudos

Hi leka,

Thanks.

I am not getting where i ahve to pass abap_true. can you give me any example?

thanks,

Venkat.

Former Member
0 Kudos

In the GET_SELECTED_ELEMENTS there is a another parameter for lead selection Please use it