‎2007 Jun 05 8:39 AM
Hi,
Could anybody give sample example to bapi.How to create new bapi and
use it.While coding.(example code required for this.)
Regards
SAISRI
‎2007 Jun 05 8:48 AM
Hi Sai,
Please check following URL.
http://www.erpgenie.com/sap/abap/bapi/example.htm
Award points if found useful.
Regards
Indrajit
‎2007 Jun 05 9:41 AM
hi
BAPIs are standardized programming interfaces (methods) enabling external applications to access business processes and data in the R/3 System.
BAPIs provide stable and standardized methods to achieve seamless integration between the R/3 System and external applications, legacy systems and add-ons.
BAPIs are defined in the BOR(Business object repository) as methods of SAP business object types that carry out specific business functions.
BAPIs are implemented as RFC-enabled function modules and are created in the Function Builder of the ABAP Workbench.
The process of defining and implementing a BAPI consists of the
following steps
Describing the Scenario the BAPI is Used in
Reviewing the BAPI Concept and BAPI Scenario
Defining a BAPI and Its Interface
Creating Individual Programming Objects
Testing the BAPI
Releasing and Freezing the BAPI .
Transaction sw01.
Go to transaction sw01 (that is Tools->Business Framework -> BAPI Development ->Business Object builder ) .
Select the business object ( generally of type BUS nnnn ) , according to the functional requirement for which the BAPI is being created.
Open the business object in change mode. Then Select Utilities ->API Methods ->Add method.
Then enter the name of the function module and select Continue
In the next dialog box, following information needs to be specified :
Method : Suggest an appropriate name for the method,
Texts : Enter description for the BAPI,
Radio buttons : Dialog, Synchronous, Instance-independent . BAPI s are usually implemented synchronously.
Now, select Next step.
To create the method select Yes in the next dialog box.
After the program has been generated and executed, check the program in the method just created
Please check the following link,,,,
<b>please reward if useful...</b>
Regards
Dinesh
‎2007 Jun 05 9:49 AM
Hi,
Here is the link which explaines how to create a New BAPI with screen shots
http://www.erpgenie.com/abap/bapi/example.htm
Regards
Sudheer
‎2007 Jun 06 4:29 AM
BAPI stands for Business Application Programming Interface. It is a set of interfaces to object-oriented programming methods that enable a programmer to integrate third-party software into the proprietary R/3 product from SAP. For specific business tasks such as uploading transactional data, BAPIs are implemented and stored in the R/3 system as remote function call (RFC) modules.
There are 5 different steps in BAPI.
- Create BAPI Structure
- Create BAPI Function Module or API Method.
- Create BAPI object
- Release BAPI Function Module.
- Release BAPI object.
<b>Step1.</b> Creating BAPI Structure:
- Go to <SE11>.
- Select Data Type & Enter a name.
- Click on Create.
- Select Structure & hit ENTER.
- Enter the fields from your database. Make sure that the first field is the Primary Key Field.
- Then SAVE & ACTIVATE.
<b>Step 2.</b> Creating BAPI module:
- Enter Transaction code <SE37>.
- Before entering any thing, from the present screen that you are in, select the menu
Goto -> Function Groups -> Create Group.
Enter a name (Note: This name Must start with ZBAPI)
Let this screen be as it is and open another window and there, enter transaction code <SE80>.
Click on Inactive Objects.
Select the group that you just created and click on Activate.
- Go back to <SE37> screen and enter a name and hit <ENTER>. Then enter the group name that you just created and activated.
Now click on the first Tab that says [ATTRIBUTES] and select the radio button that says remote-enabled module since we will be accessing this from any external system.
Then click on the second tab that says [IMPORT].
Enter a PARAMETER NAME, TYPE and the structure you created in the first step. Also select the check box Pa. All remotely enabled functional modules MUST be Pa enabled, where Pa means Passed by Value and if you dont select Pa, then that means it will be passed by reference..
Then click on tab that says [EXPORT].
Enter the following as is in the first three fields
RETURN TYPE BAPIRETURN (These 3 field values are always same)
Here also select Pa meaning Pass by value.
Note: BAPIRETURN contains structure with message fields.
Then SAVE and ACTIVATE.
<b>Step 3.</b> Creating BAPI object:
- Enter Tr.Code <SWO1> (Note. It is letter O and not Zero).
- Enter a name and then click on create. Enter details.
- Enter Application M, if you are using standard table Mara. If you are using your own database then select Z at the bottom.
- Then hit <ENTER>.
- Now we have to add Methods. High light METHODS and then select the following from the menu: Goto Utilities -> API Methods -> Add Methods.
- Enter function Module name and hit <ENTER>.
- Select the second FORWARD ARROW button (>)to go to next step.
- Check if every thing looks ok and again click on FORWARD ARROW button (>).
- Then select YES and click on <SAVE>.
- Now on a different screen goto TR.CODE <SE37>. Enter Function Module name and select from the top menu Function Module -> Release -> Release.
- Goback to TR.CODE <SWO1>.
Here select the menu combination shown below in the same order.
- Edit -> Change Release Status -> Object Type Component -> To Implemented.
- Edit -> Change Release Status -> Object Type Component -> To Released.
- Edit -> Change Release Status -> Object Type -> To Implemented.
- Edit -> Change Release Status -> Object Type -> To Released.
- Then click on <SAVE>.
- Then click on Generate Button (4th button from left hand side looks like spinning wheel).
- Then Click on the button that says PROGRAM to see the source code.
To check if this is present in work flow goto transaction code <BAPI>.
Here it shows business object repository.
- First click on the middle button and then select ALL and hit ENTER.
- Goto tab [ALPHABETICAL] and look for the object that you created. This shows that the BAPI object has been created successfully.