cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding multi select in tables

former_member585865
Contributor
0 Kudos

Hi All,

i have an issue that, how i can save multiple records from a table to database, there are many records in table even in layout i have changed the table to multi select options still only one record is saving on database how i can overcome these problem?

Accepted Solutions (1)

Accepted Solutions (1)

former_member182190
Active Participant
0 Kudos

Hi ,

You can do it on the lines of this code

data: lo_selected type ref to if_wd_context_node,

lt_selected type WDR_CONTEXT_ELEMENT_SET,

ls_selected type ref to IF_WD_CONTEXT_ELEMENT,

.

.

  • fetch all the selected entries from the context.

.

lo_selected = wd_context->get_child_node( 'NODE' ).

lt_selected = lo_selected->GET_SELECTED_ELEMENTS( ).

loop at lt_selected INTO ls_selected.

ls_selected->GET_STATIC_ATTRIBUTES(

IMPORTING

STATIC_ATTRIBUTES = ls_final structure).

append ls_final structure to final_table.

ENDLOOP.

ls_final_strucutre is type of ur context node and Final_Table is the final table that

must hold the data.

Hope this solves ur problem.

Regards,

Ismail.

former_member585865
Contributor
0 Kudos

Hi Ismail,

Thanks for your valuable answer could you please say how i can get the value in next screen say for example if i login with the user name the user name should come in the next screen text box how i can achieve this?

Former Member
0 Kudos

hi suresh.......

you should create an attribute in the component controller....

then go to view a and drag that node and place it in the view context.

bind the attribute inside that node to an input field.

now go to view b and drag and drop from the component controller to the view context.

now use the same atribute in some text field.

so whatever value is given in the input field of view a will be passed to the component controller which inturn is reflected in view b.

check this tutorial:

[link|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cfb80249-0801-0010-3eaa-829afeac170f ]

---regards,

alex b justin

Answers (1)

Answers (1)

Former Member
0 Kudos

hi suresh.......

first read all the values that have been selected....

every time you read it, load it into the database.

---regards,

alex b justin

former_member585865
Contributor
0 Kudos

Hi Alex,

Thanks for your quick response i understood your concept but how could i read the selected values, could you provide me any sample code regarding this issue since am new to web dynpro could you ellaborate me in detail.