tags:

views:

940

answers:

4

I've been working with applications interfacing with SAP via a web service for a little while now and I want to get into programming the BAPI's behind the web services as well. My company has been using a SAP consultant for the BAPI programming and I'd like to move into filling that role also.

I have a decent amount of experience with the core functionalities of SAP as an end user, so I'm not completely new there. But I've never done any BAPI programming before and I've had a hard time finding good beginner guides. I'd like to find something for experienced programmers that takes you from the SAP equivalent of "hello world" to writing business critical BAPIs.

I've heard that BAPI coding is similar to coding in SQL, is that true?

Also, I'd like to find a free online guide, but I realize that might be wishful thinking so any comprehensive books would also be helpful.

+2  A: 

I'm not sure about online resources, but there are a couple of quite good books to learn ABAP programming, you'd be looking for ABAP basics and/or ABAP objects (the latter one sounds better and more "advanced" but is typically just a more modern version of the language). One suggestion I've used in the past that is going quite a long way is this book. As these are "Enterprise books", be prepared to spend a bit more money than for a paperback book.

Topics that should be covered:

  • Data dictionary (SAPs term for definining tables, structures etc.)
  • Report programming
  • GUI programming (not really required)
  • functions (not sure about the English translation for "Funktionsbaustein", it is a function with parameters etc,. but defined in the data dictionary)
  • transactions

This would be some basics you should know before advancing to understanding BAPIs ..

BAPIs are just SAP provided functions (coded in ABAP and extensible) that are more "stable" between releases (i.e. they do not change all that much) and that can be called from within a SAP system or from "the outside" (either another SAP system or a non-SAP program).

SAP provides a lot of BAPIs (you can add your own if you want) that allow programs to do a lot / more of the stuff that users can do through the SAPGUI. Even though SAP's preferences are changing "daily", it is the preferred way of programming the SAP system on a higher level than just ABAP, comparable to plain Java vs. programming with an elaborate class library.

A lot of ABAP programming is like working in a 4GL (that's why it used to be called ABAP/4), lots of handling data you are reading/writing to a database, but also outputting that data to a user and handling user input. I'd describe it as a weird mixture between COBOL and VB ,,, and certainly a good skill to have.

IronGoofy
Thanks a lot for the answer! It seems ABAP knowledge is kind of rare here. I think our system is SAP R3. Will the book you linked also be teaching things from R4 that aren't in R3?
Daniel
I hate to ask .. but what's R/4???
IronGoofy
Oh sorry, there is no R4, only R3. I was confusing the release version (4.x). But I thought I read somewhere that ABAP had new features added to it at some point, like inheritance and other object oriented things. But since R3 is the latest version probably my system's ABAP has the latest features.
Daniel
Oaky, then what you are looking for is Object Oriented ABAP, and yes, the book should explain the concepts as implemented in ABAP. Not exactly sure what version of the Basis Module (where ABAP is implemented) has which features.
IronGoofy
+1  A: 

Hi,

what your developer calls 'BAPI coding' really is RFC coding. BAPI's are an object oriented approach to coding where each method is an RFC. If you want to write RFC ( Remote Functional Calls ), then there is this good step by step RFC tutorial :

http://help.sap.com/saphelp_nw04/helpdata/en/26/64f61dfa8911d386e70000e82011b8/content.htm ( Only step 1 and 2 are of real importance to you )

Biggest beginner errors is :

  • Not setting the remote callable flag

Beware though, ABAP seems deceptively easy and I've seen terrible things written by developers who thought that knowing the syntax and SE11 was enough. As a junior ABAPer you should always have your specs/code vetted by a senior ABAP coder.

T.

tomdemuyt
Thanks for the note of caution, it's a good idea to get my code checked before actually using it on production. I have some knowledge of RFC already, but that guide will be good for putting it into context with SAP. Thanks for the help.
Daniel
A: 

hi, you may be find some novice SAP guides to help you on the following website :

http://www.sharesap.com

A: 

There are some specifics around BAPI programming as well - it's not just that the interface is stable or a fancy name for an RFC function module.

If a remotely-callable ABAP function module is to be called a BAPI, then it must meet certain transactional criteria (ACID).

See http://help.sap.com/saphelp_nw04/helpdata/en/a5/3ec8654ac011d1894e0000e829fbbd/frameset.htm

Dom