cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete objects in a user's inbox in BO 4.0

joseluisleitao
Explorer
0 Kudos

Is there an equivalent SAP note to "1367065 - How to delete objects in a user's inbox in BOXI 3.1?" for BO 4.0?

Is there an alternative process to automatically delete old reports in each users BI Inbox that doesn't require the use of the SDK?

Regards,

Jose Luis Leitao

View Entire Topic
CdnConnection
Active Contributor
0 Kudos

Jose,

      Currently we have NO options in managing users InBox.  You can write a Custom Java SDK that can do global delete but still no way to tie them to a schedule &/or report. 

I have been asking for this option for a LONG time, please support my Idea to manage the uses InBox.

https://ideaplace.brightidea.com/ct/ct_a_view_idea.bix?c=BB5523E4-062F-4420-B35F-0B1F0D4769A9&idea_i...

Regards,

Ajay

joseluisleitao
Explorer
0 Kudos

Thanks Ajay,

Idea supported.

Does anyone have an example of the JAVA code, and how to implement?

I've never worked with the SDK and I've no idea how this could be acomplished.

Regards,

Jose Luis Leitao

former_member182521
Active Contributor
0 Kudos

Jose,

This should help you.

http://www.forumtopics.com/busobj/viewtopic.php?t=162714&postdays=0&postorder=desc&start=15

For deployment Instruction, follow the steps as specified in the above URL.

This is Developed in COM SDK (VB Script) and has to be deployed as a program object.

This is the actual code


' ************************************************************************

' Deletes old Inbox records for any user with more than 999 items in

' their inbox.  Each time this is run, it will delete up to 100 documents.

' ************************************************************************


Dim APS

Dim UserID

Dim Password

Dim Aut

Dim oSessionManager

Dim oEnterpriseSession

Dim oSess

Dim OldSIName


OldSIName = " "


'For the logon, Authenticate as Following

APS = Wscript.Arguments(0)

UserID=Wscript.Arguments(1)

Password = Wscript.Arguments(2)

Aut = Wscript.Arguments(3)


'Create an Enterprise oSessionManager

Set oSessionManager = WScript.CreateObject("CrystalEnterprise.SessionMgr")

Set oSess = oSessionManager.Logon(UserID, Password, APS, Aut)



'Query the iStore and get up to 100 inbox items to delete

On Error Resume Next

'Create a new Variable for the login token

Set iStore = oSess.Service("", "InfoStore")


queryString = "select TOP 100 * from CI_INFOOBJECTS Where CHILDREN(""SI_NAME='Folder Hierarchy'"",""SI_KIND='Inbox' and SI_CHILDREN>999"") and SI_UPDATE_TS < '"

queryString = queryString & Year(DateAdd("d", -100, Date)) & "."

queryString = queryString & Right("00" & Month(DateAdd("d", -100, Date)), 2) & "."

queryString = queryString & Right("00" & Day(DateAdd("d", -100, Date)), 2)

queryString = queryString & "' order by SI_UPDATE_TS"


Set objFSO = CreateObject("scripting.filesystemobject")

Set logStream = objFSO.OpenTextFile("c:\inboxdeletelog.txt", 8, 1)

logStream.writeline "Server - DateTime: " & APS & " - " & FormatDateTime(Now,0)

logStream.writeline "Query: " & queryString


Set inboxRecords = iStore.Query(queryString)


for x = 1 to inboxRecords.Count

    Set inboxRecord = inboxRecords.Item(x)

    If inboxRecord.Properties.Item("SI_NAME").Value <> OldSIName Then

        logStream.writeline "SI_OWNER-SI_KIND-SI_UPDATE_TS-SI_NAME-SIZE: " & inboxRecord.Properties.Item("SI_OWNER").Value & _

        " - " & inboxRecord.Properties.Item("SI_KIND").Value & _

        " - " & inboxRecord.Properties.Item("SI_UPDATE_TS").Value & _

        " - " & inboxRecord.Properties.Item("SI_NAME").Value & _

        " - " & inboxRecord.Properties.Item("SI_FILES").Properties.Item("SI_VALUE1").Value

        inboxRecords.Delete(inboxRecord)

    End If

    OldSIName = inboxRecord.Properties.Item("SI_NAME").Value

Next

IStore.Commit(inboxRecords)


oSessionManager.logoff

logStream.Close

joseluisleitao
Explorer
0 Kudos

Thank you Manikandan.

regards,

Jose Luis Leitao

Former Member
0 Kudos

I tried scheduling this vb script through CMC, but get the below error - any ideas? Not much help so far googling... or searching on SCN.

An unknown COM error has occurred while trying to run the script.


The query part of it works fine and I can see the results of the query (when I run it outside of the CMC), but can't figure out how to get it to run from the CMC.  Probably missing the obvious here, so any help would be appreciated...

Thanks,
Missy

Former Member
0 Kudos

Hello All,

I am having the similar requirement to delete the reports from User inbox, the limitation we are planning to set for not more than 10 instances.

Could  you please advise  if any one has implemented this in BO 4.0 version.

Please  help me  if require any notes or SDK code  implementation.

Regards

Prakash V

former_member182521
Active Contributor
0 Kudos

Above com SDK code also works for   BI 4.x as well. Try it on sandbox first