0% found this document useful (0 votes)
27 views

Data Type Ref To Data Type Ref To Data Type

The document discusses various table operations in WebDynpro including: 1. Navigating from a context node to a table node and getting the table element. 2. Getting all declared attributes of a table using the GET_STATIC_ATTRIBUTES method. 3. Capturing selected records from a node using GET_ELEMENT and specifying the index. 4. Removing a selected element or record from a node or table using the remove_element method. 5. Updating a database record by capturing the user entries using GET_STATIC_ATTRIBUTES and writing an update statement.

Uploaded by

raju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Data Type Ref To Data Type Ref To Data Type

The document discusses various table operations in WebDynpro including: 1. Navigating from a context node to a table node and getting the table element. 2. Getting all declared attributes of a table using the GET_STATIC_ATTRIBUTES method. 3. Capturing selected records from a node using GET_ELEMENT and specifying the index. 4. Removing a selected element or record from a node or table using the remove_element method. 5. Updating a database record by capturing the user entries using GET_STATIC_ATTRIBUTES and writing an update statement.

Uploaded by

raju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Table Operations

DATA LO_ND_TABLE TYPE REF TO IF_WD_CONTEXT_NODE.


DATA LO_EL_TABLE TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_TABLE TYPE WD_THIS->ELEMENT_TABLE.
*

navigate from <CONTEXT> to <TABLE> via lead selection


LO_ND_TABLE = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_TABLE ).

*
*
*

@TODO handle non existant child


IF lo_nd_table IS INITIAL.
ENDIF.

get element via lead selection


LO_EL_TABLE = LO_ND_TABLE->GET_ELEMENT( ).
alternative access via index
lo_el_table = lo_nd_table->get_element( index = 1 ).
@TODO handle not set lead selection
IF LO_EL_TABLE IS INITIAL.
ENDIF.

*
*
*

get all declared attributes


LO_EL_TABLE->GET_STATIC_ATTRIBUTES(
IMPORTING
STATIC_ATTRIBUTES = LS_TABLE ).

how to get the data from database Table into our webdunpro table?
Ans.create a component with window & view
Create a Node with dictionary structure with cardinality 0-n(it holds n number of
values0)
create the table and bind the value property with node
create a button and provide some functionality to text & on action property
and create a method to get the data from data base records into our table
create application and test it.
How to bind the internal table records to node?
By Using the Bind_table method we can assign the internal table recors to Node.
What is the use of get_static_attributes method and set_static attributes?
get_static_attributes(Importing static_attributes = ls_itab).

the above statment will capture the selected records or data to Ls_itab by using
ls_itab.
Set_static_attributes (Importing Static_attributes = Ls_input)

how to capture the selected recod from node?


By using the statment LO_EL_TABLE = LO_ND_TABLE->GET_ELEMENT( ). we can
achieve the functionality
How to capture the selected record from node?
simply you have mentiond within brackets specify the INDEX Position like
get_element( index 8 ).
How to Remove the selected Element Or Record from a Node or Table?
we have a interface called IF_WD_CONTEXT_NODE and it has a method
remove_Element( )
lo_nd_itab->Remove_element( Lo_el_element ). this stmt will delete from Node
level.
How to remove a record from databse level?
Delete from kna1 where kunnr = ls_iatb-kunnr
the above stament will delete the record form databse table.
How to update the record?
LO_EL_TABLE->GET_STATIC_ATTRIBUTES(
IMPORTING
STATIC_ATTRIBUTES = LS_TABLE ).

ls_table it captured the users entry by using this variable we can wrtie the update
logic
update kna1 set name = ls_itab-name
id = ls_itab-name
etc....

You might also like