In this Document , I would like explain about Dynamic Date selection in the back ground executing report and send mail to user periodically.
Requirement ; Client Requirement, Need report result of the every day GR posting materials with stock and value with material document number and vendor.
We can find Material Document list and GR qty with value in MB51.
Step 1 : Create Distribution list in SO23, to create Private distribute lists and Shared distribution lists.
I created one distribution list like shared distribution list for assigning mail id to shared distribution list. You can see how to create distribution list in below link.I am not going deeply this, my target on dynamic selection date in background. You can find in below link for detail distribution list.
Step 2 :Create variant for input selection
For Dynamic selection date in background the creation of variant is important step. See below screen shots.
To create variant just enter your input details in selection screen and click on save button.
enter your Variant name and Description
I need dynamic selection in the field Posting date , Select the “D” type of selection Variable
We have option number of variable names :
we can select the name of variable as per the client requirement
The below are the name of variables
From month start to today
Current date +/- ??? days
current date +/- ??? work days
First day of current month
nth working day of current month
First day of next month
First day of previous month
Last day of previous month
Last Day of the Current Month
Once entered the details, you save the variant.
Once completed the input selection, you start execute the background job .
you can see in below link, how to do scheduled job and assignment of distribution list in Sm37
Once run the Job you will get mail every day with dynamic posting date as a system date.
You received the mail with report results. You can generate any report like this way dynamic selection date.
Hope Its help ful to all.
We are always welcome to all for any suggestions……..