How to retrieve a member set by a certain value?
Hi everyone,
I'm having a problem trying to retrieve a set of entity members that have a certian value in an account.
For a UDA or an attribute there are functions that solve this very problem but I can't figure out how to check on a value.
For example if I'm trying to allocate a value to entities that contain a '1' in account 'Flag' I cannot find a member set function that would work.
"Plan"=@allocate("Revenue"->"Plan",@ismbr("Flag"==1)),&PriorYear->"ACT",,share)
This code doesn't work because the @ismbr function expects a member and not a boolean.
Alternatively would it be possible to save a member selection so that I can loop through all entites and add them to a selection one by one?
Thanks for your help :)
Planning, eh? :)
I think if you took your calc and stood it on it's head, you might get the calc range you want.
Here's my (theoretical) idea.
You're already (I assume) creating a calc block in a calc script/HBR to do the Plan calculation in the first place.
I wonder if this would work:
FIX(level 0 dimension members of whatever dimension)
"Plan"
IF("Flag" == 1)
"Plan" = @ALLOCATE("Revenue"->"Plan", @HIERARCHICALFUNCTION("whatever"), "Revenue"->"ACT"->&PriorYear, , share) ;
ENDIF
ENDFIX
The goal is to have the IF statement trump the range in the @ALLOCATE. I'm not sure it would work but it might be worth a try.
Your @ALLOCATE is really just child member / parent member * basis. You could just roll your own:
FIX(level 0 dimension members of whatever dimension)
"Plan"
IF(@ISMBR("Flag" == 1))
"Plan" = ("Revenue"->"ACT"->&PriorYear / @PARENTVAL(whatever dimension, "Revenue"->"ACT"->&PriorYear)) * "Revenue"->"Plan" ;
ENDIF
ENDFIX
Regards,
Cameron Lackpour
Similar Messages
-
Retrieving the row number where a certain value exists
Hi,
I wanted to find out if there is a way to retrieve the row number of a row where a certain value exists. For example, if I had a query
Create or replace Procedure p1
IS
v_Stmt varchar2(100);
BEGIN
v_Stmt := 'Select * from emp where lname = 'Davis'';
Execute Immediate v_Stmt;
END;
SQL> exec p1;
Then, I would like to find out that this name is on row 3.
Can anyone tell me how this can be done?
Thanks in advance.
Sincerely,
Nikhil Kulkarnitheres is no rownum related to a particular row. A rownum is a pseudocolumn which value may be different for the same row depending on the query you do. What you can use is the rowid which is the row's address.
HTH
Maurice -
How i retrieve the default setting for my browser ?
when i download any file from firefox browser there a small box that ask you if you want to from your browser to do the same action for files like the file you are downloaded automatically,
i did that and i wont to retrieve the old sitting i tried to reinstall the browser but it doesn't worked! so any suggestion?The instructions in [[Resetting preferences]] explain how to reset all your preferences back to the defaults.
-
Rules: How to retrieve Custom1 member value
I am trying to debug HFM rule file in order to see what values certain paramter take on.
For instance I am using below command where I am writing 3 items into a file.
WriteDebug Now(), "E#" & vEntity & "a#MASP10", "= " & HS.GetCell("A#MASP10.W#Periodic")
(1) the first one is the date/time stamp
(2) the second one a description (entity and account) and
(3) the third one the actual value.
What is the command so as to see what value Custom1 dimension has ?
I tried to include HS.Custom1.Member() but it did not give me a value for custom1.
This is what I tried:
WriteDebug Now(), "E#" & vEntity & "C1#" & HS.Custom1.member() & "a#MASP10", "= " & HS.GetCell("A#MASP10.W#Periodic")
Thx,
SilvioThere is only a current custom 1 member of you are looping through a list or data unit. Otherwise there is only current scenario, year, period, entity and value.
-
How to retrieve data from a table that match values in a varray?
Using - Oracle 10g Release 1.2
How to do write a sql to retrieve data matching values in a varray?
I have the following:
declare
v_ct NATURAL := 0;
type t_cur is REF CURSOR;
v_cursor t_cur;
TYPE t_array IS VARRAY(100) OF NUMBER;
l_codes t_array := t_array();
begin
select count(*)
into v_ct
from table1
where ind_cd IS NULL;
IF v_ct = 0 THEN
l_codes(1) := 1;
END IF;
select count(*)
into v_ct
from table2
where cd IS NULL;
IF v_ct = 0 THEN
l_codes(2) := 2;
END IF;
OPEN v_cursor for
select * from error_table where error_cd in (SELECT * FROM TABLE(CAST(l_codes AS t_array)) );
end;This may not answer your question, but what about a pure SQL solution?
NOTE THIS IS UNTESTED:
SELECT *
FROM ERROR_TABLE
WHERE ERROR_CD IN
SELECT 1
FROM table1
HAVING COUNT(*) > 0
UNION ALL
SELECT 2
FROM table2
HAVING COUNT(*) > 0
)HTH! -
How to Export local security setting all filed name & value against filed.
HI all,
I am trying to export local security setting from local policy using bellow scrip. but it is showing only these are configured. I need expert help which allowed me to export all filed with value where it is configure or not. Please give me.
$output=@()
$temp = "c:\"
$file = "$temp\privs.txt"
[string] $readableNames
$process = [diagnostics.process]::Start("secedit.exe", "/export /cfg $file /areas USER_RIGHTS")
$process.WaitForExit()
$in = get-content $file
foreach ($line in $in) {
if ($line.StartsWith("Se")) {
$privilege = $line.substring(0,$line.IndexOf("=") - 1)
switch ($privilege){
"SeCreateTokenPrivilege " {$privilege = "Create a token object"}
"SeAssignPrimaryTokenPrivilege" {$privilege = "Replace a process-level token"}
"SeLockMemoryPrivilege" {$privilege = "Lock pages in memory"}
"SeIncreaseQuotaPrivilege" {$privilege = "Adjust memory quotas for a process"}
"SeUnsolicitedInputPrivilege" {$privilege = "Load and unload device drivers"}
"SeMachineAccountPrivilege" {$privilege = "Add workstations to domain"}
"SeTcbPrivilege" {$privilege = "Act as part of the operating system"}
"SeSecurityPrivilege" {$privilege = "Manage auditing and the security log"}
"SeTakeOwnershipPrivilege" {$privilege = "Take ownership of files or other objects"}
"SeLoadDriverPrivilege" {$privilege = "Load and unload device drivers"}
"SeSystemProfilePrivilege" {$privilege = "Profile system performance"}
"SeSystemtimePrivilege" {$privilege = "Change the system time"}
"SeProfileSingleProcessPrivilege" {$privilege = "Profile single process"}
"SeCreatePagefilePrivilege" {$privilege = "Create a pagefile"}
"SeCreatePermanentPrivilege" {$privilege = "Create permanent shared objects"}
"SeBackupPrivilege" {$privilege = "Back up files and directories"}
"SeRestorePrivilege" {$privilege = "Restore files and directories"}
"SeShutdownPrivilege" {$privilege = "Shut down the system"}
"SeDebugPrivilege" {$privilege = "Debug programs"}
"SeAuditPrivilege" {$privilege = "Generate security audit"}
"SeSystemEnvironmentPrivilege" {$privilege = "Modify firmware environment values"}
"SeChangeNotifyPrivilege" {$privilege = "Bypass traverse checking"}
"SeRemoteShutdownPrivilege" {$privilege = "Force shutdown from a remote system"}
"SeUndockPrivilege" {$privilege = "Remove computer from docking station"}
"SeSyncAgentPrivilege" {$privilege = "Synchronize directory service data"}
"SeEnableDelegationPrivilege" {$privilege = "Enable computer and user accounts to be trusted for delegation"}
"SeManageVolumePrivilege" {$privilege = "Manage the files on a volume"}
"SeImpersonatePrivilege" {$privilege = "Impersonate a client after authentication"}
"SeCreateGlobalPrivilege" {$privilege = "Create global objects"}
"SeTrustedCredManAccessPrivilege" {$privilege = "Access Credential Manager as a trusted caller"}
"SeRelabelPrivilege" {$privilege = "Modify an object label"}
"SeIncreaseWorkingSetPrivilege" {$privilege = "Increase a process working set"}
"SeTimeZonePrivilege" {$privilege = "Change the time zone"}
"SeCreateSymbolicLinkPrivilege" {$privilege = "Create symbolic links"}
"SeDenyInteractiveLogonRight" {$privilege = "Deny local logon"}
"SeRemoteInteractiveLogonRight" {$privilege = "Allow logon through Terminal Services"}
"SeServiceLogonRight" {$privilege = "Logon as a service"}
"SeIncreaseBasePriorityPrivilege" {$privilege = "Increase scheduling priority"}
"SeBatchLogonRight" {$privilege = "Log on as a batch job"}
"SeInteractiveLogonRight" {$privilege = "Log on locally"}
"SeDenyNetworkLogonRight" {$privilege = "Deny Access to this computer from the network"}
"SeNetworkLogonRight" {$privilege = "Access this Computer from the Network"}
$sids = $line.substring($line.IndexOf("=") + 1,$line.Length - ($line.IndexOf("=") + 1))
$sids = $sids.Trim() -split ","
$readableNames = ""
foreach ($str in $sids){
$str = $str.substring(1)
$sid = new-object System.Security.Principal.SecurityIdentifier($str)
$readableName = $sid.Translate([System.Security.Principal.NTAccount])
$readableNames = $readableNames + $readableName.Value + ", "
$output += New-Object PSObject -Property @{
privilege = $privilege
readableNames = $readableNames.substring(0,($readableNames.Length - 1))
#else = $line."property"
$outputAs an alternate approach wee can preset the hash and just update it. This version also deal with trapping the errors.
function Get-UserRights{
Param(
[string]$tempfile="$env:TEMP\secedit.ini"
$p=Start-Process 'secedit.exe' -ArgumentList "/export /cfg $tempfile /areas USER_RIGHTS" -NoNewWindow -Wait -PassThru
if($p.ExitCode -ne 0){
Write-Error "SECEDIT exited with error:$($p.ExitCode)"
return
$selines=get-content $tempfile|?{$_ -match '^Se'}
Remove-Item $tempfile -EA 0
$dct=$selines | ConvertFrom-StringData
$hash=@{
SeCreateTokenPrivilege =$null
SeAssignPrimaryTokenPrivilege=$null
SeLockMemoryPrivilege=$null
SeIncreaseQuotaPrivilege=$null
SeUnsolicitedInputPrivilege=$null
SeMachineAccountPrivilege=$null
SeTcbPrivilege=$null
SeSecurityPrivilege=$null
SeTakeOwnershipPrivilege=$null
SeLoadDriverPrivilege=$null
SeSystemProfilePrivilege=$null
SeSystemtimePrivilege=$null
SeProfileSingleProcessPrivilege=$null
SeCreatePagefilePrivilege=$null
SeCreatePermanentPrivilege=$null
SeBackupPrivilege=$null
SeRestorePrivilege=$null
SeShutdownPrivilege=$null
SeDebugPrivilege=$null
SeAuditPrivilege=$null
SeSystemEnvironmentPrivilege=$null
SeChangeNotifyPrivilege=$null
SeRemoteShutdownPrivilege=$null
SeUndockPrivilege=$null
SeSyncAgentPrivilege=$null
SeEnableDelegationPrivilege=$null
SeManageVolumePrivilege=$null
SeImpersonatePrivilege=$null
SeCreateGlobalPrivilege=$null
SeTrustedCredManAccessPrivilege=$null
SeRelabelPrivilege=$null
SeIncreaseWorkingSetPrivilege=$null
SeTimeZonePrivilege=$null
SeCreateSymbolicLinkPrivilege=$null
SeDenyInteractiveLogonRight=$null
SeRemoteInteractiveLogonRight=$null
SeServiceLogonRight=$null
SeIncreaseBasePriorityPrivilege=$null
SeBatchLogonRight=$null
SeInteractiveLogonRight=$null
SeDenyNetworkLogonRight=$null
SeNetworkLogonRight=$null
for($i=0;$i -lt $dct.Count;$i++){
$hash[$dct.keys[$i]]=$dct.Values[$i].Split(',')
$privileges=New-Object PsObject -Property $hash
$privileges
Get-UserRights
A full version would be pipelined and remoted or, perhaps use a workflow to access remote machines in parallel.
¯\_(ツ)_/¯ -
How to retrieving latest row based on a column value
Hi,
Lets consider a scenario. I have a table which has a order number, count column which is our fact, a type column which contains types e.g. (A,B) with A has more priority then B. Now in our graph we are getting all rows i.e. if we have two rows in db for order #1 one for type A and one for type B, then it shows us data from both rows in graph.
But I need only to show one row of type A in this case as A has higher priority than B. The row with type B should not contribute in construction of my graph if type A for same row also exists.
I tried a solution, for which i created a new column at logical level which contain 1 for A and 0 for B. Now i put Max aggregation rule in it to get maximum value which will be row with Type A in our case. But it did not work.
How we will can achieve it in OBIEE?
Thanks.
Aasim Khan.Hi Steve,
I have a similar requirement... one of the columns in my table is a calculated value based on several xml fields,
<?xdofx:(MATH01+MATH02+MATH03+MATH04+MATH05+AA+AA1)+((FNDCD01+FNDCD02+FNDCD03+FNDCD04+FNDCD05+MCHCD01+MCHCD02) div '8')?>
if the resultant value above is less than 62, i do no want to display this entire row in the output. could you help me wout with this?
thanks
Domnic -
How to retrieve workbook's "Last Refreshed" value using VBA?
Does anyone know how to retrieve a BEx workbook's "Last Refreshed" value using VBA?
What I've done is expand upon a colleague's existing Excel VBA solution to automatically log into SAP BEx and batch process (and also schedule) the running of multiple BEx reports. As each BEx report in the queue is processed, the results of the run are written to a "Results" worksheet -- indicating whether that BEx report was processed successfully or not. I'm pretty much done, and everything works like a charm.
Except I have one little problem remaining: during the processing of each BEx report, the SAP BEx status dialog appears, giving the user the ability to cancel the processing of that particular report, if they so desire. If the user cancels, I want my "Results" worksheet to indicate that for that report.
At first, I thought, okay, I'll just test the return value when calling the SAPBEX.XLA's SAPBEXrefresh function. That function's return value is supposed to return the number of errors that occurred after each time SAPBEXrefresh is fired -- normally it's 0 if everything runs okay. So surely, if the user cancels, there's got to be some sort of error and the return value of SAPBEXrefresh would be > 0, right? Nope, no such luck!
Which brings me back to my question in this post -- I found out through my company's SAP consultant that, if the user hits cancel in the SAP BEx dialog, the "Last Refreshed" value will not change. Therefore, he told me, simply test the value of the "Last Refreshed" value before and after each BEx reports' run. If the "Last Refreshed" value doesn't change, then presto, you know the user canceled.
This is where I'm stuck. How do you programmatically get the "Last Refreshed" value? Obviously, you could write VBA code to find the first cell in the BEx report with the text "Last Refreshed" and then get the value in the adjoining cell. The problem with that is, what if, for some stupid reason, there's another cell somewhere in the BEx report with the text, "Last Refreshed". There's no way I can be sure that I've really found the "Last Refreshed" value plugged in by BEx.
I've been looking extensively in this forum for an answer, but haven't found any. It seems like there are a lot of SAP BEx experts here, and if anyone can help me out here, I would greatly appreciate it.
Thank you.Well, it was a little circuitous, but I figured out the solution to my own question.
I recalled I had read about the sapbexDebugPrint macro in sapbex.xla in one of Peter Knoer's posts in this forum. So I thought, maybe I can use that to get the before and after refresh values of "Last Refreshed" in the workbook. Well, I was half-right: I could only use sapbexDebugPrint to get the workbook's after-refresh values of "Last Refreshed".
But it didn't matter!
As long as the after-refresh value of the workbook's "Last Refreshed" value was later than the after-refresh value of the previous workbook in the processing queue, I knew the refresh was successful and the user didn't cancel. There were some other logic permutations I had to factor in, but basically that was the answer.
Here are snippets of my code from the main procedure, for anyone's who interested:
' **** Refresh query ************************************
' Get the previous "Last Refreshed" value
' We're going to need to compare this to the "Last Refreshed" value
' after running SAPBEXrefresh function to trap the possibility of
' the user canceling via the SAPBEx status dialog box
PrevLastRefr = GetLastRefreshed()
' Reactivate the source workbook, just in case
SourceWorkbook.Activate
RefreshRetVal% = Application.Run("SAPBEX.XLA!SAPBEXrefresh", True, , False)
If RefreshRetVal% <> 0 Then
blnProcessingErr = True
End If
' Get the current "Last Refreshed" value and compare it to the previous value
CurrLastRefr = GetLastRefreshed()
If CurrLastRefr = "NOT FOUND" Then
' Refresh canceled
blnProcessingCanceled = True
Else ' We found a valid current "Last Refreshed" value
If PrevLastRefr = "NOT FOUND" Then
' Refresh okay
blnProcessingCanceled = False
Else
If CDate(CurrLastRefr) > CDate(PrevLastRefr) Then
' Current "Last Refreshed" value is later than previous value,
' so refresh okay
blnProcessingCanceled = False
Else
' Refresh canceled
blnProcessingCanceled = True
End If
End If
End If
' Reactivate the source workbook, just in case
SourceWorkbook.Activate
And here's my function which retrieves the "Last Refreshed" value by calling sapbexDebugPrint macro in sapbex.xla:
Function GetLastRefreshed() As Variant
' Get the SAP BEx "Last Refreshed" value by calling
' SAPBEx.xla's sapbexDebugPrint procedure and creating
' the special diagnostic workbook.
On Error GoTo GetLastRefreshed_Error
Dim TextCell As Range
Dim TextCellAddr$
Dim TextCellRow%, TextCellCol%
Dim LastRefreshedVal As Variant
Dim NumWorkbooks%
' Initialize
GetLastRefreshed = "NOT FOUND"
LastRefreshedVal = "NOT FOUND"
' Turn off screen updating until the end
Application.ScreenUpdating = False
' Get the number of currently open workbooks
NumWorkbooks% = Workbooks.Count
' Call the SAPBEx.xla's sapbexDebugPrint procedure
' This'll create a diagnostic workbook with all the information
' about the BEx query that was previously refreshed
Application.Run "SAPBEX.XLA!sapbexDebugPrint"
' Let's double-check that the diagnostic workbook actually
' got created
' If there's any error at this point or if the number of workbooks
' isn't more than it was a moment ago, raise custom error
If (Err.Number <> 0) Or (Not (Workbooks.Count > NumWorkbooks%)) Then
Err.Raise vbObjectError + 513, , "sapbexDebugPrint failed to create the diagnostic workbook"
End If
' We'll need to look at a worksheet named "E_T_TXT_SYMBOLS"
' in the diagnostic workbook
' If this worksheet doesn't exist, then we know that there
' was no previously refreshed query during this session
' (We could loop through the collection of worksheets in the workbook
' to see if that worksheet actually exists, but we'll use
' error handling to deal with this instead)
' Find the first cell in the "E_T_TXT_SYMBOLS" worksheet
' with the text "Last Refreshed"
' (If the worksheet doesn't exist, an error will be thrown...)
Set TextCell = Sheets("E_T_TXT_SYMBOLS").Cells.Find(What:="Last Refreshed", _
LookIn:=xlValues)
If TextCell Is Nothing Then
' Can't find the cell, so we know the user had canceled during previous refresh
LastRefreshedVal = "NOT FOUND"
Else
' Found the cell, now we're in business
TextCellAddr$ = TextCell.Address ' $F$11
TextCellRow% = CInt(Mid(TextCellAddr$, InStr(2, TextCellAddr$, "$") + 1))
TextCellCol% = ColRef2ColNo(Mid(TextCellAddr$, 2, InStr(2, TextCellAddr$, "$") - 2))
' The cell with the "Last Refreshed" value is going to be 2 columns to the right
LastRefreshedVal = Sheets("E_T_TXT_SYMBOLS").Cells(TextCellRow%, TextCellCol%).Offset(0, 2).Value
' Ensure the "Last Refreshed" value is a valid date/time
If Not IsDate(LastRefreshedVal) Then LastRefreshedVal = "NOT FOUND"
End If
GetLastRefreshed_Exit:
' Err.Number -2147220991 is my custom raised error:
' "sapbexDebugPrint failed to create the diagnostic workbook"
If Err.Number <> -2147220991 Then
' Close the diagnostic workbook and return Last Refreshed value
Workbooks(ActiveWorkbook.Name).Close SaveChanges:=False
GetLastRefreshed = LastRefreshedVal
End If
Application.ScreenUpdating = True ' Turn on screen updating
Exit Function
GetLastRefreshed_Error:
Select Case Err.Number
Case 9 ' Subscript out of range (which means "E_T_TXT_SYMBOLS" worksheet doesn't exist)
LastRefreshedVal = "NOT FOUND"
Case Else
MsgBox "Error encountered during getting Last Refreshed value." & vbCrLf & vbCrLf & _
"Error: " & Err.Number & " - " & Err.Description, vbExclamation, gstrErrBoxTitle
End Select
Resume GetLastRefreshed_Exit
End Function
Like I said, the solution was a little circuitous, but it works! -
How To Retrieve an Object's Value Defined Using c:set ... Tag?
I have the value of a variable defined in JSP#1 (JSP#1 is not a form) using JSTL tag:
<c:set var="id" value="${articleForm.article}" scope="session"/>Now, I have an object 'id' in the session scope. The object 'id' and all the information, which are defined in JSP#1, are forwarded to JSP#2.
JSP#2 is a form. But, the 'id' is not used in JSP#2.
JSP#2 has a submit button and then, a servlet takes over the control after that button is clicked. All the text fields in JSP#2 together with the object 'id' are forwarded to this servlet.
I have two questions:
1. I should put this object 'id' in a request scope or a session scope? Currently, it is in a session scope.
2. How to retrieve the value of this object 'id' in this servlet? (I do not want to print the value out. I want to retrieve the value and store it in a database.)
int articleID = Integer.parseInt( session.getAttribute( "id" ) ); or, it should be retrieved in another way?I'm not sure you understand the concept of a session object.
Java objects stay on the server. There is no transmission between the web browser and the client.
The scope just sets how long the server "remembers" that variable.
request scope - only lasts one request. Once a web page is returned to the client, the server forgets all request variables.
session scope - lasts for one user - across multiple requests/web pages.
1. I should put this object 'id' in a request scope or a session scope? Currently, it is in a session scope.From your description, you appear to have it right - your object should be in session scope.
2. How to retrieve the value of this object 'id' in this servlet? (I do not want to print the value out. I want to retrieve the value and store it in a database.)If articleForm.article is an String then that looks the right way to access it.
You might have to do it like this:
int articleID = Integer.parseInt( (String)session.getAttribute("id"));
The Integer.parseInt method takes a String as a parameter - while session.getAttribute() returns an Object.
This code will work if the object stored in the session is a String.
The object stored in the session is ${articleForm.article} What type does articletForm.getArticle() return? That is the type you need to cast it to when retrieving it from the session.
Cheers,
evnafets -
I plugged into iTunes and now all my notes on my phone are gone. Years worth of notes that I stupidly don't have saved anywhere else. Can someone tell me what to do to get them back?? I have iTunes set to back them up but can't find out how to retrieve them.I plugged into iTunes and now all my notes on my phone are gone. Years worth of notes. Can someone tell me what to do to get them back?? I have iTunes set to back them up but can't find out how to retrieve them.
After you restore from backup, you MUST sync to restore your iTunes content. No iTunes content is included in the iPhone backup. Your apps should be in your iTunes library, just sync them back to your phone. If for some reason your apps are not in your library, you can re-download them for free:
http://support.apple.com/kb/ht2519 -
How to retrieve ilife/iwork pre-installed apps on my iphone 6 plus after factory setting reset.
Hello arielfernan24,
You can access previously purchased or downloaded content by following the steps in this article:
Download past purchases - Apple Support
Thank you for contributing to Apple Support Communities.
Cheers,
Bobby_D -
How to Retrieve a Crystal Report's Unmanaged Destination Filename
Hi all,
I have looked very closely at Robert Twigg's response to the post "[Destination Path and name of a scheduled Report|http://forums.sdn.sap.com/thread.jspa?messageID=9588160#9588160]" dated 9/1/10 and while it does retrieve the unmanaged destination path, the filename retrieved is the managed filename. How does one go about retrieving an instance's unmanaged filename?
When I look at a Crystal Report instance details, it definitely knows what the unmanaged filename that was populated, here is a sample instance detail:
External Destination: File copy the instance with the filename: "ALOG_Deferred_Clearing_RPT_2011-12-13-11-43-09.pdf" to the folder: "/apps/efs_bobj/IMPL/XX" .
As you can clearly see, the filename consists of report name, date, and time that was specified as "%SI_NAME%_%SI_STARTTIME%.%EXT%" in the destination filename.
Here's the snippet to retrieve the managed filename:
IInfoObject report = (IInfoObject) reports.get(0);
// Get the file name from the instance.
IFiles files = (IFiles) report.getFiles();
IFile file = (IFile) files.get(0);
Any insight on how to retrieve an instance's unmanaged filename would be highly appreciated.
Thanks in advance,
Hart Penn
Edited by: hartpenn on Dec 14, 2011 2:14 PM
Edited by: hartpenn on Dec 14, 2011 2:15 PM
Edited by: hartpenn on Dec 14, 2011 2:19 PMThank you for your response. I am querying for the report instances using the query below:
IInfoObjects iRptObjects = infoStore.query("SELECT * FROM CI_INFOOBJECTS " +
"Where SI_KIND='Pdf' AND " +
"SI_INSTANCE>0 ");
Collection<IInfoObject> iRptObjs = iRptObjects;
for (IInfoObject iRptObj : iRptObjs) {
ISchedulingInfo iSchedInfo = iRptObj.getSchedulingInfo();
IEvents triggerEvents = iSchedInfo.getDependants();
if (triggerEvents.size() > 0) {
for (int j=0; j < triggerEvents.size(); j++) {
IInfoObjects events = (IInfoObjects)infoStore.query("SELECT * FROM CI_SYSTEMOBJECTS " +
"Where SI_KIND='Event' AND " +
"SI_ID=" + (Integer) triggerEvents.get(j));
if (events.size() > 0) {
IEvent curEvent = (IEvent)events.get(0);
IDestinationPlugin destPlugin =
(IDestinationPlugin) infoStore.query("Select Top 1* from CI_SYSTEMOBJECTS " +
"Where SI_NAME = 'CrystalEnterprise.DiskUnmanaged'").get(0);
IDestinations dests = iSchedInfo.getDestinations();
Collection<IDestination> destObjs = dests;
if (dests.size() > 0) {
// we have a dest set up
for (IDestination destObj : destObjs) {
if (destObj.getName().compareTo("CrystalEnterprise.DiskUnmanaged") == 0) {
// Copy the destination properties to the destination plugin.
destObj.copyToPlugin(destPlugin);
// Get the scheduling options for the unmanaged disk.
IDiskUnmanagedOptions diskUnmanagedOptions =
(IDiskUnmanagedOptions) destPlugin.getScheduleOptions();
// Get the destination files
List destFiles = diskUnmanagedOptions.getDestinationFiles();
String pathName = (String)destFiles.get(0);
IFiles iFiles = (IFiles) iRptObj.getFiles();
IFile myFile = (IFile) iFiles.get(0);
logger.debug("Object: " + iRptObj.getTitle() +
", ID: " + iRptObj.getID() +
", Kind: " + iRptObj.getKind() +
", Trigger Event: " + curEvent.getEventName());
logger.debug("Dest: " + pathName);
logger.debug("Filename: " + myFile.getName());
while this is not efficient, it does retrieve the instances. However, the file name returned is not what was specified in the destination filename. Here is some info returned and displayed:
Object: ALOG_Deferred_Clearing_RPT, ID: 128776, Kind: Pdf, Trigger Event: EVT_121311_114308
Dest: /apps/efs_bobj/IMPL/XX/%SI_NAME%_%SI_STARTTIME%.%EXT%
FileName: ~ce46086dd492ac788.pdf
As you can see, the filename is clearly the managed filename.
Edited by: hartpenn on Dec 14, 2011 3:43 PM
Edited by: hartpenn on Dec 14, 2011 4:02 PM
Edited by: hartpenn on Dec 14, 2011 4:03 PM
Edited by: hartpenn on Dec 14, 2011 4:17 PM
Edited by: hartpenn on Dec 14, 2011 4:26 PM
Edited by: hartpenn on Dec 14, 2011 4:27 PM
Edited by: hartpenn on Dec 14, 2011 4:28 PM -
How to retrieve a page item value in another page?
Hi,
how to retrieve a page item value in another page?
say P55_COURSES_TO_EVALUATE is my page item name and it is a select list.Based on the value selected,in the next page i shd show details related to the selected value and for this i need P55_COURSES_TO_EVALUATE value in the next page.How Do I get it?When I try to retrieve the values it simply returns nothing.
Any pointers would be really helpful.
Thanks in advance.Hi,
Could you please tell how you try use it ?
If you set value to item P55_COURSES_TO_EVALUATE and submit page, value is saved to session state.
Then you can use that item in any page like
:P55_COURSES_TO_EVALUATEYou can not access page value in javascript/jQuery from other pages like
$v('P55_COURSES_TO_EVALUATE')
document.getElementbyID('P55_COURSES_TO_EVALUATE')
$(#P55_COURSES_TO_EVALUATE)Because item is not in other pages. In javascript from other pages you can use
var a = '&P55_COURSES_TO_EVALUATE.';Regards,
Jari -
My music files etc were all located on my old laptop which was stolen. I have just plugged my iphone in to my new computer and it has deleted all my files. Has anybody got any ideas on how to retrieve the files?
WINDOWS?
Connect the iPod to your PC. If iTunes starts syncing (ie erasing) your music automatically, hit the X in the upper right hand corner of iTunes display, to the left of the search box, to stop it.
In Control Panel, Portable Media Devices, double-click your iPod.
In the Tools menu -> Options, in the View Tab, check "Show hidden files and folders."
Navigate to the Music folder. On my 'pod, the full path is
Portable Media Devices\NAME of IPOD (F:)\iPod_Control\Music
Select all the music folders, and drag and drop them into a folder on your hard drive, or directly into iTunes.
And you're done! The iPod music folder structure is strange and inexplicable, but once you move your files into iTunes you can set it to automatically organize your folder by artist and album to clean that up. (To do this, in iTunes Edit menu, choose Preferences and in the Advanced tab, check "Keep iTunes Music Folder organized."
might be out of date worth a try -
How to retrieve the data from SAP-BAPI by using VB Code
Hi ,
I am new to BAPI.
V have created an application in Visual Basic with the following fields
EmpNo , EmpName, Addr1, Addr2, City and Phone (Only for Test)
We have written the code for SAVING the data into SAP. Already we have
constructed a table with the respective fields in SAP.
For that we ourself created our own BAPI Structure / Function Group /
Function Module/ Business Object - RELEASED related elements.
1)Established the connection successfully.
2)Stored the data into SAP Successfully and v r in need of
3)HOW TO RETRIEVE THE DATA FROM SAP (USING GETLIST.....GETDETAIL....)
Following is the code :
'BAPI Structure : ZBAPIEMP
'Function Group : ZBAPIEMP
'Function Module : ZBAPI_EMP_CREATEFROMDATA
'Business Object : ZBAPIEMP
'Function Module : ZBAPI_EMP_GETLIST
Dim bapictrl As Object
Dim oconnection As Object
Dim boEmp As Object
Dim oZEmp_Header As Object
Dim oImpStruct As Object
Dim oExpStruct As Object
Dim oreturn As Object
Dim x As String
Private Sub Form_Load()
Set bapictrl = CreateObject("SAP.BAPI.1")
Set oconnection = bapictrl.Connection
oconnection.logon
Set boEmp = bapictrl.GetSAPObject("ZBAPIEMP")
Set oZEmp_Header = bapictrl.DimAs(boEmp, "CreateFromData", "EmployeeHeader")
Set oImpStruct = bapictrl.DimAs(boEmp, "GetList", "EmployeeDispStruct")
End Sub
Private Sub cmdSave_Click()
oZEmp_Header.Value("EMPNO") = txtEmpNo.Text
oZEmp_Header.Value("EMPNAME") = txtEmpName.Text
oZEmp_Header.Value("ADDR1") = txtAddr1.Text
oZEmp_Header.Value("ADDR2") = txtAddr2.Text
oZEmp_Header.Value("CITY") = txtCity.Text
oZEmp_Header.Value("PHONE") = txtPhone.Text
boEmp.CreateFromData EmployeeHeader:=oZEmp_Header, Return:=oreturn
x = oreturn.Value("Message")
If x = "" Then
MsgBox "Transaction Completed!..."
Else
MsgBox x
End If
End Sub
Private Sub cmdView_Click()
End Sub
COULD ANYBODY GUIDE ME, HOW TO RETRIEVE THE DATA FROM BAPI, FOR THE WRITTEN CODE.I didn't seen any other answers but here's how it's been done previously in our organization for a custom BAPI. In this example, we give material and language to return the part description. It's not specific to your project but may give you ideas..
-Tim
Option Compare Database
Dim SAPLOGIN As Boolean
Dim FunctionCtrl As Object
Dim SapConnection As Object
Sub SAPLOGOUT()
On Error GoTo LogoutFehler
SapConnection.logoff
SAPLOGIN = False
Exit Sub
LogoutFehler:
If Err.Number = 91 Then
Exit Sub
Else
MsgBox Err.Description, vbCritical, "Fehler-Nr." & CStr(Err.Number) & " bei SAP-Logout"
End If
End Sub
Function SAPLOG() As Boolean
'Verbindungsobjekt setzen (Property von FunctionCtrl)
Set FunctionCtrl = CreateObject("SAP.Functions")
Set SapConnection = FunctionCtrl.Connection
'Logon mit Initialwerten
SapConnection.Client = "010"
SapConnection.Language = "EN"
SapConnection.System = "PR1"
SapConnection.SystemNumber = "00"
'SapConnection.Password = ""
SapConnection.GroupName = "PR1"
SapConnection.HostName = "168.9.25.120"
SapConnection.MessageServer = "168.9.25.120"
If SapConnection.Logon(0, False) <> True Then 'Logon mit Dialog
Set SapConnection = Nothing
DoCmd.Hourglass False
MsgBox "No connection to SAP R/3 !"
SAPLOGIN = False
SAPLOG = False
Exit Function
End If
SAPLOG = True
End Function
Function MatDescr(MatNr As String)
Dim func1 As Object
Dim row As Object, X As Integer, ErsteNr As String
Dim DatensatzZähler As Long
Dim RowField(1 To 50, 0 To 1) As String, RowLine As Long
If Not SAPLOGIN Then
If Not SAPLOG() Then
MsgBox "No connection to SAP !", 16
SAPLOGOUT
Exit Function
End If
End If
' Instanziieren des Function-Objektes
Set func1 = FunctionCtrl.Add("Z_BAPI_READ_MAKT")
' Export-Paramter definieren
func1.exports("MATNR") = MatNr
func1.exports("SPRAS") = "EN"
DoEvents
If Not func1.call Then
If func1.exception <> "" Then
MsgBox "Communication Error with RFC " & func1.exception
End If
DoCmd.Hourglass False
SAPLOGOUT
Exit Function
Else
MatDescr = func1.imports("MAKTX")
End If
If MatDescr = "" Then
MatDescr = "PART NO. NOT FOUND"
End If
End Function
Maybe you are looking for
-
Master iPad configurator question concerning cart syncing with different versions of iPads.
I have a question concerning configurator syncing.Can the master iPad be a different version of iPad than the other synced iPads? For instance can iPad 2 be the master iPad to a group of iPad Air's? The iPad 2 has some fewer capabilities than the Air
-
Photoshop CC Updates screen is all greyed out!
Hi, I bought Photoshop and Lightroom CC in the adobe offer last month. But I dont see the updates happening. When I goto photoshop and click on UDPATES, its all greyed out. See this screenshot, https://www.dropbox.com/s/pwtsr2drjqwvti9/Screen%20Shot%
-
Help with caption box question
Hi all I've got a slide where I've said "click here to see where the Forward button". When a user clicks the click box over this text I want a caption to appear in another area on the screen saying "This is the Forward button". How do I link the two
-
Hi, I'm sorry to post my question here,I just don't know where to the proper location for this one. By anyway, if somebody to help me out here it would be great and I will deeply appreciate it. We are testing the oracle times-time database cache on o
-
Lack of attention to nokia's user
Please, I want to draw your attention on the fact that in Spain the aftersale service for nokia does not exist. In my bad experience I have bought a nokia telephon (6630) and I have just started to use it during last week and it has fault.....I love