BAPI - Choosing The Right Strategy
Updated: May 31, 2022

Business Application Programming Interface
(BAPI)
SAP BAPI (Business Application Programming Interface) is a standard interface to the business object models in SAP products.
BAPIs are the primary method through which customer code and third-party applications interact with SAP products. BAPIs wrap the internal layers of SAP's business object model to ensure that all business logic, validations and authorisation checks are executed properly when accessing or changing business objects.
BAPIs are implemented as function modules that call SAP internal code. Depending on which set of BAPIs is being used, they may call business object models defined using the Business Objects Processing Framework (BOPF) or legacy models defined using programs, tables and function modules.
Types of BAPIs —
Standard BAPI — BAPI created by SAP labs.
List of BAPIs in SAP ABAP — https://wiki.scn.sap.com/wiki/display/ABAP/List+of+BAPI%27s
2. Custom BAPI — BAPI created by users
Uploading data to standard table using standard BAPI (BAPI_BANK_CREATE) .
Coding Screen —


Key points in BAPI programs —

We got these two fields from the function that we called i.e “BAPI_BANK_CREATE”.
Steps to know particular data type for variables —
Step 1 - On “SE37” screen type the desired function module and click on display

Step 2 - Click on import button and you will see the importing parameters. Search for the desired data type or structure. In this case Bank_Address is the required field.

Step 3 - Double click on the Bank_Address and you will see the components in this structure. A variable of this structure type will contain all the components of the structure.

Step 4 - Now go back and click on export button and get the return data type.

Output —


Remote Function Call (RFC)
Communication between applications of different systems in the SAP environment includes connections between SAP systems as well as between SAP systems and non-SAP systems. Remote Function Call (RFC) is the standard SAP interface for communication between SAP systems. RFC calls a function to be executed in a remote system.
There is now a whole series of different RFC variants, each of which has different properties and is used for a specific purpose.
Custom BAPI
Step 1 - Create import and export structure using tcode “SE11”.
Step 2 - Create Function Module using import and export structure using tcode “SE37”.
Step 3 - After creation of Function Module convert it into RFC and release that RFC.
Step 4 - Create business object using tcode “SWO1”.
Step 5 - After BAPI creation we have to add RFC Function module into business object.
Step 6 - At last release business object components and component types and then finally release Business Object.
Step 1 - Create import and export structure using tcode “SE11”.
Import structure —


Enter required fields.

Save the structure in package.

Do same for Exporting structure —

Step 2 - Create Function Module using import and export structure using tcode “SE37”.





Step 3 - After creation of Function Module convert it into RFC and release that RFC.
To convert FM into RFC click on attribute button and select Remote Enabled Module radio button

Enter a return type variable as BAPI has a return type

Source Code —

To release click on SE37 screen type the name of the FM you want to release and then click on “Function Module” option in the top menu.

After that click on release and release.

Step 4 - Create business object using tcode “SWO1”.
Write name of the business object and click on create.

Fill the fields and for application field BAPI is always Cross-application

After filling click on the green tick and save it in package.

Business Object is formed

Step 5 - After BAPI creation we have to add RFC Function module into business object.
Click on utilities in the top menu then API methods and add methods.

After this type the function module created for this program and click on enter. Function module will successfully be entered in the business object.

Step 6 - At last release business object components and component types and then finally release Business Object.
To release click on edit in the top menu then change release status. Now you will see two options. We have to release both object and object components.

Click on object type , 4 options will appear. In order to release first we have to click on ‘To modeled’ then ‘To implemented’ and last on ‘To released’.

Tick symbol will ensure if the object type is successfully released or not.

Likewise do the process for Object type component
Tick ensures if object type component is released or not

Last step is to click on generate (circled icon) and our custom BAPI is successfully created.


ISHNOOR SINGH SETHI





32win chia bài giới thiệu thành từng mục nên nhìn qua cũng khá dễ nắm ý. Mình hay ngại mấy trang mở đầu bằng một đoạn quá dài, kéo mãi vẫn chưa biết thông tin cần tìm nằm đâu. Ở đây có tiêu đề hỏi nền tảng là gì ngay từ đầu, đọc một chút là hiểu bài đang nói về gì, không phải tự ghép ý từ nhiều đoạn. Cách viết vậy hợp với lúc chỉ muốn xem sơ qua, còn phần nào cần thì đọc tiếp sau, cũng đỡ mất công kéo lên kéo xuống. Mình thấy không cần cầu kỳ, chỉ cần phân chia rõ như thế là tiện rồi. Mục hướng dẫn đăng ký cũng có…
B33 làm mình thấy dễ đọc ở chỗ nội dung dài nhưng không dồn hết vào một khối. Mình hay lướt tiêu đề trước rồi mới chọn đoạn muốn xem, nên cách chia mục ở đây khá hợp thói quen đó. Có hôm chỉ định ghé xem vài dòng thôi, gặp bài toàn chữ liền nhau là mình cũng hơi ngại đọc tiếp. Ở đây thì phần giới thiệu và phần nói về đối tác có chỗ ngắt riêng, nhìn qua đã phân biệt được, không cần kéo lên kéo xuống dò lại. Mục hợp tác với hơn 30 nhà phát hành cũng được đặt tiêu đề rõ ràng, ai muốn tìm hiểu thêm có thể dừng ngay đoạn ấy.…
V79 nhìn khá gọn nhờ chia nội dung thành từng khu vực riêng, không có cảm giác mọi thứ chen chung một chỗ. Mình thích cách sắp xếp như vậy vì khi mới ghé một trang, thường chỉ muốn nhìn sơ xem có gì trước đã, chứ chưa muốn đọc hết ngay. Có phần giới thiệu thương hiệu riêng cũng hợp với thói quen của mình, kiểu muốn biết trang nói về gì rồi mới xem tiếp những phần khác. Chỉ nói về cách trình bày thôi nhé, còn nội dung hay chất lượng từng mục thì mình chưa có cơ sở nhận xét. Phần giới thiệu được tách khỏi các nhóm chuyên mục, nên nhìn trên giao diện khá…
s8 có đoạn nhắc kiểm tra đúng địa chỉ trước khi đăng nhập, mình thấy để ý này cũng hay vì mấy tên gần giống nhau nhìn thoáng qua dễ lẫn thật. Bình thường mình chỉ đọc lướt vài đoạn đầu, nên gặp lời nhắc như vậy thì cũng muốn dừng lại xem thêm chút, chứ không bấm vội theo tên quen mắt. Cách chia nội dung bằng tiêu đề rõ ràng cũng hợp với kiểu đọc của mình, cần xem gì thì tìm ngay chỗ đó, không phải đọc liền một mạch. Mình thích kiểu trình bày đơn giản như vậy hơn là câu nào cũng cố làm cho nổi bật. Riêng mục thể thao có biểu tượng quả…
https://tk88.pink/ mình mới lướt qua một chút, chưa vào sâu nên chỉ nói về cách trang sắp xếp thôi nha. Thường gặp trang lạ là mình hơi ngại vì phải nhìn một lúc mới biết nên xem chỗ nào trước. Ở đây thì thấy nhẹ nhàng hơn, các phần có khoảng trống vừa đủ nên đọc lướt cũng không bị rối. Mình thích điểm này vì không phải cứ nhét nhiều thứ lên màn hình là dễ xem. Chưa tìm hiểu nội dung bên trong nên cũng chẳng có gì để nhận xét thêm, nhưng phần trình bày ban đầu khá hợp mắt mình. Thanh menu nằm ở vị trí dễ thấy, muốn đổi sang mục khác thì không phải…