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

SM30, events and custom code.

Former Member
0 Likes
1,430

Hello friends,

I have the following requirement. There is a custom Z table and there are 4 fields inside the table. When i change a field, i have an event before_save_database, where i go and update the value of the 4th field if field 3 changes. On display it shows data was saved although the 4th fields still has the old value.

Only when SM30 is entered is the new value for field 4 seen.

I want it to display the new value in the first run itself when the message comes 'Data is saved'. Kindly mention how the following can be achieved.

Regards,

Jaydeep.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
819

i´m not a 100% sure that i got your requirements, but i think it´s a commit problem.

if you enter SM30 you have a dynpro change, which means you loose your dialog work process.

This again leads to an implicit commit on your DB.

now i would try to do an manual commit and see if your problem still exists.

Hello friends,

I have the following requirement. There is a custom Z table and there are 4 fields inside the table. When i change a field, i have an event before_save_database, where i go and update the value of the 4th field if field 3 changes. On display it shows data was saved although the 4th fields still has the old value.

Only when SM30 is entered is the new value for field 4 seen.

I want it to display the new value in the first run itself when the message comes 'Data is saved'. Kindly mention how the following can be achieved.

Regards,

Jaydeep.

4 REPLIES 4
Read only

Former Member
0 Likes
819

Hi,

From SE11 create the table and Table Maintenance Generator.

From the table Maintenance generator screen you can define your own EVENTS from the Menu:ENVIRONMENT-> MODIFICATION->EVENTS

define your own custom events and write your code and check.

Reward if useful.

regards,

Anji

Read only

Former Member
0 Likes
820

i´m not a 100% sure that i got your requirements, but i think it´s a commit problem.

if you enter SM30 you have a dynpro change, which means you loose your dialog work process.

This again leads to an implicit commit on your DB.

now i would try to do an manual commit and see if your problem still exists.

Read only

0 Likes
819

Hi Florian,

Even i was thinking on similar lines.

I did a manual 'COMMIT WORK' also, but doesnt solve the problem

Pls suggest some other alternative.

Regards,

Jaydeep

Read only

amit_khare
Active Contributor