Hi,
IDRANGE sets the criterias to specifiy which data should be returned (similar to the WHERE-statement in SQL).
SIGN = "I" or "E" (include or exclude records)
OPTION = "CP" (compare) or "EQ" (equal) or "BT" (below than)
LOW = "*" (for all) or a customer ID number to start with
HIGH = leave empty or specify a "highest" customer ID
Here's some VB sample code to retrieve all customer names/IDs:
Public Function GetCustomers() As Boolean
Dim sapBOCustomer As Object
Dim idRng As Object
Dim tbAdressdata As Object
Dim tbRow As Object
Dim bapiRet1 As Object
Set sapBOCustomer = FMain.BAPICtl.GetSAPObject("Customer")
Set idRng = FMain.BAPICtl.DimAs(sapBOCustomer, "Getlist", "IDRANGE")
idRng.Columns("SIGN").Data = "I"
idRng.Columns("OPTION").Data = "CP"
idRng.Columns("LOW").Data = "*"
sapBOCustomer.GetList idRange:=idRng, Addressdata:=tbAdressdata,
return:=bapiRet1
For Each tbRow In tbAdressdata.Rows
.AddNew
debug.print tbRow.Value("Name")
debug.print = tbRow.Value("Customer")
Next tbRow
Set tbRow = Nothing
Set tbAdressdata = Nothing
Set idRng = Nothing
Set bapiRet1 = Nothing
Set sapBOCustomer = Nothing
End Function