anyone got a working example of a VB program which connects to SAP, allows you to view tables?, think SAP version is 3.0F
Thanks inadvance
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
Your gona have to get a newer version of SAP to do that (Almost positive). We have 4.6D here at work, any clients with an older front end would not work with our code..
But anyway.. SAP has a "Code Generator" addon to their client. It is really nice and is what we used to get started.. It is called DCOMConnector. Do a search and you will find a bunch of links pointing to it.
I can't find any of the source code right now, but hopefully I have helped you get started..
10 different ways to skin a cat and amazingly enough each and every one has the same result, the cat gets skinned! The same can be applied to code, so be nice and accept each others "preferences".
Last time I had to do this was with version 3H (we had 4.6 already but wasn't implemented in the live environment yet) and as far as I remember there was a library of OCXs distributed along with client software. In any case you cannot read actual (SAP native tables) - only ABAP data dictionary based and not all of them. Secutrity was #1 priority in SAP since day one. It wouldn't be like walikng in the park but give it a shot.
Although, if you need to build some sort of "query builder" for end users then you'll have to build your very own "data dictionary" to translate actual fields names to something that will make sense to your users.
Originally posted by RhinoBull Last time I had to do this was with version 3H (we had 4.6 already but wasn't implemented in the live environment yet) and as far as I remember there was a library of OCXs distributed along with client software. In any case you cannot read actual (SAP native tables) - only ABAP data dictionary based and not all of them. Secutrity was #1 priority in SAP since day one. It wouldn't be like walikng in the park but give it a shot.
Although, if you need to build some sort of "query builder" for end users then you'll have to build your very own "data dictionary" to translate actual fields names to something that will make sense to your users.
I will second that.. SAP is probably the worst program I have ever delt with!
10 different ways to skin a cat and amazingly enough each and every one has the same result, the cat gets skinned! The same can be applied to code, so be nice and accept each others "preferences".
Originally posted by RudyL I will second that.. SAP is probably the worst program I have ever delt with!
Some attributes of SAP:
*Customized POS
*Horrific Reporting
*So much security you cannot integrate a damn thing
*German
*German
*German
*Table names are fudged up
*No documentation
*Little support
*Weak a** community
*Dumps are ugly as medusa
*Slower than molases
*GUI is about as difficult as typing with your toes
*Buttons (Too many)
*No captions
*Horrible streamlining or flow of application
*Expensive as shi*
*ERP system thinks companies can collaborate
*Email functionality so horrid
*Contractors cost an arm and leg
*Little or no interaction with MS, I dont care what the SAP folks think, they are all talk
*Go back to point 1
but have any of you got an example i can work on see if it connects, have the SAP Client running on my PC but as we all know the GUI isnt the best is it?,
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
any examples to connect would be very helpful, or links, or even a OCX or DLL, in limbo at the moe
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
Originally posted by plenderj If you happened to run a massive international organization and needed a standardised ordering system etc. etc. then you wouldn't say the above.
Yes I would, I work for an internation ortganization with sister companies around Japan, Tons in Europe (Germany), Mexico, South America, we are a huge corporation...
and SAP Sucks...we have too many issues in every one of our parent and sister companies. We have spent billions of dollars on a worthless POS. If we had designed this in another RDBMS we would have reports that actually were readable and made sense.
great however, the Post i orignally posted was to help with VB Code to connect to SAP, this isnt a discussion over pros and cons of SAP, i think most of us know them already, thanks
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
Originally posted by Robbo great however, the Post i orignally posted was to help with VB Code to connect to SAP, this isnt a discussion over pros and cons of SAP, i think most of us know them already, thanks
Ok,
I have written a client to connect to a SAP system.
Is that what you need ?
As much as I did hate it when I had to work with it - I wouldn't agree with you. It depends on how you look at it - it's industry's one of the most powerfull enterprise software packages. It does require alot of learning and mostly in regards of "how in the hell it manages business" stuff. ABAP part is simple as long as you understand those milions of "HOW's ..."
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
Originally posted by jhermiz If you've got SAP installed its in your references of your VB project.
Jon
SAP version is 3.0F
says missing ocx,
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
check your version of SAP i bet its not the same version 3.0F
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
yep its an old version, unsure if it will work with the OCX however the program is no use without it?
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
Originally posted by Robbo yep its an old version, unsure if it will work with the OCX however the program is no use without it?
The program will not work on your implementation of SAP since it is R/3 specific...you may notice the reference which is missing on your end regarding this.
Something neat I just figured out...Flash can be embedded into VB :-) makes nice graphics!!! Cool a GUIIIIIIIIIIIIIIIIIIIIIIIIIIIII
so do u know of a program i could use on this version then?
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
Originally posted by Robbo so do u know of a program i could use on this version then?
hmm
I can prolly whip up something I'd have to do some researching, otherwise I am uncertain. You guys need an upgrade
Maybe someone else on vbforums may have an example. I may look into querying out some SAP tables and build some forms to display the data now that I look at all the various components that come packaged with it.
But I do not know of a program to fit your implementation needs.
the upgrade will probably cost thousands, if you give me any code or program to connect and be able to retrive data it would be appreiated
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
Originally posted by Robbo the upgrade will probably cost thousands, if you give me any code or program to connect and be able to retrive data it would be appreiated
without having to pay for a program??, VB code would be better
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
looking at the jpg of your logon pad U have the 3.1h gui?
dunno how version specific my code is but might be worth a try
I talk to sap - either thru the dcom connector from the gui disk or using the gui functions. I find the dcom connector a bit of a dog (but a collegue tells me the .net ver is sorted....)
anyhow here is some very noddy code that calls a sap function using the gui objects - this is the simplest connection U are going to get - if this wont work then I think U are stuffed - needs to run on a machine that currently has the gui loaded ok.
(code given a material number (text2) - calls the function Z_BAPI_ZMATDESC3_GET and returns data (into text1))
(although the fuction is a bapi I am misusing it here - just calling in in a "toy" fassion!)
VB Code:
Option Explicit
Private Sub Command1_Click()
'--im going to live like an angel, die like a devil, there a place in hell reserved for me..
'--main r3 object
Dim ObjR3 As Object
'--parameter to abap (material number) object
Dim ObjPrm1 As Object
'--parameter from abap (return) object
Dim ObjParmin As Object
'--abap function to use object
Dim ObjR3Func As Object
'--return code for abap call
Dim result
'--abap table retruned (Materialdata) object
Dim ObjMaterialtab As Object
'--misc integer counter
Dim intidx As Integer
'--turn off the button
Command1.Enabled = False
'--use the gui function..
Set ObjR3 = CreateObject("SAP.Functions")
'--logon as me!!
ObjR3.connection.System = ""
ObjR3.connection.client = "200"
ObjR3.connection.user = "myid"
ObjR3.connection.password = "mypass"
ObjR3.connection.language = "EN"
ObjR3.connection.System = "DEV"
ObjR3.connection.Applicationserver = "appserv"
ObjR3.connection.SystemNumber = "01"
'--if no logon then exit
If ObjR3.connection.logon(0, True) <> True Then
'-----turn off the button
Command1.Enabled = True
Exit Sub
End If
'--set up the function to run
Set ObjR3Func = ObjR3.Add("Z_BAPI_ZMATDESC3_GET")
'--and the paramters we will send
Set ObjPrm1 = ObjR3Func.exports("MATERIALNO")
'--and its value
ObjPrm1.Value = Text2.Text
'--do it
result = ObjR3Func.CALL
'--if ok then process - else exit
If result = True Then
'-----get the abap return code
Set ObjParmin = ObjR3Func.imports("RETURN")
'-----get the materialdata table
Set ObjMaterialtab = ObjR3Func.Tables("MATERIALDATA")
Else
'-----if it was stuffed the exit
MsgBox ObjR3Func.EXCEPTION
ObjR3.connection.LOGOFF
'-----turn off the button
Command1.Enabled = True
Exit Sub
End If
'--ok now spin thru the table and dump the data into the text field....
might help http://ftp.mendelu.cz/windows/SAPklient/controls/ (just found - not sure though!)
----
if u do get this to work _ can show U how to hijack some of the table browsing functions (se16) to read any sap table...
----
otherwise try here http://www.sapfans.com/forums/viewforum.php?f=13
warning - the people there are awfull - overpaid & stupid and will flame U at the first oppertunity as I have found out the hard way! - nice
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
those dlls are the c runtime and MFC
they are very very common and usually are packaged with most apps that has been build with visual c++ (which I presume is large persentage or "proper" sortware) its very hard not to have them loaded these days. - supprised!
anyhow if missing....
from the studio disks - (sorry if wrong I dont have them with me at the moment)
mfc42.dll
-found at \disk1\os\system
MSVCIRT.dll
-found at \disk1\os\system
MSVCP60.dll
-found at \disk1\vc98\redist
I just load studio in full and am unfamilar with just vb alone or increadibly clean systems,
loading them individually might me problematic because of dependancies -(will need to check a dependany walker),
sorry, cheers AJP
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
yeah had a quick look however couldnt use the control
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day
-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle