SAP Exexute statement
Posted on 2006-11-09
I'm connecting to SAP through Lotus Notes Script. I want to run a BAPI in SAP which will pull in a load of information which I am using to create lotus notes documents. I can connect fine, but I am struggling to add a select statement to my connection so that only certain tables in SAP are ran against.
Here's the relevant code...
Dim sapsession As LCConnection
Dim rstfldlist As New LCFieldlist
sapsession.Database = "BAPI_NAME"
sapsession.Metadata = "TABLE_BEING_USED"
selectstatement = |SEL_GROUP=3000 or SEL_GROUP=3001 and CHANGES_ONLY="X" AND CHANGES_SINCE_DATE="dd.mm.yyyy"|
numFound = sapsession.Execute(selectstatement, rstfldlist)
Basically, I only want to pull in information in the table where the Material Group is 3000 or 3001. And I only want to pull in information changed since a calculated date.