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

Change documents with persistent class

Former Member
0 Likes
967

Hi,

I have created a persistent class and want to use a set-method to change data in the mapped table - nothing special.

But: Does anybody know if there's a possibility to write change documents for the changed field without calling FMs like CHANGEDOCUMENT_SINGLE_CASE?

There would be the event if_os_state~changed but unfortunately no information about the changed field itself is available in this event. Is it possible to redefine events?

Thanks a lot for each answer!

Best regards

Jörg

1 ACCEPTED SOLUTION
Read only

narin_nandivada3
Active Contributor
0 Likes
901

Hi Joerg Racz,

Welcome to SDN.

1) If the function module generated during change document object is not called then you cannot handle

the changed things.. Rather if you want so then go for standard change document object.

2) Yes, We can redefine the Business object events but not Events used in the Report.

Hope this would help you.

Good luck

Narin

7 REPLIES 7
Read only

narin_nandivada3
Active Contributor
0 Likes
902

Hi Joerg Racz,

Welcome to SDN.

1) If the function module generated during change document object is not called then you cannot handle

the changed things.. Rather if you want so then go for standard change document object.

2) Yes, We can redefine the Business object events but not Events used in the Report.

Hope this would help you.

Good luck

Narin

Read only

0 Likes
901

Hi Narin,

thanks for your answer!

The first point is plain to me (although I don't really feel happy about this ) but I have problems understanding your second point because I don't really know what "Business object events" are... I'll try a different phrasing, maybe this is better:

My persistent class inherits the event if_os_state~changed. Can I redefine this event in my class so that I can add an additional parameter where I can put the information about the changed attribute?

Jörg

Read only

0 Likes
901

Hi Joerg,

I think we cannot redefine the event of persistence class.

Rather go for new event for that functionality

Hope this would help you.

Good luck

- Narin

Read only

0 Likes
901

It's a pity... Have you any other idea how I can find out which attribute was changed - in the class, not in the report?

Actually I would know it because I'm explicitly calling the respective method and so I could call an FM afterwards but I would prefer a more elegant solution...

Thanks for your help!

Read only

0 Likes
901

Hi,

If there is log enabled for that particular class then hope it would available in the log or else if any documentation maintained then it would help you.

Good luck

Narin

Read only

0 Likes
901

Ok Narin, thank you very much!

I will add an additional event and handle it, I think that's the best solution!

Thank you once again, it was a real pleasure!

Best regards

Jörg

Read only

0 Likes
901

Hi,

If you want to find the modifications done for the class you can check see the modification overview.. CTRLSHIFTF2. It may help you.. I haven't tried it till now.. but check that..

For example goto se24 and see the class cl_gui_alv_grid and press

CTRLSHIFTF2. you would find the modification that had done to

the class.

Hope this would help you.

Thanks & Regards

Narin