cancel
Showing results for 
Search instead for 
Did you mean: 

How to create context node dynamically from structure

Former Member
0 Kudos

Hi EveryOne

How to create context node dynamically from structure.

Regards,

satya

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Satya,

Try to use method CREATE_NODEINFO_FROM_STRUCT.

Please refer below link

http://help.sap.com/saphelp_nw70ehp1/Helpdata/EN/af/cb744176cb127de10000000a155106/frameset.htm

http://www.cnblogs.com/mysap/archive/2010/09/03/1816765.html

Using ALV with a Dynamic Context Node in Web Dynpro for ABAP

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/4c70444a-0801-0010-7688-9e4bd844b...

dynamic layout manipulation in WD ABAP - http://wiki.sdn.sap.com/wiki/display/WDABAP/dynamiclayoutmanipulationinWD+ABAP

Let me know if you have any problem

Thanks,

Prashant

venkat_ratnam3
Explorer
0 Kudos

Great Discussion Guys its Very Helpful

jayanthi_jayaraman
Active Contributor
0 Kudos

HI,

Check this article. Here I am explaining, how to create dynamic table.

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/10c837ab-d4c4-2d10-fca0-a1b6c09bcc18

Former Member
0 Kudos

Hi,

i think chinnaiya pandi has posted code snippet in your earlier post

[|]

data:
    lo_parent_node_info                type ref to if_wd_context_node_info,
    lo_child_node_info                 type ref to if_wd_context_node_info,
    lv_struct_name                     type string,
    lo_nd_gen_tab                      type ref to if_wd_context_node,
    lt_child_node_map                  type wdr_context_child_info_map.

  lo_parent_node_info = wd_context->get_node_info( ).


*  " get child node info
*
  lt_child_node_map = lo_parent_node_info->get_child_nodes( ).

  read table lt_child_node_map transporting no fields with table key name = `DYNAMIC_TBL`.

  if sy-subrc = 0.
    " REMOVE_CHILD_NODE
    lo_parent_node_info->remove_child_node( `DYNAMIC_TBL` ).
  endif.

 call method lo_parent_node_info->add_new_child_node
    exporting
*    supply_method                =
*    supply_object                =
*    dispose_method               =
*    dispose_object               =
      static_element_type          = lv_struct_name
      name                         = `DYNAMIC_TBL`
*    is_mandatory                 = ABAP_FALSE
*    is_mandatory_selection       = ABAP_FALSE
      is_multiple                  = abap_true
*    is_multiple_selection        = ABAP_TRUE
*    is_singleton                 = ABAP_FALSE
*    is_initialize_lead_selection = ABAP_TRUE
*    static_element_rtti          = lv_struct_name
      is_static                    = abap_false
*    attributes                   =
    receiving
      child_node_info              = lo_child_node_info.

Edited by: Baskaran Senthivel on Dec 15, 2010 11:08 AM