cancel
Showing results for 
Search instead for 
Did you mean: 

FPM OVP pop-up

Former Member
0 Kudos

Hi All

I´m trying to call a pop-up when click on radio-button.

I´m using FPM OVP. I have made a Dialog Box, but  do not know if this is correct.

When click on radio button in MOBILE Page, I need to launch a POP up .

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

J_R
Advisor
Advisor
0 Kudos

Hello Fernando,

it is correct to configure a Dialog Box in the OVP but this alone is not sufficient.

In order to trigger the dialog box when clicking on a radio-button of the radio-button group you have to assign an FPM event to the radio-button group in the configuration editor of the form (I guess you either use the FPM form that is based on component FPM_FORM_UIBB or the new FPM form that is based on component FPM_FORM_UIBB_GL2). There are two possibilities:

a) You assign an FPM event with the event ID FPM_OPEN_DIALOG (constant if_fpm_constants=>gc_event-open_dialog) and the page ID of your configured dialog box as event parameter DIALOG_BOX_ID (constant if_fpm_constants=>gc_dialog_box-id) to the radio-button group

b) You assign an application-specific event ID to the radio-button group and trigger the dialog box in your coding explicitly by using method IF_FPM->OPEN_DIALOG_BOX.

Kind regards,

Jens

Former Member
0 Kudos

I try to do what you said, but no success.

Can you explain me with more detail please ? 

Best Regards.

Thanks

Former Member
0 Kudos

Hi Jens,

I have the same issue that Fernando has. I've tried option "b" and this is the error message that I got:

          View Is Already Displayed in Window FPM_DIALOG_WINDOW of Component           FPM_DIALOG_COMPONENT

         

Do you know how to solve this?

could you be more specific about option "a"?

Thanks.

J_R
Advisor
Advisor
0 Kudos

Hi Fernando, Hi Guido,

ok, I will try to explain it in more detail. You have configured an OVP page that contains a form GUIBB. The form itself contains a Radiobutton Group (at least that's what I guess from the screenshot above). In order to open a dialog box when a Radiobutton of the Radiobutton Group is selected you have to assign an FPM event to the Radiobutton Group in the form configuration editor. The event ID of this FPM event should either be configured as:

(a) 'FPM_OPEN_DIALOG': In this case the form GUIBB automatically triggers an FPM event with that ID when a Radiobutton of the Radiobutton Group is selected. The event will be processed by the OVP floorplan and the UIBBs on the OVP page. When processing that event the OVP will automatically open a dialog box. However, in order to tell the OVP which one to open you have to - either configure an additional event parameter for the event FPM_DIALOG_BOX on the Radiobutton Group. This event parameter must have the name DIALOG_BOX_ID and its value must contain the name of the page ID that the OVP should open. This page ID is, according to your sctreenshot above, DIALOG_BOX,

- or you could add the event parameter dynamically at runtime in an Application Configuration Controller (AppCC) of the OVP.

(b) any other string value (which should not start with 'FPM'). This would be an application-specific event. It is triggered when a Radiobutton of the Radiobutton Group is selected. The event will be processed by the OVP floorplan and the UIBBs on the OVP page. Since it is an application-specific event the OVP does of course not know that you would like to open a dialog box. Hence, you have to tell the FPM runtime explicitly that a dialog box should be opened. This can be done by calling method IF_FPM->OPEN_DIALOG_BOX, passing the relevant page ID via importing parameter IV_DIALOG_BOX_ID.

If you receive an error message such as 'View Is Already Displayed in Window FPM_DIALOG_WINDOW of Component FPM_DIALOG_COMPONENT' you have most probably twice the same UIBB on the OVP page and on the dialog box to be opened. A screen must not contain a UIBB (specified by component, interface view, configuration ID, instance ID) more than once.

Best regards,

Jens

Former Member
0 Kudos

I don't know how to "configure an additional event parameter for the event FPM_DIALOG_BOX on the Radiobutton Group" neither how to "add the event parameter dynamically at runtime in an Application Configuration Controller (AppCC) of the OVP".

When I want to select an event for the radiobutton I have to choose between those 3 options and I'm not allowed to write the name of an event.

I would appreciate your help.

Thanks & regards.

J_R
Advisor
Advisor
0 Kudos

Hello Guido,

now I understand your problem. In the drop-down list for the event ID there is no event ID 'FPM_OPEN_DIALOG'. The reason is that the feeder class of your form configuration does not define such an action. This means that you have to change the coding of your feeder class and return an additional action FPM_OPEN_DIALOG in parameter ET_ACTION_DEFINITION of feeder method GET_DEFINITION. Then, you will be able to configure it in the FLUID.

If the feeder class a SAP-defined feeder class that you cannot change you still have the possibility to create a new feeder class that inherits from the original SAP feeder class and add the additional action there. Of course, in your form configuration you have to assign your new feeder class, then.

Best regards,

Jens

Former Member
0 Kudos

Hi Jens.

First of all, thanks so much for your help.

Triyng to resolve this issue, I have done the following.

I have make a enhancementent of FPM_FORM_UIBB and in method NEEDS_CONFIRMATION (post-exit) add this code:

  IF io_event->ms_source_uibb-config_id EQ 'ZHRESS_CC_PER_DTL_MOBILE_US'.

    CLEAR : lt_popup_text[], ls_popup_text.

    ls_popup_text = 'You have just changed selected Option.'.

    APPEND ls_popup_text TO lt_popup_text.

    CREATE OBJECT lo_instance

      EXPORTING

        it_confirmation_text = lt_popup_text.

       eo_confirmation_request = lo_instance.

  ENDIF.

So, now, the popup is displayed OK when user is on ZHRESS_CC_PER_DTL_MOBILE_US configuration.

But, what I´m missing is that I only need to display popup when user select Y and do not display when user select N (radiobutton).

I tried to use wd_assist->mt_changelog, a parameter that has the new value and old value for radiobutton group, but I cannot because its a private parameter, and so, I cannot create a condition.

Thanks.

Best Regards.

J_R
Advisor
Advisor
0 Kudos

Hi Fernando,

it was not clear to me that you want to create a "Needs Confirmation" popup. This is something different than a standard dialog box that can be configured in the floorplan configuration.

Ok, the problem is that you would like to open the popup depending on the selected Radiobutton. You cannot access wd_assist->mt_changelog since it is private (and it is correct that it is private). However, in method FLUSH of your feeder interface you can access not only the changelog (parameter IT_CHANGE_LOG) but also the field values of your form fields (parameter IS_DATA). In this way it should be easy to differentiate between the selected Radiobuttons.

Best regards,

Jens

0 Kudos

Hi, All!

"View Is Already Displayed in Window FPM_DIALOG_WINDOW of Component FPM_DIALOG_COMPONENT" - this error may occures when you use one feeder class for different UIBB of one type (FPM_FORM_UIBB for example) in the same FPM-application (in my case it was OVP).

J_R
Advisor
Advisor
0 Kudos

Hi Valeriy,

no, the error message doesn't have its root cause in a feeder class that is used more than once. It is possible and allowed to use a feeder class for several G(UIBB). No, the problem is that you have the same UIBB (specified by COMPONENT, INTERFACE_VIEW, CONFIG_ID, CONFIG_TYPE, CONFIG_VAR, INSTANCE_ID) more than once on the same screen.

Best regards,

Jens

0 Kudos

My experience says otherwise. I made configuration of OVP-application with several FPM_FORM_UIBB with the same feeder-class and I created dialog page (with different feeder-class). When I tried call dialog window I got this error until I created another feeder-class for the second FPM_FORM_UIBB in the main page.

J_R
Advisor
Advisor
0 Kudos

Maybe, your feeder class adds a UIBB dynamically to the screen... and if you use the feeder class twice you add the UIBB twice. But from an FPM perspective it is no problem to use the same feeder class for multiple GUIBBs.

0 Kudos

No, it dosn't. As I described - using the same feeder class has no problem until you will try call dialog window in an OVP-app. May be it depends on the version of NW, in my case - 7.30 SP09.

J_R
Advisor
Advisor
0 Kudos

Oh, that's indeed not the latest version... maybe that's the reason...?

Former Member
0 Kudos

Hi Jens,

I can understand to some extent what you are saying. I have a similar requirement of giving a popup based on an event. I need to pop up a dialog box which list out some values, currently I dont see that event FPM 'FPM_OPEN_DIALOG' so I plan to add that in the post exit of get definition. but can you help me here

1. How do we pass the dialog id, where do we pass the even id parameters, I dont see an option.

2. Should I build another configuration of FPM_FORM_UIBB for the dialog id?

3. The current feeder class doesnt bring the required data for my dialog so I need to build a new feeder if I am right.

4. I need some parameters from the parent GUIBB with which I need to query the required values in my dialog and display to the user, how do we pass the required values from parent to the dialog?

Thanks a ton if you could answer these questions.

J_R
Advisor
Advisor
0 Kudos

Hi,

it is not necessary that the event FPM_OPEN_DIALOG is defined by the feeder. It's enough to assign this event to the button with which you want to open a dialog box. However, you have to define the 'Target Page' in the attributes of the button (here, you have to enter the OVP Page ID of the desired dialog box), or you have to define an event parameter DIALOG_BOX_ID for the button that contains the OVP Page ID of the dialog box. When pressing the button in the running application the target page, i.e. the dialog box, is displayed. You can pass any data with the event, as you can with any other FPM event that you raise in your application.

On the dialog box you can have any UIBB, either an FPM GUIBB or a free-style UIBB. This has to be configured in the OVP configuration editor. Depending on which UIBBs you want to display on the dialog box it might be necessary to create new configurations and create feeder classes. But I cannot judge this because I don't know your scenario.

Best regards,

Jens

Former Member
0 Kudos

Hi Jens,

Thank you very much for your reply and giving some idea.

My scenario is like this

it is a leave request form in ESS. I have this FPM_FORM_UIBB embeded in the FPM_OVP_COMPONENT.

Now I have a check box in the FPM_FORM_UIBB when the user clicks on that checkbox I need to give a pop showing his overtimes in a tabular format.

The problem is the feeder for the FPM_FORM_UIBB configuration does not have the event open dialog, but the FPM_OVP_COMPONENT has.

My first question

Should I create this new pop up dialog as the configuration of FPM_FORM_UIBB with my own feeder class(actually I need to display a list like a table) or can I have a standalone classical web dynpro and call it as a dialog when I click on this checkbox which is there in the FPM_FORM_UIBB.

Now another challenge here is that I need the employee number and the dates which is there in the FPM_FORM_UIBB based on which I need to query the overtime before I open my dialog, is there a way to transport the data, should I use the singleton pattern?

I somehow feel this FPM framework is making things more difficult for the programmer. the things which should have been so simple is becoming so complicated.

Once again thanks for reading and for any help you can do.

J_R
Advisor
Advisor
0 Kudos

Hi Raghavendra,

if the feeder does not know the event FPM_OPEN_DIALOG you could add it to the action definition, provided it's your own feeder class. If the feeder class is not yours you could create an own feeder class that inherits from the original feeder class. You can redefine method GET_DEFINITION in your own feeder class. Your feeder class has of course to be assigned to the form configuration.

The dialog can also be opened from within the OVP itself if you want. In this case, you could simply assign any other event to your checkbox in the form and during processing this event, for example in the OVP Application Configuration Controller (AppCC) react on this event and raise the event FPM_OPEN_DIALOG programmatically.

An FPM event can have event parameters by which you can pass all kind of data around. So, when raising the checkbox event you could add the form data to that event and, depending on that form data, raise the FPM_OPEN_DIALOG event afterwards in the AppCC, or not.

I would recommend to configure the dialog box in the OVP, but you could of course also use your own free-style Web Dynpro component and do everything by yourself. This is of course much more work to do...

The things are not more complicated with the FPM if you have a basic understanding of the FPM concepts. To get this understanding, however, can be a kind of challenge since the FPM is extremely flexible and offers many many possibilities.

Best regards,

Jens

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Fernando,


i've the same requiremnt for adding a Radio Button Group with3 Radio buttons under it in FORM UIBB (FPM_FORM_UIBB) with 4 possible values..


I have added 3 custom fields for 3 Radio buttons in the structure with Dataelement of CHAR1. In the desin time, I have added these 3 fields and taken as Radion button Group. But, Only label is coming on the output...


I totally stuck here. Can you please guide me on this in details as to how to add the Radio buttons and how its action can be handled?


It's bit urgent for me.


Thanks in advance,

Sumesh 

J_R
Advisor
Advisor
0 Kudos

Hi Sumesh,

in order to get a RadioButtonGroup with 4 different values the field type of the field should be at least CHAR4 in the field catalog. In addition, in order to display the various RadioButtons, the field type domain should have the appropriate fixed values. You can of course add the fixed values also in your feeder class in method GET_DEFINITION  You should not configure multiple single Radio Buttons in order to get the RadioButtonGroup. There is a dedicated display type 'Radio Button Group' for this in the FPM Form GUIBB.

Best regards,

Jens