on 2005 Apr 28 6:49 AM
Hi, friends!
Could you say me, if this snippet is the only solution to open needed document manually?
In other words, i need to open via UI a Purchase Order form for order #xx on dd.mm.yyyy date.
I havn't find any way to done it as in MasterData.GetByKey().
SAPbouiCOM.Form frmPurchOrd = null;
SAPbouiCOM.EditText oOrdNum;
SAPbouiCOM.EditText oOrdDate;
SAPbouiCOM.Item oOrdOkButton;
int frmPOCount = 0;
// simulate menu-click //
SBOApp.ActivateMenuItem("2305");
// look for count of opened forms with type 142 (PurhOrder)
for (int k=0; k<SBOApp.Forms.Count; k++)
if (SBOApp.Forms.Item(k).Type == 142)
frmPOCount++;
// find form
frmPurchOrd = SBOApp.Forms.GetFormByTypeAndCount(142, frmPOCount++);
frmPurchOrd.Freeze(true);
// change its mode from add to find
frmPurchOrd.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
oOrdNum = (SAPbouiCOM.EditText)
// fill the items
frmPurchOrd.Items.Item("8").Specific;
oOrdNum.String = OrdNum;
oOrdDate = (SAPbouiCOM.EditText)frmPurchOrd.Items.Item("10").Specific;
oOrdDate.String = OrdDate.ToShortDateString();
oOrdOkButton = (SAPbouiCOM.Item)frmPurchOrd.Items.Item("1");
// simulate find-button click
oOrdOkButton.Click(SAPbouiCOM.BoCellClickType.ct_Regular);
frmPurchOrd.Freeze(false);
thanx.
sorry for my En.
I reply to forumadmins to fix the comment-trouble, plz
Message was edited by: Alexey Grebennikov
Hi Alexey
Why don't you use the linked button? This object has the property LinkedObject, where you can specify the form you want to open.
Daniel Rial
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexey,
According to the "Release Planning" page on Service Marketplace, 2004 C Ramp-Up (2004 C is the edition for Czech Republic, Hungary, Poland, Russia, Slovakia) is planned for this quarter.
Maybe you could convince your manager - or the customer to wait for general availability of this version - or even partcipate in the Ramp-Up?
Re your workaround:
Maybe you could have a "secret" (i.e. invisible) linked button + edittext on the form which you just visibilize / enable / bring to the current pane level when you want to launch the document, but keep it somewhere out of sight (e.g. oForm.Left = - 200). Afterwards you could hide it again entirely.
Regards,
Frank
User | Count |
---|---|
102 | |
8 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.