Quantcast
Channel: SCN: Message List - Java SDK Application Development
Viewing all 2284 articles
Browse latest View live

Object's Audit

$
0
0

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





Re: Object's Audit

Re: Object's Audit

$
0
0

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

Re: Error while accessing BO document

$
0
0

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());

Re: Error while accessing BO document

$
0
0

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

Re: Schedule a Webi XIR2 report to run for all values of the prompt ...

$
0
0

Hi,

where I have to write the code posted?

 

Thanks

 

Nico

DIAPI - Using JCO to link Activities and Service Calls

$
0
0

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,

Re: DIAPI - Using JCO to link Activities and Service Calls

$
0
0

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.


Can I create enterprise aliases disabled by default?

$
0
0

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

Re: Can I create enterprise aliases disabled by default?

$
0
0

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

 

Re: Can I create enterprise aliases disabled by default?

$
0
0

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!

Re: BO XI 3.1 Re-schedule failed scheduling job

$
0
0

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:


Title: SDK_TEST
Document Type: Web Intelligence Report
Status Success
Destination: Default
Owner: ****
Creation Time: 5/15/2014 1:53 AM
Start Time: 5/15/2014 1:53 AM
End Time: 5/15/2014 1:53 AM
Duration: 3 sec
Server Used: mdwnew.AdaptiveJobServer
PID: 27131966
Parent Object Path: **********
Remote Instance in Federated Cluster: No
Expiry: 5/15/2024 1:53 AM
Formats: Web Intelligence

 

 

 

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.

using x.509 as authentication token to access BAPI using JCO

$
0
0

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?

Changing BI launch pad preferences using sdk

$
0
0

Hi Experts

 

We want to set the BI launch pad preferences using java sdk.

 

To be specific we want to set the web intelligence preferences in BI launch pad for all users using sdk.

 

 

Web Intelligence Preferences.png                                                                                                       

Please let us know how can we achieve this.What properties need to be set ??

 

Thank you

Re: How to Map Universe to a report in BO4.0 SDK

$
0
0

Thanks a lot Shailendra for this detailed explanation. It helped. I am able to save refreshed reports now.

 

Regards,

Gagan


Re: Need information about SI_TARGETID object property BOXI 3.1 SP6

$
0
0

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

Re: Need information about SI_TARGETID object property BOXI 3.1 SP6

$
0
0

Hi Shailendra,

 

Could you please attach the code, unable to find it.

 

Thanks,

Shubha

Re: Need information about SI_TARGETID object property BOXI 3.1 SP6

$
0
0

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

Re: Using Java/COM SDK to create Universe and DeskI reports in BOBJ 3.1

$
0
0

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. 

How to save value in session.

$
0
0

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.

Viewing all 2284 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>