Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Modify database table

Hi all,

Pls give me advise. i'm just working on and new to WebDynpro. i want to modify the database table which allows user to change or insert the value from UI screen.

In case the program allows user to select the multiple lines on the table by tick on the check boxes in front of the line then the program will store the check box value on the table. The table contains one more field which data type is 1 character. I want the program to store 'X' value on this field.

On Layout tab, I've binded the element with selected table which let the first field as a check box. And i provide a button for receiving the parameters from user. Pls advise me on this.

Thanks for your effort.

replied

check this code...

data:
      node_sflight           type ref to if_wd_context_node,
      elem_sflight           type ref to if_wd_context_element,
      lt_elements            type WDR_CONTEXT_ELEMENT_SET,
      stru_sflight           type if_main=>element_sflight_node,
      it_flights             type if_main=>elements_sflight_node.

*   navigate from <CONTEXT> to <SFLIGHT_NODE> via lead selection
    node_sflight_node = wd_context->get_child_node( name = if_main=>wdctx_sflight_node ).

*   get element via lead selection
*    elem_sflight_node = node_sflight_node->get_element(  ).
     lt_elements = node_sflight->get_elements( ). 
     
*   get all declared attributes
    loop at lt_elements into elem_sflight.
    elem_sflight->get_static_attributes(
      importing
        static_attributes = stru_sflight ).
        
    append stru_sflight to it_flights.
    endloop.
    
    modify ZSFLIGHT99 from table it_flights.
    if sy-subrc eq 0.
    
    endif.

thanks,

suman

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question