cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic structure in WEDDYNPRO

Former Member
0 Kudos

Dear All,

Can anyone let me know how to create runtime dynamic structure in webdynpro.

Regards

Katrice

Accepted Solutions (1)

Accepted Solutions (1)

amy_king
Active Contributor
0 Kudos

Hi Katrice,

Here is some documentation from SAP on Dynamic Programming in WDA. If this doesn't answer your question, could you please provide more detail on what you'd like to do with dynamic programming?

Cheers,

Amy

Former Member
0 Kudos

Amy i have two fileds named COST CENTER & PROFIT CENTER with 9 rows in the table & i need to populate that table at runtime by creating dynamic structure related to it.....

Katrice

amy_king
Active Contributor
0 Kudos

Hi Katrice,

If I understand correctly, you have a table UI element with two fields, cost_center and profit_center, and you want to populate the table.

Have you defined a 0..n or 1..n context node with attributes cost_center and profit_center and bound your table to the context node? If you have done this, you don't need dynamic programming; you can populate the table by writing a supply function for the context node. The supply function will be called automatically by the WDA runtime when the node is initialized and your table will be populated.

For example:

method supply_mynode .

  data ls_mynode type wd_this->element_mynode.
  data lt_mynode type wd_this->elements_mynode.

  do 9 times.
     ls_mynode-cost_center   = the_value.
     ls_mynode-profit_center = the_value.
     append ls_mynode to lt_mynode.
  enddo.

  node->bind_table(
    new_items            = lt_mynode
    set_initial_elements = abap_true ).

endmethod.

Cheers,

Amy

Former Member
0 Kudos

Thanks  Amy

amy_king
Active Contributor
0 Kudos

Glad to be of help Katrice. Please reward points if this answered your question.

Cheers,

Amy

Answers (0)