Data Loss POP UP – FPM OVP Application


 The below post describes  how to display a data loss pop up screen, when CANCEL button is pressed without saving the data with the help of form uibb.

Step1- Create a class(feeder class) in Tx- SE24 and implement the shown interfaces.

1

Step2- Implement al the methods and make all active. Put some code in GET_DEFINITION & GET_DATA method as shown below.

2

3

4

Step3- Now create a configuration for the FORM uibb.

5

Step4- provide configuration name as – ZCC_FORM_SPFLI & click on new button.

6

Step5- Provide the feeder class name and continue.

7

Step6- Add some fields and make some fields as input field.

8

Step7- Rearranging the fields in preview section. Save the form configuration.

9

Step8- To create an OVP application. Go to Tx- FPM_WB and select the marked option.

 

 

10

Step9- Provide the application name, choose floor plan as overview Page and then click on Next button.

11

Step10- Save  it.

12

Step11- Click on Edit Configuration(FLUID) option.

13

Step12- Provide a title & add a form component.

14

 

Step13- Provide the form UIBB configuration name. Now we  have to add some buttons on the global toolbar of the application. So go too Toolbar Schema tab.

15

Step14- Select Global toolbar, click on create toolbar Element. Add Save & Cancel button.

16

Step15- Again add a Button.

17

Step16- Provide the button text as- Other & Event Id as- OTHER. Save it.

18

Step18- Execute the application.

19

Step19- so here we have the form is displayed. Now the task is if some data are changed in the input field(s) and CANCEL button is clicked before SAVE then a data loss pop up should be displayed.

20


 

Go back to the feeder class & add the new interface- IF_FPM_GUIBB_FORM_EXT

21

Create two attributes as shown.

22

Go to the flush method.

23

FLUSH method provides parameters which says if the some field data is changed or not. IT_CHANGE_LOG stores the fields changed value. Put the below code.

So if any field is changed GV_CHANGED is set to true.

24

Go to the NEEDS_CONFIRMATION method.

25

Put the below code here. Here we check  the data is being changed & also CANCEL button is pressed.

36

Test the application.

37

Change the field value[ for test field- depart. City  – value being changed] and click on cancel button. So  here we have the data loss POP UP.

38


 

 

One comment

Leave a Reply