Referencing SAP cell name instead of line 4, page down,

Lightamir

New Member
Joined
Mar 6, 2013
Messages
5
Right now I'm running an Excel script in SAP as this:
Session.findbyid("wnd[0]/usr/tblSAPLSE16NSELFIELDS_TC/btnPUSH[4,6]").press
Session.findbyid("wnd[1]/tbar[0]/btn[0]").press
Application.Wait (Now + TimeValue("00:00:01"))

Session.findbyid("wnd[1]/tbar[0]/btn[24]").press
Application.Wait (Now + TimeValue("00:00:01"))
Session.findbyid("wnd[1]/tbar[0]/btn[8]").press
Application.Wait (Now + TimeValue("00:00:01"))
Session.findbyid("wnd[0]/usr/tblSAPLSE16NSELFIELDS_TC").verticalScrollbar.Position = 27
Session.findbyid("wnd[0]/usr/tblSAPLSE16NSELFIELDS_TC").verticalScrollbar.Position = 54
Session.findbyid("wnd[0]/usr/tblSAPLSE16NSELFIELDS_TC").verticalScrollbar.Position = 81
Session.findbyid("wnd[0]/usr/tblSAPLSE16NSELFIELDS_TC/ctxtGS_SELFIELDS-LOW[2,1]").Text = "20"
' Session.findById("wnd[0]/usr/GuitextfieldSTATUS").Text = "20"
Session.findbyid("wnd[0]/usr/tblSAPLSE16NSELFIELDS_TC/ctxtGS_SELFIELDS-LOW[2,1]").SetFocus
Session.findbyid("wnd[0]/usr/tblSAPLSE16NSELFIELDS_TC/ctxtGS_SELFIELDS-LOW[2,1]").caretPosition = 2
Session.findbyid("wnd[0]").sendvkey 8

Yet when I change the SAP to my laptop screen it doesn't work because SAP loses row per page. What is the syntax to open up a SAP field by Technical name and paste multiples in there.
 
Hi,

I no longer have access to SAP so this will have to be from memory and not tested.

There is a Wizard available on the same menu as the recording and playback functions. It even draws an animated Wizard on the screen! If you select a field it should give you the name. However, I seem to recall that you only get the last part of the name. It might be easier to record yourself inserting the number using the record functionality. Finding the file afterwards can be tricky, though.

Just start the recording immediately before you insert the data and stop it afterwards otherwise you will get too much confusing information.

(I remember SE16 and SE16N well. :) )
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top