Skip to Content
0
Nov 07, 2007 at 06:12 AM

Regarding ooabap statements

15 Views

METHOD onactionshow .

DATA:

  • Node Info

rootnode_info TYPE REF TO if_wd_context_node_info,

  • Context Nodes

dyn_node TYPE REF TO if_wd_context_node,

tabname_node TYPE REF TO if_wd_context_node,

  • String (for table name)

tablename TYPE string.

  • get node info of context root node

rootnode_info = wd_context->get_node_info( ).

  • Get the name of the table to be created

tabname_node = wd_context->get_child_node( name = 'INPUT' ).

tabname_node->get_attribute( EXPORTING name = 'TABLENAME'

IMPORTING value = tablename ).

TRANSLATE tablename TO UPPER CASE.

  • create sub node named TEST1 of structure (tablename)

<b>cl_wd_dynamic_tool=>create_nodeinfo_from_struct(

parent_info = rootnode_info

node_name = tablename

structure_name = tablename

is_multiple = abap_true ).</b>

<b>DATA: stru_tab TYPE REF TO data.

FIELD-SYMBOLS:

<tab> TYPE table.</b>

  • create internal table

<b>CREATE DATA stru_tab TYPE TABLE OF (tablename).</b>

<b>ASSIGN stru_tab->* TO <tab>.</b>

  • Get table content

<b>SELECT * FROM (tablename) INTO CORRESPONDING FIELDS OF TABLE <tab>.</b>

  • get instance of new node

dyn_node = wd_context->get_child_node( name = tablename ).

  • Bind internal table to context node.

dyn_node->bind_table( <tab> ).

Please explain me the above statements which are in bold.

if u feel anything more to explain please tell me.

I am facing a lot of problem in undrestsnding those.

points will be rewarded immediately

with Regards,

lokesh@EDS