on 07-31-2008 1:39 PM
Hi
I need to change A/R Invoice mode when it loading . i write the code below but still its in addmode
if ((pVal.FormType == 133) & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD) & (pVal.Before_Action == true))
{
SAPbouiCOM.Form oForm = null;
try
{
oForm = SBO_Application.Forms.Item(pVal.FormUID);
oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
}
catch (Exception e)
{
SBO_Application.MessageBox(e.Message, 1, "Ok", "", "");
}
}
}
HI all
The system forms are deniding the change of the mode
You can do the following (in vb.net convert please)
IN MENUEVENTHANDLER -> click on the menu ! and after the event sent find mode the form using the DATA/FIND menu.
If pVal.MenuUID = "2053" And pVal.BeforeAction = False Then
sbo_application.ActivateMenuItem("1281")
End If
If you click on the link arrow connecting to invoice and it must have to be also in find mode the solution is:
' // in itemeventhandler !
Static ARINVOICEFROMMustHavetoFindMode As Boolean = False
If pVal.FormTypeEx = "133" Then
Select Case pVal.EventType
Case BoEventTypes.et_FORM_LOAD
If pVal.BeforeAction = True Then Exit Sub
ARINVOICEFROMMustHavetoFindMode = True
Case BoEventTypes.et_FORM_ACTIVATE
If ARINVOICEFROMMustHavetoFindMode Then
ARINVOICEFROMMustHavetoFindMode = False
sbo_application.ActivateMenuItem("1281")
End If
End Select
End If
We need a static / public variable to store the logical change. Otherwise you can open more the invoice one time ?!!!!
it is always in find mode independent orange arrow / linked button !
Regards
J.
Edited by: Janos Nagy on Jul 31, 2008 3:56 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bilal,
Did you add the form to the filter ?
oFilter = oFilters.Add(SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD);
oFilter.AddEx("133");
SBO_Application.SetFilter(oFilters);
Regards
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.