Solved

SAP Exexute statement

Posted on 2006-11-09
3
547 Views
Last Modified: 2013-12-08

Hello,

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.


0
Comment
Question by:RichardStarkey
3 Comments
 
LVL 10

Accepted Solution

by:
jonvaughan earned 250 total points
ID: 17929439
What is the bapi being used ?
Which table are you trying to get the data from ?

What data is it that you want - generally you wouldn't need to format a select statement to get data from SAP, you would use a BAPI that is pre-written to give you the data - although this is only true for standard types of objects. Or you can write a function module to do the same thing.

0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: You must have administrative privileges in order to create/edit Sharing Rules. Salesforce.com (http://www.salesforce.com) (SFDC) is a cloud-based customer relationship management (CRM) system. It is a database most commonly used by sales an…
"Disruption" is the most feared word for C-level executives these days. They agonize over their industry being disturbed by another player - most likely by startups.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question