Most people are only familiar with the various reporting tools in Business Objects. Of course, these are the reasons organizations set up a Business Objects instance in the first place. However, Business Objects XI has managed to include some additional functionality that goes beyond reporting. For example, BOXI can be used to publish “agnostic” documents, such as PDF, Word, Excel, or PowerPoint. In particular, nevertheless, I would like to discuss the unique functionality of the Business Objects Program Object.
A Business Objects Program Object can be used to execute a batch file, a shell script, or a binary executable. It can also run Java, JavaScript, and VBScript. Therefore, they is virtually no limit to what you can do with a BO Program Object, except for your imagination and standards. Once the association is made to the program object standard objects rights can be applied and most importantly you can schedule the object (which is where the power is).
There are a few caveats that you need to be aware of. The program will require a “Logon As” account that must have interactive login rights to the server on which the Program Job Server runs. Also, I should mention that you need a Program Job Server configured for your environment. When you create a program you are not creating a pointer to your script, but rather you are uploading your script/program to the CMS InfoStore, just like you would an Excel file if you were to load it to your Business Objects repository. This means that if you later alter the script you used to source the program object then you must create a replacement object and re-source the script.
Another couple points, when I create program objects I like to log in to CMC while logged in to the server since often I have created a driving batch file that calls other batch files on the server. Oh, and that brings up the very last point. If you are running multiple Program Job Servers and your script calls other scripts on the server you will need to place identical copies of the called scripts in the exact same path on all servers running a Program Job Server (anything less would be easier, but it would cause failures).
The following are some simple steps to create a functioning program object. They are basic, but they should get you on your way to lots of programmatic trouble. The grouping of the step correspond to the screenshots above. Click on each thumbnail to view the full-size image; I recommend opening them in another browser window (hint, right click the thumbnail image and select this option).
Step and Screenshot #1
a) In CMC, go to Objects and click the “New Object” button
b) Click on “Program” in the left-hand menu
c) Enter in the location of the program object source, the path needs to be local to the client you are using. You will need to create a test script to run if you don’t already have something in mind.
d) Select the “Program Type”
e) Select the target folder and/or categories
f) Click “Submit”
Step and Screenshot #2
a) You may edit the program object name which gets generated from the source file you loaded. The name can be anything.
b) Add other properties if desired. A good description is always helpful to others and your future self.
c) If you made changes, click “Update”.
Step and Screenshot #3
a) Click on the “Process” tab and the “Logon” sub-tab.
b) Put the account information for an account with log on rights, any rights less than interactive logon will result in a failed execution.
c) Click “Update” when done
You are welcome to experiment with the other tabs and sub-tabs, but please share you findings if you do. 🙂
Can you please give a real-life example of a program you use (or would use) through Business Objects?
-Ethan
Good question. Thanks.
I have used it to run SDK executables. In fact, I have run even bust DOS batch scripts that do ETL (Extract Transform Load) tasks on databases. Neither is a choice application of a program object, BUT when I was in a pinch they did just fine (non-production capacity).
In both instances the notification emails for success or failure were quick to configure and nice-to-have; however, getting output from the batch files into the email seemed very difficult and therefore I didn’t attempt it.
I tried it with a simple shell script (our server is linux). However when I run the object via Infoview it fails and gives below error.
Server used – rh12.programjobserver
Error – “The Program Object reported an error while running, but no error code was provided. ”
Can you help.
Thanks
I haven’t tried it with Linux, sorry. But be careful, the script get’s copied to the FRS and therefore if it is not standalone, it might have trouble.
I removed the logon details provided in step3 and it worked. The object got executed successfully.
Looks like for Linux we don’t need to provide these details.
Thanks
How to run that scripts , when ever i run then it throws me an error ie “The Program Object reported an error while running, but no error code was provided. ”
What kind of script are you trying to run?
I received that error the other day and I finally determined that the Program Job Server on that machine was corrupt. In fact, even deleting it and adding it back did not fix anything. But other program jobs servers running on other servers worked fine. You might want to try a simple script that outputs a log file or something and then see if you can get it to work on another server, if available. Otherwise, I would open a case with SAP-BO if you can.
Good Luck and please keep us posted.
Hi Julian,
I have a batch file as a program object and I want to schedule that. this Batch file internally invokes a Java Program which generates XL file from report’s (latest) history instance and places it a folder structure created by the program itself.
Now the Java program is configured on a one of the cluster so I have created a Server Group and placed the ProgramJobServer of that node in the server group so that when the above schedule executes, it should get executed only on the node.
But the issue is, schedule is throwing an error “The Program Object reported an error while running, but no error code was provided”.
I have make sure the shared drive folder where the java program will keep the output files have is actually shared with the domain user which runs the program job server.
do you have any inputs for this solution??
Thanks in advance
My “program job server” was registered against a service account and I believe that was the problem. The moment I switch it and registerd against “Local System” account, it started working.
Hi Julian,
I am fairly new to scheduling a program job. I need your ideas.
I have a .jar file which gets the details of all the pending schedules and saves the output as a .xls file.
I want to schedule this .jar as program job.
The questions i have, how should I export this .jar file as, Executable or Java or Script??
And also let me know the parameters I need to set depending on the above selected option.
Thanks,
Raj
Pingback: Business Objects Creates Excel Readable Files - Note True Excel - CSV Export | Business Objects Tips
With regard to the “The Program Object reported an error while running, but no error code was provided.” error
Sav – Thankyou very much was down to IT not knowing what they were doing 🙂
LocalSystem account!!!!
Cheers
Aron
Pingback: Business Program Object - Hi-Tech Digital Gadget Informatique
Hi,
Please let me know, how we can schedule a batch file in BO XI-R3?
Just to give you an idea, i have created a package which contains a program and program is pointing to the batch file. The code in the batch file will create a text file.
I wanted to schedule this package/program in XI-R3 but its throwing and error saying ….
Fail on component Yes
Error Message: Object Package failed due to a component scheduling failure
Thanks in anticipation…Twarit
Hi Twarit, I have seen that “Object Package failed due to a component scheduling failure” error before. When I change the logon credentials of the program object to someone different it worked. I have no idea what causes this or why avoiding certain users worksaround the issue. I really should open a case with BO on this, but I haven’t had the time. Try changing your logon credentials and see what happens.
If you want to add Program in Business Objects XI R3, then you must go CMC->Folders . Click on Folder in which should be yout program located. Then right click on folder->Create Object->OK. After dobule-click on created folder->righ click on the name of the program object and click Program.
Thank for updating the information here “No name”. I will try to get updated screenshots and instructions posted soon.
Is it possible to view only few of the report in pdf or excel format when we are refreshing. can we do this by scripts?
Hi Poovi, can you please provide more information. I am unsure of what you are asking? Do you wish to limit Excel/PDF export to only a few reports? If so, this is done through the report’s, or its folder’s security settings.
Hi Julian,
Our user want to refresh the report in webi and the report output format should be in excel or pdf in infoview. They need this setting for only few of the reports. Do you have any idea to achieve this by BO itself without going to .net or java interfaces?
Hi Poovi, this is not really possible. A user could always save the report to PDF or Excel after the WebI format returns (after refresh), but I think you want it to go straight to PDF/Excel and this is not possible.
Thanks for your reply Julian…
Hi Twarit … did youget round the “Object Package failed due to a component scheduling failure” issue you had and, if so, how as I’mgetting the same. Cheers NeilR
Hi-
Thank you for the most simple and straighforward instructions on this that I have seen. Even though I am using XIR3, I was able to adapt the instructions to get me (most of) what I needed.
I successfully scheduled my report and then scheduled my batch file to run (a .bat file) and I get this message when the batch file fails:
Running programs of this type has been disabled by the administrator
Now, I manage the console, but I am learning on the job and I do not have admin rights to the servers. is this something that I need to enable in the CMC or is it something that the server admin needs to allow on the box?
Thanks for any replies 🙂
Patti
Hi PattiNYC, you can adjust this setting in BusinessObjects XI 3.1 by going to CMC. Once logged in CMC, select “Applications”. Right click “CMC” and select “Program Object Settings”. There you will find some options that are enabled by checking boxes the boxes next to them. Check the box for the setting “Run scripts/binaries”. Please let us know if this fixes your issue.
Hi Julian
I am testing below two batch scripts and program object scheduling is working fine only for first batch script. My second batch script is working fine on manual execution but not through program object scheduling even though instance is sucessful. Appreciate your inputs..
Below path is of network shared location
-Rename “Test” excel to MMDDYYYY.xls
1)
for /f “tokens=1-5 delims=/ ” %%d in (“%date%”) do rename “\\gpr\Test\Test.xls” %%e%%f%%g.xls
-Add MMDDYYYY before .xls extension for all excel files in \\gpri\Test\ directory.
2)
:: timestamp MMDDYYYY
@echo off
for /f “delims=” %%a in (‘wmic OS Get localdatetime ^| find “.”‘) do set dt=%%a
set d8=%dt:~4,2%%dt:~6,2%%dt:~0,4%
pushd “\\gpri\Test\”
for /f “delims=” %%a in (‘ dir *.xls /b /a-d ‘) do ren “%%a” “%%~na%d8%%%~xa”
popd
Hi Nilesh, my batch scripting skills are a little less than what I wish they’d be. I can’t think a reason for this to fail. Have you tried commenting out lines and trying line by line to see which one is trouble? The only limit I can think of is if the user account with which you run the BusinessObjects program job server does not have privileges to run one of the commands in your script.
Hi Julian & “Noname”
Many thanks for putting up this article. There is literally very little help on how to configure the Program Objects in Business Objects XI.
Found your tips quite useful. If you could put up screenshots for doing this in 3.1, that’ll be great. Thumbsup!
It’s a good idea to use a batch script in this way to delete a trigger file if you use file events in webi.
I.e. upload your batch script which deletes the trigger file and schedule it to be ran whenever the file event is triggered.
I get
Could not authenticate using the provided operating system credentials.
error for all the user I try..
I even Tried with Enterprise user.
Please advice
Hi VVR, gave you tried using the service account that you are using to run BO? Also, have you tried including the user’s domain. As I recall, I had to use a mortal/personal network/OS account using the domain\username and password.
Yes I tried that.. no luck.
Hi,
I have been trying to find a answer for my query regarding SAP BO Object package and posted in BOBJ forum, but there is no reply. Do you have know about SAP BO object package? My question is:
I have reports with events setup. If I copy them into an object package, will the event settings be retained when copied into an Object package and reports be executed sequentially ?
Any suggestion would be a great help!
Hi Nithya, I am sorry, I really don’t know. I have never tried this.
I need to export a program file from BO CMC XI 3.1. I have exported rpeorts using the view option which comes once i right-click the report, however, this view option does not appear for a Program. I need this since we do not have the source codes.
Thanks in advance
Hello, I am trying to run batch program file in SAP BO 4.0 however it was failed with this error ” The Program Object reported an error while running, but no error code was provided.”