on 02-14-2006 10:54 AM
Hi,
i´m looking for a way to open a System-Form, e.g. Orders with
selected Data.
In the moment i do the following:
application.ActivateMenuItem("2050"); // orders
SAPbouiCOM.Form belegForm = application.Forms.ActiveForm;
belegForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
SAPbouiCOM.EditText edDocNum = (SAPbouiCOM.EditText)belegForm.Items.Item("8").Specific;
edDocNum.Value = "4711";
belegForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular);
This works, but the screen is blinking, because first the form ist opened and shown with
empty values and then filled.
Is there a way to activate the form and do the search-Operation and afterwards show it ?
I think ist must be possible, because when clicking on the link-Button near CardCode, the Contacts-Form
is opened in this way.
regards Matthias
Hi Matthias,
You can try and freeze the form after it load so change your code:
application.ActivateMenuItem("2050"); // orders
SAPbouiCOM.Form belegForm = application.Forms.ActiveForm;
belegFrom.Freeze(True)
...
belefForm.Freeze(False)
Hope it helps,
Adele
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matthias,
Try this:
Before the activate menu item, set a flag to true.
Then activate menu statement (Now the form load event should be raised)
If the form is freezed, unfreeze it.
On the form load event if the flag is true freeze the form.
Put the flag to false.
PS: Perhaps you could use the visible property instead of the freeze method for a better behavior
Hope helps,
Ibai Peñ
Hi Ibai,
i have tested both: freeze and form.visible = false in
the form_load-Event. It doesn´t work here.
Also neither the call
application.ActivateMenuItem("1281"); // find
nor the call
oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
work in the form_load-Event.
After the form-Load-Event the et_FORM_ACTIVATE-Event is called.
Here the functions work, but here the screen is already visible.
regards Matthias
Hello Matthias,
in this case I always use the LinkedButton and storing the Docentry in a linked EditText-field.
Sometimes I add these two Items to an existing form and set the Visible property to false until I need to open the systemform (the LinkedButton must be visible to send the click-event). Maybe it's also possible to minimize the Items (e.g. Width = 0, Height = 0 ).
Kind Regards
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
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.