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

Get Batch date

Former Member
0 Likes
911

Hi All,

How do we get Batch date ? is there any system field ?

Thanks in advance

6 REPLIES 6
Read only

Former Member
0 Likes
836

Hi sudhakar,

Can you elaborate more on batch date.

If you are looking for system date it's sy-datum.

Regards,

Mohaiyuddin

Read only

Former Member
0 Likes
836

Check the MCH1 table if you are referring a BATCH pertaining to the material.

Regards,

KIran Bobbala

Read only

Former Member
0 Likes
836

Hi All,

I am running a program in the background mode.

I want the Batch date in which date i have sheduled the program . because i want to sort the material depending upon the batch date . if the batch date is even sort the material by decending and otherwise ascending.

so if the program is sheduled by 11 pm it will take 4 hrs to complete.it will complete next day morning 3am.if i take the sy-datum the date was changed and it will go to next date the sort will go wrong.

How can i identify the Scheduled date is there any system field or any another way ....

Thanks in advance .

Read only

0 Likes
836

Hi Sudhakar,

You can pass jobname to TBTCO-JOBNAME and retrieve TBTCO-STRTDATE and TBTCO-STRTTIME.

This will indicate start date and start time of Job.

(Similary, ENDDATE and ENDTIME will indicate actual end date and end time of the job)

Regards,

Mohaiyuddin

Read only

0 Likes
836

Hi,

SY-DATUM will not change during the run of a program, so even at 2am the next day it will still have the same value it had when the program started.

You might have a problem if your batch job contains multiple steps.

Hope this helps,

Gert.

Read only

0 Likes
836

Hi,

Are you looking for the batch expiry date?

Please confirm.

Regards.