2014 Jun 30 8:30 AM
Hi All,
I got a requirement to anaylze a Custom Table.
Issue is- Whenever the table entries are updated and saved, entry is saved but when we re-open the same table,
the old entry is displayed instead of new entry.
can any 1 tell how to solve this or where might be the issue is
Regards,
Naresh.
2014 Jun 30 8:33 AM
have you checked if there's a background job that populates the custom table? it's possible that your changes gets overwritten automatically right after you have changed it.
2014 Jun 30 8:38 AM
Hi Jovee,
The updated Entry has saved correctly in the TR but not able to display the same value when re-opened the table.
I have checked in debugging but i could not fine any solution.
Regards,
Naresh.
2014 Jun 30 9:01 AM
what do u use to change the values?
1. if in SM30 or SE16, then values should have changed correctly. If not, some program can possibly changing the value. try to use where used list to know which programs are accessing the table.
2. if by code, then call COMMIT WORK AND WAIT after your UPDATE statement. this is just to explicitly do the commit, the system automatically commits changes right after full execution of the program.
2014 Jun 30 8:43 AM
Hi Naresh,
1. Check the events (if attached with TMG)
2. Regenerate TMG (if no TMG code is written)
Hope this helps.
Regards,
Naveen
2014 Jun 30 8:49 AM
Hi Naveen,
I have 1 doubt, if we re-generate the TMG, will existing records gets deleted?
confirm me once
Regards,
Naresh.
2014 Jun 30 9:10 AM
No The existing data wont be deleted, but the code will if you have written it in any event or somewhere.
Praveen .
2014 Jun 30 8:45 AM
2014 Jun 30 8:48 AM
Hi Naresh,
Please check the delivery & maintainece tab whether parameter data browser/Table view maint is filled accordingly i.e. it should be without any restriction.(Display /Maintainence allowed without any restriction).
Regards,
Roma
2014 Jun 30 9:07 AM
Hi Roma,
Checked Delivery & Maintenance tab. Displayed/Maintained Allowed parameter is there.
Regards,
Naresh.
2014 Jun 30 9:17 AM
have any maintenance events been coded for the table?
also, are there begda/endda in the key of the data?
2014 Jun 30 10:14 AM
Hi Steve,
No Events maintained under Environment--> Modifications--> events.
In the table, BEGDA n ENDDA are key fields but enabled only when creating new entries or deleting old entires.
Regards,
Naresh.
2014 Jun 30 11:04 AM
How are begda and endda populated when creating new entries? And how is it handled when entries are updated?
2014 Jun 30 11:34 AM
Hi Sameena,
Begda is populated as 01.01.2014 and endda is populated as 31.12.9999.
As i said, these are not editable once created.
Only 1 field has to be updated., it is not allowing.
Suggest with your answers.
Regards,
Naresh.
2014 Jun 30 1:25 PM
2014 Jun 30 1:33 PM
Hi Sameena,
If we adjust table using SE14, we need to re-generate TMG.
Issue is many custom programs written behind this.
all will be deleted, if i do so....
I have checked in debugging, no where it is triggering in custom program.
but not able to find the solution.
Regards,
Naresh.
2014 Jun 30 2:04 PM
Use a watchpoint to check whether the value you entered(new value) is updated during its run or not, if yes then when its getting updated.
2014 Jun 30 3:19 PM
I think it is possible that it can appear data is missing - but it is there - I had similar problems with maintenance tables in the past with begda/endda which is why I asked. Have you tried creating a dummy table and remove the begda and endda just to see if a different result occurs - I think you should explore the begda/endda further in your table....
do you not need to add your the following code in the PAI...I think this was a standard approach I had to take the last time I created a maintenance with begda/endda in the table
chain.
field zhr_pen_type-begda.
field zhr_pen_type-endda.
module temp_delimitation on chain-request.
endchain. (see below for full example)
I think there is a menu option somewhere where you can explode the data...sorry can't be more specific as it was 5 or 6 years ago when I last encountered it and I do not have the example in front of me.
Have you actually looked at the raw data in SE16/SE16N - TabMaint maybe telling you an update is happening but is it really?
this is my coding from a live example in my portfolio of the screen coding...
process before output.
module liste_initialisieren.
loop at extract with control
tctrl_zhr_pen_type cursor nextline.
module liste_show_liste.
endloop.
*
process after input.
module liste_exit_command at exit-command.
module liste_before_loop.
loop at extract.
module liste_init_workarea.
chain.
field zhr_pen_type-zscty .
field zhr_pen_type-schid .
field zhr_pen_type-endda .
field zhr_pen_type-begda .
field zhr_pen_type-zzpentype .
module set_update_flag on chain-request.
endchain.
chain.
field zhr_pen_type-begda.
field zhr_pen_type-endda.
module temp_delimitation on chain-request.
endchain.
field vim_marked module liste_mark_checkbox.
chain.
field zhr_pen_type-zscty .
field zhr_pen_type-schid .
field zhr_pen_type-endda .
module liste_update_liste.
endchain.
endloop.
module liste_after_loop.