Application Development 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: 

Check if field was changed

karuna_gangireddy
Contributor
0 Kudos

Hi All,

Is there a way by which we can find if the field contents are changed?

Can anyone please help me with this?

Thanks in advance,

Karuna.

7 REPLIES 7

Former Member
0 Kudos

using a field_aux to store the value before change it?

ex:


field = 123.
if field_aux is initial.
    field_aux = field.
endif.

on ur code check


if field eq field_aux (or ne).

if U'r using module pool, U can do it:


Field your_field
    MODULE module_name ON REQUEST.

Regards,

Former Member
0 Kudos

Hi Karuna,

In any Transaction if you got to Environment menu you can find out like header changes, item changes there you can what Value has been changed.

Also you find the changes in CDHDR and CDPOS tables

thanks,

Venkat

Former Member
0 Kudos

You can use sy-datar to see if any field changed.

Rob

0 Kudos

Hi All,

Thank you for all your quick replies.

- Allan i have many fields if i start doing this the code length increased very much.

- Venkat, i want to check at runtime.

- Rob, I was just checking at sy-datar. it was saying that if any one fields was changed this will be marked as 'X'. This does

help me. But is there any way to see exatly what fields were changed OR do i have to LOOP at all fields in the screen?

Thanks,

Karuna.

0 Kudos

Hi

If you're speaking about the fields of a screen u need to check field by field.

So I think u should define a structure with all input fields where u can store the old value and then u cna use it in order to find out which field was changed

Max

0 Kudos

>

> OR do i have to LOOP at all fields in the screen?

Well, only the ones that could have changed.

Rob

karuna_gangireddy
Contributor
0 Kudos

Thank you for all your suggestions. I will loop at the screen fields.

Thanks,

Karuna.