Hi Thomas,
Very much glad for the help. It finally worked! Yey!!!
I am using Excel macro to execute the SAP transactions. I took the codes through recording. But here's my final code:
session.findById("wnd[0]/tbar[0]/okcd").Text = "/nmmrv"
session.findById("wnd[0]").sendVKey 0
For i = 1 To 10
If Range("A" & CStr(i)).Value <> "" Then
session.findById("wnd[0]/usr/ctxtMARV-BUKRS").Text = Range("A" & CStr(i)).Value
session.findById("wnd[0]").sendVKey 0
Application.Wait (Now + TimeValue("0:00:03"))
session.findById("wnd[0]/tbar[0]/btn[3]").press
Else
Exit For
End If
Next i
My aim is to execute MMRV and take a look at each company in my list in Excel column A. I added the 3-second delay to let me have a glimpse of the result. Then exits and get the next company code and loops until the list if finished.
Oh... i just realized "For i = 1 To 10"... i can just set this to 1000 or more to make sure all is captured.
Your code really helps. Thank you very much