on 10-22-2014 3:40 AM
Using the DSWS.BIPlatform I can get a WebI report's FRS filename (equivalent to SELECT SI_FILES FROM CI_INFOOBJECTS ) via FileProperties.Files(0).Name
What I can't get is the Path. It really should be in FileProperties.Files(0).Path
This was asked once before, and the answer given was that it's not a good idea to go playing in the FRS.
I agree, but I'm not trying to alter anything, just trying to document where reports live in the FRS in case of disaster. The SAN unit backups are separate to the SQL backups and something may happen.
Besides, if the information is available in the enterprise SDK, shouldn't it be available in the WebServices SDK too ?
Here is a snippet of code I'm using, forgive me if I've missed something obvious.
Dim query As String = "query://{SELECT TOP 1000000 SI_CUID,SI_NAME,SI_PARENT,SI_FILES FROM CI_INFOOBJECTS WHERE SI_KIND = 'WEBI' }"
Dim boResponseHolder As BusinessObjects.DSWS.BIPlatform.ResponseHolder = _wsBIPlatformService.Get(query, Nothing)
If boResponseHolder.InfoObjects IsNot Nothing Then
Dim pd As PagingDetails = boResponseHolder.PagingDetails
For Each pg As PageInfo In pd.PageInfo
Dim pageHolder As BusinessObjects.DSWS.BIPlatform.ResponseHolder = _wsBIPlatformService.Get(pg.PageURI, Nothing)
If (pageHolder.InfoObjects.InfoObject.Length > 0) Then
For Each obj As InfoObject In pageHolder.InfoObjects.InfoObject
_DocumentList.Add(obj.CUID, obj.Name)
Dim DocDetails As New DocumentSummaryDetails
DocDetails.CUID = obj.CUID
DocDetails.Name = obj.Name
DocDetails.FolderCUID = obj.ParentCUID ' FolderName = Folders(obj.ParentCUID)
DocDetails.SIFile = DirectCast(obj, BusinessObjects.DSWS.BIPlatform.Desktop.Webi).FileProperties.Files(0).Name
DocDetails.SIPath = "" ' Need Code Here
I am far, far from any expert on this, so I asked someone that is. Their answer:
Can’t see any way to get this with the SOAP web services. You should be able get the base path to the FRS like Dell showed but the rest of the path to the file is not returned in the DSWS web services.
Just wanted to share so you don't bang your head into the computer too long
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, I suspected as much.
Looks like I'm off to SAP Idea Place again
edit: Here's a link to the idea if anyone wants to vote for it
http://ideas.sap.com/ct/s.bix?c=BB5523E4-062F-4420-B35F-0B1F0D4769A9
I'm not sure how you would do this in the web services - I usually work in the regular SDK. You can't get the path to the FRS from the report - you have to go to the properties of the FRS Server object to get it. I don't have any C# code on this laptop, but here's the code I use in Java (the technique is similar...):
private Boolean getFRSRoot(String repoName) {
Boolean run = true;
String frsRoot = "";
String qry = "Select SI_ID, SI_NAME, SI_HOSTED_SERVICES from CI_SYSTEMOBJECTS where SI_NAME like '%."+ repoName + "FileRepository'";
String defName = String.format("Default%sFRSDir", repoName);
try{
IInfoObjects iobjs = qh.executeRawQuery(qry);
if (iobjs.getResultSize() > 0){
IServer svr = (IServer) iobjs.get(0);
IConfiguredServices cServs = svr.getHostedServices();
Set cServIDs = cServs.getConfiguredServiceIDs();
Integer cServID = (Integer) cServIDs.toArray()[0];
IConfiguredService cSvc = cServs.get(cServID);
IConfigProperties cProps = (IConfigProperties) cSvc.getConfigProps();
frsRoot = (String) cProps.getProp("RootDirectory").getValue();
if (frsRoot.contains(defName)){
int i = svr.getName().indexOf(".");
String nodeName = svr.getName().substring(0, i);
qry = String.format("Select * from CI_SYSTEMOBJECTS where SI_Name='%s'", nodeName);
iobjs = boe.getInfoStore().query(qry);
if (iobjs.getResultSize() > 0){
IEnterpriseNode node = (IEnterpriseNode) iobjs.get(0);
Map<String, String> phs = node.getPlaceholders().getMap();
frsRoot = phs.get(defName);
frsRoot = frsRoot.replace("/", "\\");
}
}
if (!frsRoot.equals("")){
File f = new File(frsRoot);
if (!f.exists()){
logIt("Unable to connect to " + repoName + " File Repository at " + frsRoot, ERROR);
run = false;
} else {
frsRoot = frsRoot + "\\";
logIt("FRS Root Path="+frsRoot, DEBUG);
}
}
}
} catch (SDKException e) {
logIt(e.getDetailMessage(), ERROR);
run = false;
}
if (repoName.equals("Input")){
inFRSRoot = frsRoot;
} else {
outFRSRoot = frsRoot;
}
return run;
}
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.