on 07-31-2008 10:55 AM
Hi friends
i created a form with a button. if i click the button the "EMPLOYEE MASTER DATA"should open and at the same time it should be activated(i.e add mode)...In this i created the above task except the activating the form.....i want to activate te form via coding
could you please give me some codings
thanks and regards
manoj nagaraj
Hi Manoj,
After doing the Janos coding, add this coding to your code to get the form in add mode
oform = oapp.Forms.ActiveForm
oform.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE
it will get the form which is Active now(Employee master data will be active after the button click) then it will transform the form to add mode.
if you find this helpful please do reward points
Oh sorry Janos coding is enough this one is another way to do it
Best regards
Cool Ice
Edited by: Cool Ice on Jul 31, 2008 1:06 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI COOL ICE,
in the code is standard event, (DATA menü/ADD command), which is also checked by system authorization !
SBO_Application.ActivateMenuItem("1282")
of course you have written,
oform = oapp.Forms.ActiveForm
oform.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE
is also good, but occurs maybe an authorization problems! do you think?
Regards,
J.
ps: See: for asking points...... i did not know it for today morning also.
thanks a lot cool ice...i got the output and both the coding are working thanks a lot.. one more small help friend.surely my full points is to you.. but before that i need can you do me a favour
i have another siumple task i want your help.
actually my task is if i click the button the EMPLOYEE MASTER DATA must open and it should be activate, then in that EMPLOYEE MASTER DATA >ADMINISTRATION->STATUS--->FREEZE
must be set... my difficult is i dont know how to access the system form since i am a beginner
i need your guidencess
thanks and regards
manoj and nagaraj
HI
It is easy, do it as you do in the B1 client, just use the event as coding
If pVal.EventType = BoEventTypes.et_ITEM_PRESSED And pVal.ItemUID = "1" Then
If pVal.Before_Action = False Then Exit Sub
sbo_application.ActivateMenuItem("3590")
sbo_application.ActivateMenuItem("1282")
Dim oEmployeeForm As SAPbouiCOM.Form = sbo_application.Forms.ActiveForm
oEmployeeForm.Items.Item("24").Click(BoCellClickType.ct_Regular)
Dim oCombo As SAPbouiCOM.ComboBox = oEmployeeForm.Items.Item("83").Specific
oCombo.Select("Freeze", BoSearchKey.psk_ByDescription)
End If
To solve:
1. use system information (VIEW menü/system information or CTRL****i) to determine the ID of item or menu or form.
EMPLOYEE MASTER DATA >ADMINISTRATION->STATUS is "83"
2. this is combo box, and use must have to use select method to select anything inside. It has to bee on the foreground to select it. (first we click on folder! itemid is "24")
3. in combo box: there is value and description. In this case a table is behind, so we will use description.
Also menu id is determined from menu (not the left side form!) like file, edit, view.
Regards
J.
Edited by: Janos Nagy on Jul 31, 2008 1:40 PM
hi jason
so the FREEZE was selected jason .
now jason i have another form where i desighed a combo in matrix.
first task is if i click the button it shouldd affect the system form as FREEZE and once it is done then it sould affect in the combo matrix as "ABSENT"
can you help me with this also my friend
thanks and regards
manoj nagaraj
HI,
By pressing the Button ie_ITem_click you must have to activate the menu "3590" which is the EMPLOYEE MASTER DATA form,
after that you also activate menu Add button which is "1282"
If pVal.EventType = BoEventTypes.et_ITEM_PRESSED And pVal.ItemUID = "YOURBUTTON" Then
If pVal.Before_Action = False Then Exit Sub
SBO_Application.ActivateMenuItem("3590")
SBO_Application.ActivateMenuItem("1282")
End If
You can find the menu id: trun on system information and navigate on the menus.
Regards
J.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks a lot jason...i got the output and both the coding are working thanks a lot.. one more small help jason
i have another siumple task i want your help.
actually my task is if i click the button the EMPLOYEE MASTER DATA must open and it should be activate, then in that EMPLOYEE MASTER DATA >ADMINISTRATION->STATUS--->FREEZE
must be set... my difficult is i dont know how to access the system form since i am a beginner
i need your guidencess
thanks and regards
manoj and nagaraj
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
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.