Hide/Unhide custom menu item under standard menu item based on transactions - abap

I have a custom menu item created under system menu in the menu bar. I want the menu item to be displayed only in case of certain transactions.
The transactions are configured for my business scenario.
I tried the following:
1) Assigning a switch to the custom menu item under system menu in menu painter would hide/unhide it across all the transactions depending on whether the switch is active or not.
Also checked whether switch can be assigned set of transactions rather than a package. No luck.
2) Checked whether the code is hitting the statement set pf status. It's just hitting the set pf status for the other menu items like Goto and Edit. So don't know how exactly the system and help menu options are being populated. If I know exactly the working that is the common logic executed here, then I can possibly populate the custom menu item by reading the configuration of transactions.
3) Transaction variants is another option. But here too we do not have access to system and help menu options. Plus if it works, it would be not a generic solution as I will have to create transaction variant for all the transactions.

Related

Input Controls In WebI

I need to have multiple selection in my report filters. Is it possible?
I used list box multiple selection from Input Controls for the same purpose. But the User needs to search for the input control to open and select as it does not open by default. Can we make input control to be seen in our Reports all the time when a user opens the Report?
If yes, How?
Thanks
Niki
As far as I know, you can't force a document to open with the Input Control pane visible. If I'm not mistaken, whether the left pane is visible or collapsed and which tab is showing, is either document or user related, but you can't set it as a document property.
The state of the left pane (visibility and selection) is saved in the user profile. You can see the value by looking at the property SI_DATA.INTERACTIVE_EDITING_VIEWER_USR_PROFILE.CDZ_VIEW_leftPaneSel. Use the Query Builder (http(s)://<application server>:<port>/AdminTools) and run the query below to retrieve the value (in this case for the user Administrator).
select si_data
from ci_systemobjects
where si_name = 'Administrator'
and si_kind = 'User'
The only way you could manipulate the value is through the BusinessObjects Enterprise SDK. But remember that - due to being part of the user profile - changing this impacts all documents the user opens. Moreover, as soon as the user either hides the left pane or selects a different tab, the value will be overwritten. There is no way you could prevent this from happening (at least not to my knowledge).
One possible alternative, is to limit the user interface for that specific user / user group. In BI 4 (I'm not exactly sure from which version on this feature is available), you can turn off certain aspects of the Web Intelligence user interface.
Doing so, you could make the Input Control tab the only one available in the left pane. Granted, it's not what you're aiming for, and it's an application setting, so the impact is on user(group) level, not on document, but it might be an alternative, depending on the circumstances.
You can customise the Web Intelligence interface by right-clicking a user group in the CMC and selecting Customization from the context menu.

How to Check Context Menu Dropdown Items, VB.NET?

MY application has a context menu that appears when the user right-clicks a form. The context menu is generated on each click since the items depend on various application variables.
Each context menu contains a number of items and several DropDown sub-menus.
As the context menu is created, I can set items on the primary menu as checked as follows:
MenuItemX.Checked = True
However, I cannot find a way to make items in the Dropdown menu checked. I can create these items OK, but the line of code above does not allow me to set them as checked.
Is it possible to have items within a Dropdown sub-menu checked, and to set this property at run-time?
Can anyone provide an example of how to do this?

Assigning a custom workflow to a work item type in Rational Team Concert

I'm in the process of customizing Rational Team Concert to include a custom work item type. As part of the testing of the work item type as I created it I populated a few of the custom work items with data. As I enhanced the custom work item type and added additional attributes I was able to use the "Check attributes usages in repository" from the "Types and Attributes" to ensure that the new attributes were propagated to my test work items.
Now I've gotten to the point where I need to create a custom workflow for this work item type. I've defined the workflow and and assigned it to the work item type, but my existing test work items can't seem to use it. Clicking on the "Check workflow usages in repository" link says "There are 9 work items in the repository referencing workflow states or resolutions that are not present in the bound workflow. Do you want to show these items in the Work Items view?".
The workitem view then just says that status = 1 for the test work items.
If I select a work to open in the rich client editor all of the process elements are inactive. If I open it in the web editor, it says that the status is "1", as shown below:
Is there any way to fix this and change the workflow of existing work items? I should add that new work items work just fine, but I'm worried about what might happen if I need to update the process again in the future.
In the context of work item customization, you have to manually sync existing work item attributes with the most recent version of the PA in order to take your changes into account.
The steps are detailed here in the manual page "Defining work item types and attributes":
(bottom of the page)
To manually update existing work items with new or modified custom attributes:
Run a query so that the query results contain all the work items that you want to update.
Note: Do not select any relationships to be shown in the query results.
If relationships are shown, the Type icon is not displayed and you cannot complete these steps.
To clear all relationships shown, in the Work Items view menu, select Relationships, click Deselect all, and then click OK.
In the Work Items view, select the work items that you want to modify.
In the row of one of the selected work items, right-click the Type icon and select Synchronize attributes.
Thanks.
Eric.

Conditional Alert in SharePoint 2010 list

Is it possible to create an Alert which should only fire when certain field value is blank or something like that ? I don't find any reference for the same anywhere.
If your alert criteria can be expressed in a view, you can then do this through the UI without code. Create the view on the list with your criteria. Then set an alert for the list. In the section for set alerts for these changes, select the someone changes an item that appears in this view and select your view from the dropdown list.
This option is not easily discovered in 2010 as the option only appears after a custom view exists for the list (except for the task list, which has a number of views included by default).
You can create a workflow through SharePoint designer to achieve this functionality.

Modify NSMenu structure on each open?

I need to be able to dynamically modify an NSMenu hierarchy each time it is shown (add/remove items etc). For example:
user starts a tracking session on a main menu and selects a submenu
detect submenu is about to open and run code to modify it
keep tracking , user tracks over the same submenu again: goto 2
So to do this I have an object implementing the NSMenuDelegate protocol. The method menuNeedsUpdate works the first time (2), but does not work for 2nd time the submenu is opened. (Only called once per tracking session)
The method menuWillOpen is called each time, but has docs have the following warning which seems to disqualify using this approach:
Do not modify the structure of the
menu or the menu items during this
method.
Is there any way to accomplish this ?
You could subclass NSMenu and override submenuAction:.
Or you could just subscribe to the NSMenuWillSendActionNotification.
And while doesn't sound like it will work for you, just for reference, NSMenuValidation is a good place to update menu items on an item by item basis.
menuWillOpen will only be called once, the first time you track over the submenu. At that point, you populate the menu.
After that, menuWillOpen will not be called again. However, any changes to the menu will happen live. So while the main parent menu is open, whenever the source data changes (or periodically if you can't detect changes), update the menu using the normal NSMenu API.
Make sure whatever method you use to update the menu will run while the system is tracking your menu.