cancel
Showing results for 
Search instead for 
Did you mean: 

Error in JAVA Sdk BI4.1

former_member225386
Participant
0 Kudos


Hi Experts,

I tried to schedule a webi report via JAVA sdk in BI4.1. but while using the below code I getting the error to set the schduleing information and format information.

could anyone help me on this.

IReport oReport = (IReport) oInfoObjects.get(0);

if (oInfoObjects.size() > 0) {

                IReportFormatOptions reportFormat = oReport.getReportFormatOptions();

                int formatType = IReportFormatOptions.CeReportFormat.PDF;

                reportFormat.setFormat(formatType);

                ISchedulingInfo schedInfo = oReport.getSchedulingInfo();

                schedInfo.setRightNow(true);

                schedInfo.setType(CeScheduleType.ONCE);

                infoStore.schedule(oInfoObjects);

                System.out.println("Report has been scheduled.");

                enterpriseSession.logoff();

            }

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member225386
Participant
0 Kudos

Hi,

Thanks for the guidance I managed to create a program to schedule a webi report without prompt.

while I run the java file from netbeans the webi report is scheduled properly what I expected but while I upload the program object(,jar) to CMC and while trying to schedule it getting failed with error message as below(class to run is not specifed) and if I specify the class to run and reschedule it giving me class not found execption did anyone have idea about it?

Please help me on this.

Regards,

Ramesh Jothimani

Former Member
0 Kudos

Hi Ramesh,

IReport gives you an object of crystal reports and not webi reports.

If the infoobjects collection returns webi reports, it should be casted as IWebi.

Also if you have a requirement to schedule webi reports you would want to review the Restful webservice sdks, as scheduling webi reports with prompts is only possible and supported with the Restful webservices. However, simple schedule without prompts can still be achieved with the old enterprise java sdks.

You can find the guides for Restful webservice sdks at

http://help.sap.com

Navigate to Analytics-->Business intelligence--> Business Intelligence Platform(Enterprise)--> SAP BusinessObjects Business Intelligence Platform 4.1--> Development Infomation

Refer to 'SAP BusinessObjects RESTful Web Service SDK User Guide for Web Intelligence and the BI Semantic Layer' guides from the above location as per your SP version.

For any further queries regarding BusinessObjects SDKs, post your queries to the below space which are the correct location for sdk related queries.

For BusinessObjects Java SDKs

http://scn.sap.com/community/bi-platform/java-sdk

For Restful webservice sdk queries

http://scn.sap.com/community/restful-sdk

Thanks,

Prithvi

former_member225386
Participant
0 Kudos

Hi Prithivi,

Could you please help me to get some sample SDK's for webi report schedule as I am new to it and steps to run the sdk as a program object in CMC.

Thanks!

Regards,

Ramesh Jothimani

Former Member
0 Kudos


As you are using BI 4.1, I would like to guide you to Restful webservice sample, as that is the future technology going to be used for webi.

http://scn.sap.com/community/restful-sdk/blog/2014/12/19/schelude-a-webi-document-with-parameters

For further information about restful, refer to the guides location provided in my previous post.

Also there are series of blogs available at

http://scn.sap.com/community/restful-sdk/content#filterID=contentstatus%5Bpublished%5D~objecttype~ob...

As far as your second query goes, for any java file to be treated as a java program object, it should implement the IProgramBase interface.

Refer this http://scn.sap.com/community/bi-platform/java-sdk/blog/2014/08/27/server-status-using-java-program-o...

It can give you a background on how you can create java program objects.

However, one point to note is that, you would not be able to create a java program object for Restful webservices workflow as far as I am aware of.

Thanks,

Prithvi

Former Member
0 Kudos

HI,

There are couple of steps involve in scheduling webi ( or any ) report. We implemeted the schedule feature  in both ways a) through BO 4.0 SDK and BO 4.0 Raylight ( RestFul Web servvice SDK).

Let me give you the steps to schedule webi report using Bo 4.0 SDK. Here you go:

1) You need to first get Enterprise  Session, Inforstore session. Once you have those you need to get instance of  "webi report engine" through "ReportEngine" service.

//snap

oReportEngines = (ReportEngines) enterpriseSession.getService("ReportEngines");

   reportEngine = (ReportEngine) oReportEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);

2) once you have these info, you need get IInfoObjects for your desired webi report.

3) with help of IInfoObjects, get IWebiProcessingInfo for the report

 

webiProcInfo = (IWebiProcessingInfo) iInfoObjects.get(0);

4) Now, if you have any prompts to set for your report, then please set Prompts and schedule your report:

 

// prompt has been set up here

 

documentInstance.setPrompts();

// save your prompt

documentInstance.save();

// get schedule info

ISchedulingInfo scheduleInfo = iWebi.getSchedulingInfo()

// Set schedule to run now.

   scheduleInfo.setRightNow (true);

   // Indicate the report is to be scheduled once only.

   scheduleInfo.setType (0);

   // CMS to schedule the report.

   iWebi.schedule();  // actual schedule happens here

ps: it is only code snap.

Please let me know if you need anything in details.

Thanks

Former Member
0 Kudos

Hi Abhijit,

I need to develop a program in java and not in jsp. Can you help me out with this.

The application has to be developed using SAP BO sdk for WEBI.

Objective:

The objective of the assignment is to develop a java code to automate the recurring instances of webi reports and send it to the specified path.

Customer Requirements:

  • The program must authenticate the user and login using Windows AD authentication type.
  • The values for the prompts and different combinations of the values must be fetched by the program from database/list of values/excel sheet etc.
  • The webi report has to be run for different values of prompts
  • The application developed should support all types of output formats supported by BO.
  • The application should be generic so that it could be run on different webi reports.
former_member225386
Participant
0 Kudos

Hi Bharath,

May I know which version of BO are you using. And could you please help me to get an idea that why you preferred sdk for this requirement.

And may I know that what is the data source for webi reports BEx or unv/unx else?

Thanks!

Regards,

Ramesh Jothimani

Former Member
0 Kudos

I am using the version SAP BusinessObjects BI Platform 4.1 Support Pack 6.

I chose to use sdk as when we schedule the report using bo we need to set the prompt values for each parameter and create instances.

Hence i taught of automating it, where the program can fetch values from some source and run the instances for all the parameters.

Data source is unv