cancel
Showing results for 
Search instead for 
Did you mean: 

Edit/view mode of application

Former Member
0 Kudos

Hello, everyone!

I'm new to web-dynpro programming.

I've used Enhancement Framework to add Dropdown Box to the view V_DO_APV_OVERALL of /SAPSRM/WDC_DO_APV_EXT.

It works fine but one problem: my field is always active.

I going to change the activity of my field in the method WDDOMODIFYVIEW.

How can i get the mode of the application("edit" or "view") ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can check the ENABLE property of other UI elements. It must be bound to some attribute of the context. May be you can try binding the Enable property of your drop down to the same attribute.

Former Member
0 Kudos

Thanks for advice!

I have tryed this. The problem is there is no element on view witch changes it's "enabled" property. There are some embedded views witch has such elements, but they use own context nodes/attributes.

Any other suggestions?

Former Member
0 Kudos

Hi,

In that case you can create a node for properties like Enable / Read Only at component controller and define its mapping to all the embedded view.
And change the value of mapped attribute on best suited action.


Or if those embedded views are from from different component than Use component Usage for making property node available all over.

former_member211591
Contributor
0 Kudos

Hi Matushkin,

you can use the mentioned embedded view to change your uielements property.

If the embedded views are views of the same component, you can do this:

1. Enhance component-controller by event "set_edit_mode_evnt" with parameter "is_edit_mode".

2. Enhance component-controller by method "set_edit_mode_mth" with parameter "is_edit_mode". This method fires event set_edit_mode_evnt" delegating the parameter.

3. Enhance and implement eventhandler "set_edit_hndl" in view V_DO_APV_OVERALL for event set_edit_mode_evnt of the comp.-ctrl. Set the property of your uielement according to the parameter in here.

4. Go to your embedded view. Find action which changes the edit/view mode there. Enhance this action as post-exit and trigger function set_edit_mode_mth of comp.-ctrl (with enabled-value of an attribute in its context as parameter.).

Thus this action in the embedded view triggers eventhandler in view V_DO_APV_OVERALL via comp-ctrl.

BR

ismail

Former Member
0 Kudos

Hi, Izmail.

It looks like right answer. I can't check it right now, but i will try later. Thank you for your help!

Answers (1)

Answers (1)

former_member211591
Contributor
0 Kudos

Hi Matushkin,

I wrote a document related to this:

http://scn.sap.com/docs/DOC-30622

BR