Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Changes in the screen - reg

Former Member
0 Likes
2,156

Hi Gurus,

I have a module pool screen designed by me, which is called from a standard transaction.

the contents of the screen are some i/p , o/p fields and a table control for some data.

Now, while coming out of the screen, i have to raised a pop-up for saving the data or not..... all the functionality and screen design is written well...and working fine...

Now the problem is , while cuming to the screen, it already holds some data. so if the user doesn,t change any data on the screen, then while cuming out of the screen, the pop-up for save shud not appear..

But iam not able to handle this condition.. to check whether any changes are done on the screen... Can u suggest me how to handle the above situation.

Note: ( the temporary data stored before cuming to the screen compared with the present screen data is some what complicated in my case, so that type of comparision cannot be made).

So please suggest me how to handle the condition whether there has been a data change on the screen or not....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,756

Hi,

I think you can store a copy of the data in some intermediate variable/table at the start of the screen(not before the screen, you can have this code after all screen fields are populated), and compate it while coming out of the screen.

I hope this will be helpful to you, revert back if you have any doubts.

Regards

Karthik D

Hi Gurus,

I have a module pool screen designed by me, which is called from a standard transaction.

the contents of the screen are some i/p , o/p fields and a table control for some data.

Now, while coming out of the screen, i have to raised a pop-up for saving the data or not..... all the functionality and screen design is written well...and working fine...

Now the problem is , while cuming to the screen, it already holds some data. so if the user doesn,t change any data on the screen, then while cuming out of the screen, the pop-up for save shud not appear..

But iam not able to handle this condition.. to check whether any changes are done on the screen... Can u suggest me how to handle the above situation.

Note: ( the temporary data stored before cuming to the screen compared with the present screen data is some what complicated in my case, so that type of comparision cannot be made).

So please suggest me how to handle the condition whether there has been a data change on the screen or not....

7 REPLIES 7
Read only

Former Member
0 Likes
1,757

Hi,

I think you can store a copy of the data in some intermediate variable/table at the start of the screen(not before the screen, you can have this code after all screen fields are populated), and compate it while coming out of the screen.

I hope this will be helpful to you, revert back if you have any doubts.

Regards

Karthik D

Read only

Former Member
0 Likes
1,756

Hi Chaitanya,

If you got the solutions, close the thread as answered.

Regards

Karthik D

Read only

Former Member
0 Likes
1,756

Hi,

Try to use the system variable sy-datar to track the screen changes.

Regards,

Aravind JM.

Read only

Former Member
0 Likes
1,756

Hi,

You have to store the screen values in some variables and everytime you have a make a check wether stored variables contains the same data as its one the screen now. If data is same then restrict pop-up otherwise show.

So, based on these conditions you can allow pop-up to come.

Cheers!

Sidharth

Read only

Former Member
0 Likes
1,756

Hi,

Yes you can use System Field SY_DATAR to determine whether any input field value is changed. Check this field in PAI if it has value 'X' means some fields are changed, space means no value is changed.

For more details see [ABAP System Fields|http://help.sap.com/saphelp_nw70/helpdata/en/7b/fb96c8882811d295a90000e8353423/content.htm].

Regards

Karthik D

Read only

Former Member
0 Likes
1,756

First when the user comes into the screen let every thing be in display mode, and you can have a pf-status button in the screen which allows the user to toggle between display/edit mode like many of the standard SAP screen has.

You can bring in the pop up if the user leaves the screen in edit mode or when the user goes back to display mode from edit.

Regards

Sam

Read only

Former Member
0 Likes
1,756

SY_DATAR is working fine...