cancel
Showing results for 
Search instead for 
Did you mean: 

Activating a system form

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

jason

where did you get "1282" how to find it

Former Member
0 Kudos

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

Former Member
0 Kudos

hi jason

really thats great .... you did it man... i was waiting for this solution .. thanks a lot....i got the output....and my task is almost over...... i want your help in the future like this...

thanks and regards

manoj nagaraj

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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