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
Printable View
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
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..
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.
Good luck.
SAP Sucks:afrog:Quote:
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.
Good luck.
I will second that.. SAP is probably the worst program I have ever delt with!Quote:
Originally posted by jhermiz
SAP Sucks:afrog:
Some attributes of SAP:Quote:
Originally posted by RudyL
I will second that.. SAP is probably the worst program I have ever delt with!
*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 :lol:
JUNK!
ok,
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?,
If you happened to run a massive international organization and needed a standardised ordering system etc. etc. then you wouldn't say the above.Quote:
Originally posted by jhermiz
SAP Sucks:afrog:
any examples to connect would be very helpful, or links, or even a OCX or DLL, in limbo at the moe
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...Quote:
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.
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.
SAP blows
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,Quote:
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
I have written a client to connect to a SAP system.
Is that what you need ?
What does it have to with the subject ??? :rolleyes:Quote:
Originally posted by jhermiz
SAP Sucks:afrog:
It doesn't but it still sucks!:bigyello:Quote:
Originally posted by RhinoBull
What does it have to with the subject ??? :rolleyes:
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 ..."
Cheers
Connecting to SAP client:
im missing the OCX have you got that?
If you've got SAP installed its in your references of your VB project.Quote:
Originally posted by Robbo
im missing the OCX have you got that?
Jon
SAP version is 3.0FQuote:
Originally posted by jhermiz
If you've got SAP installed its in your references of your VB project.
Jon
says missing ocx,
Check your references and components...I did not build my own ocx.Quote:
Originally posted by Robbo
SAP version is 3.0F
says missing ocx,
missing wdtlog.ocx?
have you got it on yours?, could you send?
Sorry cannot distribute that file...if you have SAP you would have this file. I'd be breaking some law :eek:
are u real?
check your version of SAP i bet its not the same version 3.0F
I never said it was version 3.0F.Quote:
Originally posted by Robbo
are u real?
check your version of SAP i bet its not the same version 3.0F
I don't use sap much just connect to it..not sure on the version looks like R/3 ?
Jon
Here
here u go
and i havent the ocx, ok, how much more
You guys have a real old version...the program prolly wont work..I reference SAP R/3.Quote:
Originally posted by Robbo
here u go
and i havent the ocx, ok, how much more
SAP Sucks btw :D
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.Quote:
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?
Something neat I just figured out...Flash can be embedded into VB :-) makes nice graphics!!! Cool a GUIIIIIIIIIIIIIIIIIIIIIIIIIIIII
Sorry kind of off topic :D
so do u know of a program i could use on this version then?
hmmQuote:
Originally posted by Robbo
so do u know of a program i could use on this version then?
I can prolly whip up something I'd have to do some researching, otherwise I am uncertain. You guys need an upgrade :D
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.
Sorry,
Jon
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
Want to retreive data?Quote:
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
www.solonde.com
without having to pay for a program??, VB code would be better
hi,
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.... On Error Resume Next intidx = 1 Do If ObjMaterialtab(intidx, 1) = "" Then Exit Do End If Text1.Text = Text1.Text & ObjMaterialtab(intidx, 1) & " - " & ObjMaterialtab(intidx, 2) intidx = intidx + 1 Loop '--logoff sap ObjR3.connection.LOGOFF '--turn off the button Command1.Enabled = True End Sub
----
ps just scanned the net - found this info - mentions similar code being developed on 3.1h (presume thats the gui ver numbers)
prereqs for working are
1- ms - MFC42.dll, MSVCIRT.dll, MSVCP60.dll
2- sap- LIBRFC32.dll
3- sap- load & register ocx'x WDTAOCX.ocx, WDTLOG.ocx,WDTFUNCS.ocx
sap.functions is in wdtfuncs.ocx
----
dunno worth a try - if no use sorry, cheers AJP
----
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 :)
good luck!
dont have the ocx, would you add in a programQuote:
1- ms - MFC42.dll, MSVCIRT.dll, MSVCP60.dll
without the ocx the program will not work
hi
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
sorry my fault its the ocx`s i havent got?
hi,
i probably not allow to propagate controls that arnt mine - sorry
did U try the ftp site i mentioned..
:)
yeah had a quick look however couldnt use the control