cancel
Showing results for 
Search instead for 
Did you mean: 

get action or method

Former Member
0 Kudos

Hi,

i got a View AENDERN and in this View i empbeddet a ContainerUIElement within the View AENDERN_FORMULAR.

In the View AENDERN_FORMULAR there is a Button called Save.

And now i want to trigger the Button called Save out of the view AENDERN

can someone please help here?

Regards

TKübler

Accepted Solutions (1)

Accepted Solutions (1)

amy_king
Active Contributor
0 Kudos

Hi Tobias,

If you've organized your Web Dynpro Component so that each view delegates its work to either the componentcontroller or to the assistance class, any view can call the method behind the save button by invoking either the componentcontroller method or the assistance class method.

E.g., view AENDERN_FORMULAR will have an event handler for the save button's action but can delegate the work of saving to the componentcontroller or assistance class:

method onactionsave .
  wd_comp_controller->save( ).
endmethod.

and the view AENDERN may also call the save method from any of its methods

method do_save .
  wd_comp_controller->save( ).
endmethod.

Cheers,
Amy

Former Member
0 Kudos

Thanks 4 the quick help.

but i think my main problem is more complicated.

Because of your tip i moved my methods from my view to my componentcontroller. So i was abel to start my methods in any view.

In my View ANDERN I implemented an ALV Table with this code

  DATA:

    lr_salv_wd_table_usage TYPE REF TO if_wd_component_usage,

    lr_salv_wd_table       TYPE REF TO iwci_salv_wd_table,

    lr_table_settings      TYPE REF TO if_salv_wd_table_settings,

    lr_column_settings     TYPE REF TO if_salv_wd_column_settings,

    lr_column              TYPE REF TO cl_salv_wd_column,

    lr_model               TYPE REF TO cl_salv_wd_config_table.

* create an instance of ALV component

  lr_salv_wd_table_usage = wd_this->wd_cpuse_alv_ZABSOLVENTEN( ).

  IF lr_salv_wd_table_usage->has_active_component( ) IS INITIAL.

    lr_salv_wd_table_usage->create_component( ).

  ENDIF.

In my View AENDERN_FORMULAR i view one dataline of my alv table.

and there i am able to change data and press the save button.

No i can trigger the save button, but if i try to refresh my alv-Table i had a problem whith the active component. (Bold line of code)

How can i refresh my alv data-Table ?

Regards Tobias Kübler

Answers (4)

Answers (4)

Former Member
0 Kudos

Ok now i was finaly abel to refresh the alv table in NW 7.01 wow.

i had to totaly change my content node and view organisation. but now it works...i am HAPPY YEYH

THanky for your Help

Regrads TKübler

former_member185241
Active Participant
0 Kudos

Hey Tobias,

You will have to use Component Usage" then using wizard you can call the methods from component Usage.

Thanks

Abhishek

former_member199125
Active Contributor
0 Kudos

When you are reusing the ther compoent, you will be able to see the interface controller.. from that you can generate the event handler methods for used contrller.... like ovs event from wdr_ovs

Regards

Srinivas

Former Member
0 Kudos

Hi Tobias,

In window you might have embeded the view AENDERN. Then under that the name of view container ui element is shown. You just drag and drop view AENDERN_FORMULAR  under view container ui element.After pressing button SAVE where actually you want to navigate that view you drag and drop in window at the same level of  view AENDERN not under view container ui element. And just create inbound and outbound plugs as you want for navigation and in window map that  and  don't think about the level of views.

In action event method  you fire that out bound plug of view AENDERN_FORMULAR .

Thanks

Santosh