on 03-05-2014 5:33 PM
I am new to FPM. We are running ESS.
I have enhanced a new Web Dynpro Component onto an Edit page of an OVP (as a Freestyle Component).
I want the new WDC to behave differently based on the mode I am in.
How, from within the new WDC, can I tell if I have entered the Edit page in Edit (pencil) or Display mode?
Thanks...
...Mike
Hello Mike,
Firstly, welcome to the wonderful world of FPM
Well, usually with FPM, you have an Edit (or Read-only) button in the top, underneath the title (Identification Region, IDR). This, being standard, has some standard FPM events behind it.
In your freestyle WD component, you implemented IF_FPM_BUILDING_BLOCK interface, and with it you have some additional methods in your COMPONENT CONTROLLER, such as FLUSH, PROCESS_EVENT, and so on...
In your PROCESS_EVENT method, you can basically catch all FPM events at application level. Usually you have a big CASE, something like:
case io_event->mv_event_id.
when ...
when 'FPM_EDIT'. "you can find some constants behind CL_FPM_EVENT=>GC... Right now I'm not sure how it's called exactly. But it's advised to use this constants!
...
You can write your code here in order to change the behavior, basically, you can do whatever.
also, it's the same with 'FPM_READ_ONLY'
when others.
return.
endcase.
I strongly recommend you download the latest version of FPM Cookbook, or the one that is suited with your SAP NW version.
Hope I made things a little more clear!
Tudor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Tudor.
Actually, I am already using Process_Event() and After_Failed_Event().
My question, I think, has more to do with the initial state I enter the form in.
Whether I go in in Change, or Display mode from the overview page, the event always seems to be FPM_CALL_DEFAULT_EDIT_PAGE (I'm looking in PROCESS_BEFORE_OUTPUT).
My question is how do I know if I am going as Edit or Display.
I've looked at IO_EVENT and its MO_EVENT_DATA ref, but the only thing I see changing is the title.
Thanks... ...Mike
Dear Mike,
In case you use NW >= 7.03: have a look at the following blog post.
Maybe the application that you are workig on, already uses this concept.
If you have NW < 7.03: The application might use its own URL parameter...
you might get it using the following coding:
lo_fpm = cl_fpm_factory=>get_instance( ).
IF lo_fpm->mo_app_parameter IS NOT INITIAL.
CLEAR lv_prtyid.
lo_fpm->mo_app_parameter->get_value(
EXPORTING iv_key = 'URL_PARAMETER'
IMPORTING ev_value = lv_param ).
ENDIF.
Regards, Uwe
Thanks to all for Input.
I think I found what I needed for this app.
...
lo_fpm->mo_app_parameter->get_value(
EXPORTING iv_key = 'READ_ONLY_PROFILE_WITH_DETAILS'
...
FPM_EDIT_MODE was set to 'R' in both write and display mode, but the READ_ONLY_PROFILE_WITH_DETAILS parameter toggles.
Thank you...
...Mike
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.