Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tcl support of SAP bAPIs?

13 views
Skip to first unread message

melissa...@scriptics.com

unread,
Nov 10, 1999, 3:00:00 AM11/10/99
to

Does anayone know of anay Tcl-SAP projects underway or even old
projects?


Scott Redman

unread,
Nov 10, 1999, 3:00:00 AM11/10/99
to
Actually, I downloaded tclsap-0.2 and sent it to Melissa already.
It's a little old, and the License may be too restrictive (we
need to get in touch with the author), but it's a good example
of using the RFCs (remote function call).

We can't use webMethods, they're our competition now....

-- Scott


Steve Ball wrote:


>
> melissa...@scriptics.com wrote:
> >
> > Does anayone know of anay Tcl-SAP projects underway or even old
> > projects?
>

> I found an old project called TclSAP, but the author was no longer
> supporting it.
>
> For my recent Tcl/SAP project I used webMethods' B2B server to talk
> XML with the SAP R/3 server, but of course I'd like to be able to use
> Scriptics' Connect instead (seriously... B2B is a very raw interface
> to the SAP BAPIs, and something higher level is sorely needed).
>
> Cheers,
> Steve Ball
>
> --
> Steve Ball | Swish XML Editor | Training & Seminars
> Zveno Pty Ltd | Web Tcl Complete | XML XSL
> http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development
> Steve...@zveno.com +-----------------------+---------------------
> Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099

Steve Ball

unread,
Nov 11, 1999, 3:00:00 AM11/11/99
to

loe...@my-deja.com

unread,
Nov 11, 1999, 3:00:00 AM11/11/99
to
In article <3829bbe7$0$2...@nntp1.ba.best.com>,

melissa...@scriptics.com wrote:
>
> Does anayone know of anay Tcl-SAP projects underway or even old
> projects?

Well, I wrote a sap package back in Dez.97, which is not released
to the public. It basically wraps SAP's librfc to Tcl level and
above that, there are some higher level Tcl commands -- about
2500 lines C code and 1000 lines Tcl code altogether.
We use it with great succes here internally to access a very large
SAP R/3 (3.1H, 4.5) installation on HP/UX in order to a feed
'data warehouse', provide web views using our own TclWebServer,
etc. -- all in Tcl and all in realtime!

Since BAPIs are just RFCs with a certain naming convention or
with an entry in the Business Object Repository and since there
are normal RFC-capable functions to query that BOR, it wouldn't
be to hard to automatically generate Tcl wrapper procs so that
you can write BAPI code in Tcl with a Tk-like OO-syntax.
I didn't implement that yet, because there is no need right now.

Currently all tcl appplications act only as clients. Just this
week I'm writing a Tcl RFC server that does similar things like
the SAP's new Business Connector. SAP ABAP functions can call
services on that RFC server, which then convert the request
to access other (external) business server using some well-known
methods: XML,SMTP,HTTP,FTP.

So with replacing SAP BC/Java with Tcl and my tDOM lib, SAP ABAP
code can access an external XML server!

Using other business communication packages with Tcl support
(Informix,XML/DOM,Allbase,HP-Solid,event/broker systems),
Tcl gets a very good company/business glue language!

Sorry, currently the sap package is not public available,
but I can encourage you, that it wouldn't be so hard to code a similar
thing, if you have Tcl/C knowledge.

Best Regards,
Jochen.

some example code:
#-----------------------------------------------------
# Connect to SAP and to the reports database
#-----------------------------------------------------
set SapHandle [sapOpenUsingConfig Production-R01]

#-----------------------------------------------------
# Get structure definition for SAP data dictionary
# once at start time
#-----------------------------------------------------
sapStructure $SapHandle Z1V050S

#-----------------------------------------------------
# read data records from SAP table JCDS using
# a where clause
#-----------------------------------------------------
sapFetch $SapHandle JCDS { OBJNR object
UDATE date
UTIME time
STAT status
} "
objnr like 'VB${so_no}%'
" {
# Tcl block executed for each returned row
puts "object=$object'"
...
}


Sent via Deja.com http://www.deja.com/
Before you buy.

0 new messages