Hi Experts,
Does any one have a sample sdk where we can pull the reports based on objects.
Ex:How to find the list of webi reports using an "Universe Level Object".
Any help would be appreciated.
Thanks,
Shiva Gunturu
Hi Experts,
Does any one have a sample sdk where we can pull the reports based on objects.
Ex:How to find the list of webi reports using an "Universe Level Object".
Any help would be appreciated.
Thanks,
Shiva Gunturu
Hello Shiva,
Please refer the SAP KBA: 1697606 - How to find out the reports based on Universe using RE BEAN JAVA SDK.
Using the code present in the above referenced SAP Note to find out the reports throughout the enterprise based on which Universe.
Hope it helps.
Thanks,
Shailendra
Thanks a lot for the quick reply sharma.
I'm trying to list all webi reports which are using a particular object
from universe "X" not the universe .
Thanks,
Shiva Gunturu
Thanks for ur response Dell
We are using the below code to fetch the reports.
IInfoObject infoObject = (IInfoObject) infoObj;
DocumentInstance widoc = webiRengine.openDocument(infoObject.getID());
Before you get to this point are you initializing webiRengine with code similar to this?
reportEngines = (ReportEngines)enterpriseSession.getService("ReportEngines");
webiRengine = reportEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
Again, you really need to look at the RESTful web services with OpenDocument instead of using the ReportEngine SDK which, from what I'm hearing, will probably going away with some future update to the software.
-Dell
Hi,
where I have to write the code posted?
Thanks
Nico
I am attempting to use the SAP B1 API to create and attach Activities to Service Calls. I am using the Java connector (sapjco.jar). There is virtually no help available online, other than the API documentation, and I can't locate the sample code that apparently comes as part of the install.
I can use the API to successfully create and update both Activities (IContacts) and Service Calls (IServiceCalls), but I don't know how to link them together. It would make sense if it was done like this
activity.setParentobjectId(call_id)
except this function does not exist.
I guess that maybe I need to use IRelationship, but the API doc says only this:
getRelationships(ICompany aCompany, java.lang.Integer lID)
get Relationships object with specified ID, BoObjectTypes_oRelationships
Is this correct? What should BoObjectTypes_oRelationships be? Is anyone able to give me some guidance please, or at least a useful sample?
Thanks,
I've now found this article which has helped: ServiceCall Activities
Here is a working example in Java:
IContacts a;
try {
a = SBOCOMUtil.newContacts(company.getICompany());
a.setCardCode(activity.getCardCode());
a.setDetails("API TEST!");
a.setNotes("Test");
a.add();
int clgCode = Integer.valueOf(company.getICompany().getNewObjectKey());
System.out.println("NEW CLG CODE: " + clgCode);
IServiceCalls sc = SBOCOMUtil.getServiceCalls(company.getICompany(), activity.getParentId());
IServiceCallActivities sca = sc.getActivities();
sca.add();
sca.setActivityCode(clgCode);
System.out.println("SERVICE CALL UPDATE : " + sc.update());
} catch (SBOCOMException e) {
e.printStackTrace();
}
I've also recreated this code in C# too:
SAPbobsCOM.Contacts act = sapCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oContacts);
act.CardCode="C00694";
act.Details = "API TEST FROM C#";
act.Notes = "Test from C#";
act.Add();
String clgCode = sapCompany.GetNewObjectKey();
SAPbobsCOM.ServiceCalls sc = sapCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oServiceCalls);
sc.GetByKey(338104);
sc.Activities.Add();
sc.Activities.ActivityCode = Convert.ToInt32(clgCode);
MessageBox.Show("UPDATE RESULT: " + sc.Update());
I hope that this helps others.
On another thread I asked How do I create and new enterprise alias?
I was directed to the following SAP Note...
http://service.sap.com/sap/support/notes/1804839
I was able get things working and create enterprise aliases for all of my Windows AD users that don't already have one. The reason I am doing this is so that when they get removed from the active directory group and subsequently BusinessObjects their corresponding inbox, personal folder and any schedules they may have created do not get removed.
So my question is this. Is there any way to create an enterprise alias disabled by default? Here is the code snippet downloaded from the aforementioned note.
I would like to add a line after user.setNewPassword (line #91) that says something like this...
user.setEnabled(false);
However, that isn't working. The method setEnabled is not recogized. I did check the documentation for IUser and cannot find any method to disable an enterprise user. Does such a method exist?
Thanks,
Noel
You can't do this directly on the IUser object - it has to be done on an IUserAlias object. So, your code might look something like this:
IUserAliases uAliases = user.getAliases();
for (Object aobj : uAliases){
IUserAlias alias = (IUserAlias) aobj;
if (alias.getType() == IUserAlias.ENTERPRISE){
alias.setDisabled(disable);
}
}
-Dell
I have no doubt what you are suggesting would work. However, when you mentioned needing to do this on the IUserAlias object I reviewed its documentation and found that the second parameter on the addNew method does exactly what I need. I just had to pass in true rather than false like this...
userAliases.addNew("secEnterprise:" + user.getTitle(), true);
And that worked for me.
Thanks!
Hi Ryan,
Thanks for your reply. I have followed the same sequence but somehow the code is not functioning as expected.
<%@ page import = "com.crystaldecisions.sdk.occa.infostore.*" %>
<%@ page import = "com.crystaldecisions.sdk.framework.CrystalEnterprise" %>
<%@ page import = "com.crystaldecisions.sdk.exception.SDKException" %>
<%@ page import = "com.crystaldecisions.sdk.framework.IEnterpriseSession" %>
<%
// logon information
String boCmsName = "***" ;
String boUsername = "***" ;
String boPassword = "***" ;
String boAuthType = "secEnterprise" ;
// report
String reportName = "SDK_TEST" ;
// logon
IEnterpriseSession ceSession = CrystalEnterprise.getSessionMgr().logon( boUsername, boPassword, boCmsName, boAuthType ) ;
IInfoStore oInfoStore = (IInfoStore)ceSession.getService( "", "InfoStore" ) ;
IInfoObjects oInfoObjects = oInfoStore.query("select top 1 * from ci_infoobjects where SI_NAME='" + reportName + "' " );
IInfoObject oI = (IInfoObject) oInfoObjects.get(0);
IInfoObject oSched = (IInfoObject) oInfoObjects.get(0);
oSched.getSchedulingInfo().setRightNow(true);
oSched.getSchedulingInfo().setType(CeScheduleType.ONCE); oInfoStore.schedule(oInfoObjects);
%>
What is happening here is, report is getting scheduled but it is not sending mail/attachment unlike the original schedule instance.
Below are the details of the rescheduled instance
Quote: |
Now my doubt is can we reschedule the report directly or we need to get all the scheduling info like from/to/events etc and then apply them for the new schedule? I think it will be a tedious job as it could be SMTP or FTP or inbox or anything. |
we are trying to access BAPI using JCO with x.509 certificate. The certificate is passed as a base64 encoded string. But are getting the following exception
Exception in thread "main" com.sap.conn.jco.JCoException: (103) JCO_ERROR_LOGON_FAILURE: Syntax error in received X.509-client certificate (base64-coding)
Properties connectProperties = new Properties(); |
connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR, "01");
connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "500");
connectProperties.setProperty(DestinationDataProvider.JCO_LANG, "en");
//createDestinationDataFile(connectionProperty, connectProperties);
connectProperties.setProperty(DestinationDataProvider.JCO_X509CERT,certStr);
destinationProvider.addDestination(connectionProperty, connectProperties);
destinationProvider.registerDestinationProperty();
JCoDestination destination = JCoDestinationManager.getDestination(connectionProperty);
destination.getRepository();
could somebody help to fix this issue?
Thanks a lot Shailendra for this detailed explanation. It helped. I am able to save refreshed reports now.
Regards,
Gagan
Hi Shubha,
The SI_TARGETID property bag of the report instance/report template is deprecated from the BOXI 3.1 SP4. This issue is already raised & tracked as a bug. I don't think so that this property bag will be existing in future.
For an alternative solution you have to run some test case to take a look that what other property of the report/instance is resembling with SI_TARGETID every time.
Please find the attached code for scheduling a webi report to User's Inbox, you can test it at your end & share your observations with us.
Hope it helps.
Thanks,
Shailendra
Hi Shailendra,
Could you please attach the code, unable to find it.
Thanks,
Shubha
Hi Shubha,
The code is attached below my signature as "scheduleWebiToInbox.txt.zip".
The txt file contains the jsp code, you have to convert the txt file as jsp file & do the necessary changes in it according to your environment.
Thanks,
Shailendra
I am trying to do the same thing. Did you ever get this working?
We want to have a file watcher wait for a new .XML file update the universe or create new ones when the file appears.
Hi Experts,
in BI 4.0 we used the below code to save the variables in session.
strEntry = DocumentHelper.getStorageToken(globalCtx, doc, session,strEntry);
objUtils.setSessionStorageToken(strEntry, strViewerID, session);
But in 4.1 SP3 the "setSessionStorageToken() " method got deprecated.
Please assist me what is the new replacement code for this.
Thanks,
Swetha.