Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3548

Re: SM30 Events: Refresh Maintenance Screen after DB Update

$
0
0

Hello All,

 

I have fixed the issue by performing the following:

 

1. Deleted the TMG for my Table.

2. Created a new Maintenance View for my Table.

3. Created the TMG for this new view.

4. I have used the following code in the Event 01.

 

The processing happened as intended.

 

*&**********************************************************************
*& Form:        AFTER_SAVE_MV
*& Description: Change the Time Stamp value after User's Change
*&**********************************************************************
FORM after_save_mv.
* variables Declaration   DATA:       lv_index TYPE sy-tabix.               " Number of lines found
* Constants Declaration   CONSTANTS   lc_action_update TYPE c VALUE 'U'.    " Updating current record
* 0. Clearing data objects.   CLEAR : lv_index.
* 1. Check the all entries of records in table by looping each record which are updated by the User   LOOP AT ZMVIEW_total WHERE action = lc_action_update.
* 2. Read the EXTRACT table with current record.     READ TABLE extract WITH KEY ZMVIEW_total.     IF sy-subrc EQ 0.       lv_index = sy-tabix.     ELSE.       CLEAR lv_index.     ENDIF.
* 3. Populating updated fields to table ( Set the Time Stamp )
* 3a. Set the current Timestamp     GET TIME STAMP FIELD ZMVIEW_total-time_stamp.
* 4. Modify the current record in the table.     MODIFY ZMVIEW_total.     CHECK lv_index GT 0.
* 5. Update the Extract Table     extract = ZMVIEW_total.     MODIFY extract INDEX lv_index.   ENDLOOP.
ENDFORM. " Form AFTER_SAVE_MV


5. So, lesson learnt is -->

If you want to use Events for Maintenance View then do not use the TMG of the Transparent Table. Instead create a Maintenance View and then create a TMG for this Maintenance View and then use the Custom Routines for the Events.


Regards,

Deepu.K


Viewing all articles
Browse latest Browse all 3548

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>