Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI tech process

Former Member
0 Likes
716

Hello Experts,

We have a legacy system which has a shared tables, where I have to post the accounting documents to SAP system which should be a bi directional data transfer . As the management had decided to use BAPI for these posting.

Now my concern over these whether

1) I have to use synchronous BAPI or Asynchrounous BAPI?

2) In order to achieve bi directional flow do I have use two BAPI's one inboound and another outbound.

3) Is it good to download the posting into a file and use BAPI to upload them?

4) Please <b>thorugh some light on good Design and process to achieve it</b>.

Please also send some documents,ppts,links....etc to sdn.sap.com@gmail.com.

Thanks in Advance,

SDN powered

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
647

<b>Hi

For ur queries....

1) I have to use synchronous BAPI or Asynchrounous BAPI?

Ans: There is nothing like synchronous BAPI or Asynchrounous BAPI like Call transaction.

Its always synchronous.

2) In order to achieve bi directional flow do I have use two BAPI's one inboound and another outbound

Ans: u have to use two BAPIS,i.e-One for posting accounting documents and other for displaying accounting documents posted in SAP.

3) Is it good to download the posting into a file and use BAPI to upload them?

Ans:First make CS File for Accounting documents.Then upload it to an internal table thru GUI_UPLOAD FM

Then For every records in internal table

Call BAPI-'BAPI_ACC_DOC_POST' and fill all the parameters from internal table to the BAPI parameters.Note Do the correct mapping.

Then Call-'BAPI_TRANSACTION_COMMIT' for commiting database.

This is the process u have to follow.

Mark points if helpful.

Regs

Manas Ranjan Panda</b>

5 REPLIES 5
Read only

Former Member
0 Likes
648

<b>Hi

For ur queries....

1) I have to use synchronous BAPI or Asynchrounous BAPI?

Ans: There is nothing like synchronous BAPI or Asynchrounous BAPI like Call transaction.

Its always synchronous.

2) In order to achieve bi directional flow do I have use two BAPI's one inboound and another outbound

Ans: u have to use two BAPIS,i.e-One for posting accounting documents and other for displaying accounting documents posted in SAP.

3) Is it good to download the posting into a file and use BAPI to upload them?

Ans:First make CS File for Accounting documents.Then upload it to an internal table thru GUI_UPLOAD FM

Then For every records in internal table

Call BAPI-'BAPI_ACC_DOC_POST' and fill all the parameters from internal table to the BAPI parameters.Note Do the correct mapping.

Then Call-'BAPI_TRANSACTION_COMMIT' for commiting database.

This is the process u have to follow.

Mark points if helpful.

Regs

Manas Ranjan Panda</b>

Read only

Former Member
0 Likes
647

first, you can code in the user-exit when posting the accounting, these codes can send the those information out from SAP,

seconde, at the another side(system), after you got those information that inbound from first step, you can call BAPI to posting accounting documents

by the way, synch or Asynch is also up to your middleware...

Read only

0 Likes
647

Hello Aaron,

Thanks for response. Please be more elaborate on the below.

"you can code in the user-exit when posting the accounting, these codes can send the those information out from SAP"

Thanks

SDN powered

Read only

0 Likes
647

hi, you can try t-code: FIBF, and click "entironment" on the menu then choose the first item(in my memory) in the list, you can find the transaction what your want to post such as 00001030 (just guess), double click this item to find the function module, copy this FM to new FM what you can make code( to send out those information from this system ).., finally replace the original FM by your new FM...

Read only

Former Member
0 Likes
647

Programming a BAPI consists of some tasks like:

• Defining BAPI Data structures ( using SE11 )

• Creating BAPI Function Modules (For each method)

• Defining BAPI Methods in the BOR

• Generate and release

1. Defining BAPI Data structures: This is the basic step followed while creating BAPIs. All the relevant structures that are required for BAPI have to be created using T-Code SE11. The structures can be created for Import/Tables parameters.

2. Creating BAPI Function Modules: We must create new function group for each BAPI. If the BAPIs are related then the same can be grouped under the same FUNCTION GROUP to enable the sharing of global data amongst the related BAPIs.

3. Defining BAPI Methods in the BOR: When creating a new object type in BOR (Business Object Repository), there can be two possibilities. Either it is created as a subtype of an existing business object or it is created as a new business object from scratch. Create a business object using the T-Code SWO1. The business object gets created with the standard interface that contains an Interface IFSAP, an Attribute ObjectType, and two methods namely ExistenceCheck and Display. All these cannot be changed. You can add a method to the business object. For this, we will choose from the menu path, Utillities -> API methods -> Add method. To use the business object Object type status has to be set to Implemented.

4. Generate and Release: Go to SE37 and release the API enabled Function module. In the Object created in the BOR, set the status of Object Type Component to Released.

You can then display the BAPI in the BAPI Explorer. Invoke the same using the T-code BAPI.

To have more details abt BAPI, have a look at below links.

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

http://www.allsaplinks.com/bapi.html

http://www.allsaplinks.com/bapi_example.html

http://www.erpgenie.com/sap/abap/bapi/example.htm

http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.htm

http://www.sapgenie.com/abap/bapi/example.htm

I hope it helps.

I have also sent docs to you. Please check the same.

Best Regards,

Vibha

*Please mark all the helpful answers