Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nightly Job to Regenerate MRP

Status
Not open for further replies.

andersonch

IS-IT--Management
May 14, 2004
8
US
Does anyone know how to run MRP regeneration without user intervention (aka a nightly job)?

Great Plains V8.0 SP1
SQL 2000 DB
 
I'm not familiar with MRP, but if you run a dexsql log, while running it, you should be able to find which stored procedure it is running. You could take that info and try and create a sql job to run that stored proc. There are also scheduled macros that you can create with the professional tools.
 
You can use the windows scheduler to launch a Great Plains application at a time of your choosing.

Then use a macro or tool like Omni Login to log into Great Plains. I would use a new user ID created for this task.

Then use the Startup group in Shortcuts to start a macro which will perform whatever tasks are required.

You can finsh the macro with the appropriate command to exit Great Plains when complete:

post v8.0: CommandExec form BuiLtin command cmdQuitApplication

pre v8.0: MenuSelect title File entry Exit

David Musgrave [MSFT]
Senior Development Consultant
Escalation Engineer
MBS Support - Asia Pacific

Microsoft Business Solutions

Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties,
and confers no rights.
 
I created a macro to run MRP every night. When you create this macro you must make sure it is including the logging in of the application (eEnterprise) and you can save the macro in the eEnterprise directory.
 
I created a Scheduled Task on my Great Plains server, this is what the task path is in the run line on the task.

Code:
"C:\Program Files\Microsoft Business Solutions\Great Plains\Dynamics.exe"  "C:\Program Files\Microsoft Business Solutions\Great Plains\Dynamics.set" "C:\Program Files\Microsoft Business Solutions\login.mac"

The login.mac is a macro I made, I just recored myself logging into Great Plains and running MRP and closing Great Plains.

Here is the macro:
Code:
Logging file ':C:/Program Files/Microsoft Business Solutions/macrolog.txt'
# DEXVERSION=DEX 8.00m052 2 2
CheckActiveWin dictionary 'default'  form Login window Login 
  TypeTo field 'User ID' , 'USERIDHERE'
  MoveTo field Password 
  TypeTo field Password , 'USERPASSWORDHERE'
  MoveTo field 'OK Button' 
  ClickHit field 'OK Button' 
NewActiveWin dictionary 'default'  form 'Switch Company' window 'Switch Company' 
  ClickHit field '(L) Company Names' item 2  # 'COMPANYNAMEHERE' 
  MoveTo field 'OK Button' 
  ClickHit field 'OK Button' 
WindowMove dictionary 'Manufacturing'  form 'ICJC_DYNAMICS_RCB_FORM' window 'ICJC_DYNAMICS_RCB_FORM' pointh 5000 pointv 5000 
NewActiveWin dictionary 'Manufacturing'  form 'ICJC_DYNAMICS_RCB_FORM' window 'ICJC_DYNAMICS_RCB_FORM' 
WindowMove dictionary 'Manufacturing'  form 'ICJC_DYNAMICS_RCB_FORM' window 'ICJC_DYNAMICS_RCB_FORM' pointh 5003 pointv 5019 
  CommandExec dictionary 'Manufacturing'  form 'Command_MFG' command 'MRP_Setup' 
NewActiveWin dictionary 'Manufacturing'  form 'MRP_Setup' window 'MRP Setup Window' 
  MoveTo field '(L) Regenerate Button' 
  ClickHit field '(L) Regenerate Button' 
NewActiveWin dictionary 'Manufacturing'  form 'MRP_Status' window 'MRP_Status' 
NewActiveWin dictionary 'DEX.DIC'  form 'Report Ask' window 'Report Type' 
  MoveTo field '(L) Cancel' 
  ClickHit field '(L) Cancel' 
NewActiveWin dictionary 'Manufacturing'  form 'MRP_Status' window 'MRP_Status' 
CloseWindow dictionary 'Manufacturing'  form 'MRP_Status' window 'MRP_Status' 
NewActiveWin dictionary 'Manufacturing'  form 'MRP_Setup' window 'MRP Setup Window' 
CloseWindow dictionary 'Manufacturing'  form 'MRP_Setup' window 'MRP Setup Window' 
CommandExec form BuiLtin command cmdQuitApplication

You will have to change the username and password and company name and maybe the company names item number.

This works great. It is for Great Plains v8.

BobSchleicher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top