SAP ERP Plant Maintenance - Close an open manual call - sap-erp

I have very little SAP ERP knowledge. I wrote some code to create a Manual Call Work Order in the Plant Maintenance module. The code seems to have worked but when I try to create another manual call work order I get an error message saying I already have one open. I know there are transactions I can run to show me the open call and allow me to close it. Can you tell me a transaction I can use to close the open manual call? All I know is the Maintenance Plan Number.

Try transaction IW23. If you press F4 on the notification field you will get a wider selection that allows you to enter Maintenance Plan number.
Transaction IP03 allows you to look at a maintenance plan.

Someone here showed me how to close the open manual call. I'm adding the instructions here for completeness sake.
Run transaction ip03.
Enter the MaintenancePlan number and press enter.
Select the Manual maintenance schedule calls tab.
Highlight the row with the open manual call.
Click the eye glasses icon under the table.
Select the order number and copy it.
Run transaction iw32.
The order number you copied should be in the selected. If not enter your order number and press enter.
Click on the checkered flag icon to
TECO the order and clear the open
manual call.
After doing these steps I was able to create another manual work order call.

Related

Find running report from WIReportServer.exe

I have a query which keep coming back on my oracle database, without ever finishing.
I identified that it came from SAP Business Object, more precisely the WIReportServer.exe process. I have the Windows PID of the process.
Is there a way to find which BO report is linked to this process ?
Thanks
Yes, you can use the WEBI Admin Tool. Find the WebI Processing Server that matches the PID you have, click the gear icon to open it, select "Activities" from the Perspectives dropdown, then click the refresh icon at the far right. This will present a list of all currently-processing activities. You can then get the properties for each activity, which includes the user name and report name.
If this is a recurring issue, it might be easier to just add an END_SQL parameter to the universe. This will add the BO user name and report name as a comment in every SQL statement that's generated. You can then quickly identify the user just by checking the currently-running SQL in Oracle. See here for more info.

VBA DoEvents() in Access or an alternative

I am reading about options that will allow me to run a macro without locking down my session of Access until it is done running. I have some VBA macros for Access that execute SQL SELECT and UPDATE statements and can take almost an hour to run. This currently locks down Access for me until it is done running.
I am seeing what options there are so that I can the macro and and still use Access while it finishes running the report in the background. I came across DoEvents() as an option, but just about everything says not to us it. So what are some good alternatives?
DoEvents has its uses, e.g. if you have a long running loop and want to give the user a "Cancel" button that he can actually click.
But in your use case the best option is:
Make a copy of your frontend database
Run your VBA code in one instance of Access with the first frontend
Start a second instance of Access, open the second frontend, do whatever you want (well, you shouldn't do something that locks tables used by the first instance).

Windows Task Scheduler and MS Access 2013

I am trying to utilize windows task scheduler to distribute Access reports to End Users in my company.
All I am doing is triggering a macro that runs code from a module which exports a report to a PDF, prints it out, then exits access.
DoCmd.Quit acQuitSaveNone
That's what I've been using at the end of my code in VBA to close access after running a macro.
When I manually run the macro it works fine, but when scheduled on a task, it gets held up a lot and stuck.
I've checked event viewer to try and find any Microsoft Office alerts but do not see any.
It appears that Access is unable to quit many times when running through Task Scheduler. Would there be a VBS I can run, say, 5 minutes after the task to close down the .accdb file and MSACCESS.EXE or is there something I can do to make these Tasks actually work??
It seems maybe when running in the background through task scheduler.. the code is getting ahead of itself and trying to quit at the same instance that it is finishing the output to the printer, causing it to seem "busy" and unable to actually close?
I have an entire domino of code that shoots off after this but it stops dead in its tracks when it cannot finishing closing access.
Any suggestions?
Thanks,
Ian
Here is the gist of what I would do, I am just addressing the print on open and quit actions. You may need to tweak to ensure that you have validation etc in place.
First, make sure that your report has a default printer specified. (Report design-->Page Setup-->Page-->Use Specific Printer and then select your printer)
Create an Autoexec (auto execute) macro, this macro will be saved with the name Autoexec. Macros named Autoexec executes when Access is opened automatically. Note that once you have this macro, it will run each time you open Access, to prevent it from running, hold down the shift key and then open Access, this bypasses the Autoexec
First action in your Autoexec Macro is OpenReport and set the View to Print (report is printed when opened)
Next action in your Autoexec Macro is QuitAccess with options set to SaveAll.
When you run an application from the scheduler, it runs with different credentials. You want to make sure that you choose the appropriate options here.
Fixed it. Very glad as I've seen many with this issue and hope this gets to them.
If anyone has any issues regarding access macros and task scheduler and this doesn't work - I'll be happy to help as best as I can as the frustration of wanting to remove administrative tasks through automation that don't work out is just terrible.
Since I needed the task scheduler to wake the computer up, log me in, and open access databases on network drives that reference SQL servers.. there was a couple things I had to make sure were set up.
First is trusted locations. Any network drives you are access should probably be in the trusted locations.
Secondly, my last command on the macro is DoCmd.RunCommand.Close (I believe.. if im wrong Ill change tomorrow when I'm back in the office)
Third, use the root path to the network folder and not a mapped drive as they may not map when your logged off... so instead U:\file path... would have to be \computer1\filepath\ etc..
This path should be made with all linked tables or databases among the network especially if you have code calling for those files.
Fourth, I ended up having to do it the less preferred way and have a folder called "accessjobs" where I put shortcuts to Access Macros which triggered code and simply ran that path in task scheduler with "start in:" the folder the macro shortcut is in.
Fifth I had to run with highest privileges, and selected "run whether user is logged on or not"
A couple of these things may be coincidental that they work, but I am not about to spend even more time with trial and error to see which settings are benine as I spent TOOO long figuring this all out. But now it is solved and the sky is the limit now!
Thanks for the help!
Ian

ServiceNow SNC - Find Underlying Report SQL

Is there a way to locate the underlying SQL in a ServiceNow (SNC) instance using MySQL as the database platform? My user account doesn't have access to watch the PROCESSLIST, so I was looking for a table possibly that stored an SNC based report's SQL.
For example, I've created a report in SNC and execute it manually. I would like to be able to go out to some table in the database to see if the SQL for which that report is based upon is available outside of watching the PROCESSLIST.
Ignoring the question of "why?" (normal hosted instances don't expose direct database connectivity to end users, so I'm curious what you plan to do with the raw sql), you can get the sql that was used anywhere in the platform by activating sql debugging. This requires the admin role in the appliation.
To activate sql debugging, in the left nav, go to System Diagnostics > Session Debug > Debug SQL
This will cause sql statements for every transaction in your session to be written to the bottom of every page load. It also includes the sql for the previous transaction, so if you need to get the sql for an AJAX transaction or something, just trigger it, and then navigate to some other page (/ui_page.do is an easy one that doesn't load anything, but still gives you your sql debug output)

Getting random error: "The expression On Change you entered..."

Running Access 2010 on Citrix against a SQL Server 2008R2 backend. Occasionally my users will get an error reading:
The expression On Change you entered as the event property setting produced the following error: Overflow.
* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
* There may have been an error evaluating the function, event, or macro.
Once a user gets this error during a session, he will continue to get it until he logs out of the database front end. He can then immediately relaunch the Access front end and go do whatever it was he was attempting to do. The On Change portion will vary in event type (sometimes On Click, sometimes After Update, etc), and it will happen on different forms, but the fix is always to exit the DB then get back in and everything just works fine.
The more I learn, the more I'm starting to believe that it's got something to do with the Citrix enviornment that we're in, but I haven't been able to pin anything down.
I've seen the suggestions to copy the form, and to start with a new DB and import everything. I've done these and it hasn't really helped - i.e. this is random enough that I don't know if the frequency of issues decreased significantly after the change.
Does anyone have any additional suggestions of what I can do in my Access code?
Does anyone have any experience with this setup and have some Citrix or SQL Server tweaks that I might be able to pass along? (I don't know if our IT people will listen or try to work with me on it, but it's worth a shot.)
I'm frustrated with the randomness of this, and I hate telling my users there's nothing I can do about it, but at the moment, I'm completely stumped.
Thanks,
FreeMan
Edit - Additional details...
the users are running a compiled .accde
they are all running from a common .accde file
this is still happening for a few users to whom I have given their own personal copy to run
The goto fix for random weird stuff happening in Citrix is to disable hooking. Hooks get injected into every process running in a Citrix session, so they could be screwing up something in Access. You can configure registry entries to exclude Access from being hooked:
http://support.citrix.com/article/CTX107825