WhatsApp Button




top of page

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 —

  1. Standard BAPI — BAPI created by SAP labs.


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

69 Comments


LLWIN mình thấy nhiều người nhắc nên hôm trước rảnh rỗi vào nghía thử cho biết. Không phải kiểu vào để chơi hay soi kèo gì đâu, mình chỉ tò mò xem web họ làm có dễ dùng không. Cảm giác đầu tiên là giao diện nhìn khá “thoáng”, chữ không bị dồn dập, nên đọc lướt vẫn hiểu đang nói về gì. Mình có kéo xuống phần giới thiệu quá trình hình thành với định hướng phát triển, thấy viết gọn gàng, kiểu ai quan tâm thì đọc thêm chứ không nhồi nhét. Điểm mình thích là trang tải cũng nhanh, chuyển mục không bị giật lag. Nói chung nhìn họ chăm chút phần trình bày, nhất là các…

Like

GO88 mình thấy bạn bè nhắc vài lần nên cũng bấm vào coi thử cho biết thôi. Mình không có ngồi đọc kỹ hay làm gì nhiều, chủ yếu lướt qua xem giao diện họ bố trí ra sao. Cảm giác đầu tiên là trang nhìn khá dễ chịu, không bị dồn chữ lung tung nên kéo xuống cũng nhẹ đầu. Mấy phần nội dung được chia thành từng khối rõ ràng, nhìn phát là biết đang ở đoạn nào chứ không bị lẫn. Mình thích kiểu trình bày dạng bảng cột của họ, thông tin nằm gọn gàng nên liếc nhanh vẫn nắm được ý chính. Với lại cái menu đặt ngay chỗ dễ thấy nên chuyển qua lại…

Like

hitclub dạo này thấy mọi người nhắc hoài nên mình cũng bấm vào coi thử cho biết thôi. Mình không có ngồi đọc kỹ hay tham gia gì, chủ yếu xem cách họ làm giao diện ra sao. Lướt vài phút thấy trang trình bày khá “thoáng”, nhìn không bị rối mắt, kiểu chia nội dung thành từng khối nên kéo xuống vẫn dễ theo dõi. Cái mình ưng nhất là phần menu để khá lộ, bấm qua lại giữa các mục nhanh, không phải tìm vòng vòng. Nói chung cảm giác giống mấy trang làm gọn gàng, ai mới vào cũng bắt nhịp được liền. Mình chỉ cần vậy để xem cho đỡ mất thời gian, và đúng là…

Like

https://sv368.parts/ mình cũng chỉ ghé thử vì thấy mọi người nhắc hoài, chứ không định tìm hiểu sâu. Vừa vào cái là thấy bố cục khá “thoáng”, chữ không bị dồn nên nhìn đỡ mệt mắt. Mình để ý họ chia nội dung theo kiểu từng khối rõ ràng, kéo xuống lướt nhanh vẫn biết đang xem phần nào, không bị lạc. Cái mình thích nữa là menu đặt dễ thấy, bấm qua lại giữa các mục khá mượt, không phải mất công mò. Nói chung cảm giác dùng vài phút là quen tay, không cần đọc hướng dẫn gì. Nhìn tổng thể, cách họ trình bày dạng khối và căn cột thông tin gọn gàng làm trang trông rất…

Like

https://nhacaiuytin.sh/ hôm trước mình lướt thấy ai đó nhắc nên bấm vào xem thử cho biết, kiểu tò mò giao diện với cách họ trình bày thôi. Vào cái là thấy họ tập trung vào dạng tổng hợp và đánh giá, nổi bật nhất vẫn là mấy bài kiểu “top 10 nhà cái uy tín” nên nhìn lướt cũng đoán được chủ đề chính. Mình thích chỗ họ chia nội dung gọn gàng, mỗi phần có tiêu đề rõ và đoạn giới thiệu ngắn nên đọc không bị mệt. Kéo xuống một chút là thấy các khối nội dung xếp theo kiểu dễ theo dõi, không bị nhồi chữ. Nói chung cảm giác như họ cố làm cho người xem…

Like
bottom of page