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

Table Maintenance Generator Issue...

Former Member
0 Likes
3,375


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.

17 REPLIES 17
Read only

former_member730258
Participant
0 Likes
2,826

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.

Read only

0 Likes
2,826

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.

Read only

0 Likes
2,826

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.


Read only

naveenvishal
Contributor
0 Likes
2,826

Hi Naresh,

1. Check the events (if attached with TMG)

2. Regenerate TMG (if no TMG code is written)

Hope this helps.

Regards,

Naveen

Read only

0 Likes
2,826

Hi Naveen,

I have 1 doubt, if we re-generate the TMG, will existing records gets deleted?

confirm me once

Regards,

Naresh.

Read only

0 Likes
2,826

No The existing data wont be deleted, but the code will if you have written it in any event or somewhere.

Praveen .

Read only

Former Member
0 Likes
2,826

after update write COMMIT WORK.

Read only

Former Member
0 Likes
2,826

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

Read only

0 Likes
2,826

Hi Roma,

Checked Delivery & Maintenance tab. Displayed/Maintained Allowed parameter is there.

Regards,

Naresh.

Read only

Former Member
0 Likes
2,826

have any maintenance events been coded for the table?

also, are there begda/endda in the key of the data?

Read only

0 Likes
2,826

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.

Read only

0 Likes
2,826

How are begda and endda populated when creating new entries? And how is it handled when entries are updated?

Read only

0 Likes
2,826

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.

Read only

0 Likes
2,826

Can you do a manual adjustment with SE14?

Read only

0 Likes
2,826

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.

Read only

0 Likes
2,826

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.

Read only

0 Likes
2,826

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.