Application Development 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: 

custom table date field need to be updated every day

c_srikiran
Explorer
0 Kudos

Hi ABAP experts

I have a z table where in a date field is there . every day the date filed in the record need to updated by system date .

can any one help me in providing the solution using TMG in abap or alternate way .

Regards

Chandu

6 REPLIES 6

former_member1716
Active Contributor
0 Kudos

You can schedule a daily Job that will trigger at 00:00:00 hours. You can write the required logic in the program related to the Job.

By the way what is the purpose of such requirement? Can you help explaining the same.

0 Kudos

I did not understand what program need to be job scheduled.

is the TMG function group name ?

0 Kudos

Write a Program to update the Z field in the table with Current Date.

The schedule this program as a daily JOB which starts at start of each day.

Hope it is clear now!

0 Kudos

Hi sathish ,

The requirement is in between REFX and HCM modules :

REFX has a custom table where in the Office Quarter rent , Water & electric bill with date fields are there .

all the records need to be updated by every day's date which need to be read in wage types every month

payroll date , using current date rates in the system .

Example : payroll date is say 30.09.2019

payroll run before day : 29.09.2019

Quarter type monthly rent electricity charges water charges on date

A type 1500 250 100 29.09.2019

B type 1000 150 75 29.09.2019C type 700 100 50 29.09.2019

Payroll date for Sept month : 30.09.2019

Quarter type monthly rent electricity charges water charges on date

A type 1500 250 100 30.09.2019

B type 1000 150 75 30.09.2019 C type 700 100 50 30.09.2019

0 Kudos

Develop a program which does the required change for you in the table, in your case make the date field = SY_DATUM. Now schedule this program as a Job and run it daily at beginning of the day (00:00:00 Hrs).

Regards

GK817
Active Contributor
0 Kudos

I believe requirement is to update a date field with system date while creating/changing the record. Otherwise, i don't see any reason why anybody will update date of all records with system date.

Using TMG - You can edit the generated function group. In PAI of generated screen, where logic is implemented, you can write the code to update date field as sy-datum. caution: this logic will be over-written if you regenerate the TMG.

Alternate way to update for all records or selective records - As Satish suggested above.

Regards

GK