on 01-02-2008 12:01 PM
Hello,
Does anyone know how to add a context menu to an existing form (such as Sales Order, A/R invoice) with a XML file?
Is it possible to work? If yes, how to do it and what is the structure of the XML file?
Many thanks in advance.
Thanks & Regards,
Gordon
Gordon,
Context in the sense whn u right click copy, paste option will appear u have to add one option rite???
Thn u cant write in xml else u can write in Menu event
For example,
Dim oForm As SAPbouiCOM.Form = app.Forms.ActiveForm
If oForm.UniqueID = "DS" Then
Dim MItem As SAPbouiCOM.MenuItem = app.Menus.Item("1280")
Dim Menu As SAPbouiCOM.Menus = MItem.SubMenus
If MItem.SubMenus.Exists("sub") = True Then
Menu.RemoveEx("sub")
End If
End If
Regards,
Anitha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anitha,
Thanks for your reply.
But the context menu means form menu, I would like to add an additional form menu (e.g My Menu) to a B1 stardand form (e.g Sales Order) with XML file. That means when I right-click on the Sales Order, the form menu will display "My Menu" and it will also appear under GoTo Menu.
I could do it with hard codes, however, when I open the second form of the Sales Order, I get exceptions on identical menu unique IDs. That is why I want to use XML file to add a form menu to avoid this exception, but I don't know the structure of the XML file. I have tried many times with different structures, but it didn't work.
Below is the definition of the XML file.
<?xml version="1.0" encoding="UTF-16" ?>
<Application>
<formmenu>
<action type="add">
<Menu Checked="0" Enabled="0" FatherUID="" Position="" String="My Menu" Type="1" UniqueID="MyMenu01" Image="" />
</action>
</formmenu>
</Application>
Thanks & Regards,
Gordon
Edited by: Gordon Kao on Jan 4, 2008 1:26 AM
Hello All,
Finally, I have found the solution for the structure of XML file to add an additional form menu on a B1 standard form.
Please kindly refer to the following definition if you need.
<?xml version="1.0" encoding="UTF-16"?>
<Application>
<forms>
<action type="update">
<form uid="">
<formmenu>
<menus>
<action type="add">
<Menu Checked="0" Enabled="1" FatherUID="" Position="" String="My Menu" Type="1" UniqueID="MyMenu01" Image="" />
</action>
</menus>
</formmenu>
</form>
</action>
</forms>
</Application>
Regards,
Gordon
User | Count |
---|---|
102 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.