on ‎2005 May 23 9:53 AM
Hi all!
I know the only way to generate a draft document is to go to File -> Save as draft document. But is not very user friendly...
So I want to create a button in sales documents for drafts.
When the user clicks the button the document is added as draft.
Is it possible?
Or is there a better solution?
Thanks in advance for every help!
Kindest regards,
Veronica Vezzali
Request clarification before answering.
Hi Veronica,
If you add the button, and capture the click event, the only thing you need to do is to "simulate" a click event on that menu with this code
App.ActivateMenuItem(MenuUID)
Where App is the Application object and the MenuUID, the menu UID for the "Save as draft document" menu item (5907).
Regards,
Ibai Peña
PS: A couple of minutes late...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
It works, but I have a message
Menu - Can not activate a disabled menu item
Besides an other question.
When I create the button for draft document in quotation, the button is always in the same position when I resize the form. And this is OK!
But, for example, in delivery, the button positions changes when I resize the delivery form. And this is not correct.
This my code to create draft delivery button:
'delivery
If pVal.FormTypeEx = "140" Then
Set oForm = SBOApplication.Forms.GetForm("140", i)
rifL = oForm.Items("68").Left + oForm.Items("68").Width + 5
rifT = oForm.Items("68").Top
End If
Dim oItem As SAPbouiCOM.Item
Set oItem = oForm.Items.Add("BParch", it_BUTTON)
oItem.Top = rifT
oItem.Height = 19
oItem.Left = rifL
oItem.Width = 65
oItem.Visible = True
Dim oButton As SAPbouiCOM.Button
Set oButton = oItem.Specific
oButton.Caption = "PARCH."Can you help me?
Thanks in advance for your help.
Kindest regards,
Veronica Vezzali
Thanks to all,
very useful information.
Kind Regards,
Fabio Salucci
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This is possible with the DI but in your case, like you explain it, it will be the most easy to invoke the menuitem click by code.
The menuUID for save as draft is 5907 (SAP BO 2004A).
SboApplication.ActivateMenuItem("5907")Hope it helps
Eddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 59 | |
| 30 | |
| 21 | |
| 11 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.