Hi,
I've recorded the script from SAP and pasted it to excel, and it managed to run using excel VBA.
However, there is no way for me to change the period based on my need (e.g. "Select balance, current period", "Select balance, previous period").
The VBA will run based on the recording script which is "Current Period" data.
Is there anyway for me to select the period in excel before execute the VBA?
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").Text = "/n/epcos/MB5L"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/ctxtBUKRS-LOW").Text = Range("B7").Value
session.findById("wnd[0]/usr/radAKSALDO").SetFocus
session.findById("wnd[0]/tbar[1]/btn[8]").press
session.findById("wnd[0]/usr/lbl[1,5]").SetFocus <-- i guessed this is where the period has been selected during the sript recording.
session.findById("wnd[0]").sendVKey 2
Thanks.
I've recorded the script from SAP and pasted it to excel, and it managed to run using excel VBA.
However, there is no way for me to change the period based on my need (e.g. "Select balance, current period", "Select balance, previous period").
The VBA will run based on the recording script which is "Current Period" data.
Is there anyway for me to select the period in excel before execute the VBA?
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").Text = "/n/epcos/MB5L"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/ctxtBUKRS-LOW").Text = Range("B7").Value
session.findById("wnd[0]/usr/radAKSALDO").SetFocus
session.findById("wnd[0]/tbar[1]/btn[8]").press
session.findById("wnd[0]/usr/lbl[1,5]").SetFocus <-- i guessed this is where the period has been selected during the sript recording.
session.findById("wnd[0]").sendVKey 2
Thanks.