BSP Application using MVC Architecture - Displaying Business Partner data using a BAPI

By Raghava Vakada, Mouri Tech Solutions

Requirement: To display business partner data using the BAPI bapi_bupa_search_2 on a BSP application view.


1)       Go to transaction SE80, select ‘BSP application’ from the dropdown list. 


2)       Create a BSP application with the name ZMVC_BUPA. 


3)       Creating a Model Class:

Go to transaction SE24 and enter the name of the class as shown below.

Class name: ZBUPA_MODEL 


In the pop up window that appears, enter the description and then click on the ‘save’ button.


In the class, go to the properties tab and then specify the superclass for the new model class so that all the methods and attributes will be inherited to the model class.

You can uncheck the checkbox ‘Final’.


Add attributes to the new model class. Please create table types for those attributes in the tables tab of the BAPI. Here, you can see that I have used the table types to refer to the attributes of our class. 


Add a method to the new model class to get the business partner details


Modified method implementations 

Double click on the GETBUPA method.

Write the following code. 

   ADDRESSDATA                       = ADDRESSDATA
   CENTRALDATA                       = CENTRALDATA
    SEARCHRESULT                      = SEARCHRESULT
    RETURN                            = RETURN.


Save, check and activate the class. 


1)       Create view: In transaction SE80, Right-click on the BSP application name and navigate to CreateàPage. 


As shown below, enter the name and description of the view that you want to create. Select the radio button ‘View’, and then click on the ‘Continue’ button. 


Give the page attributes of the view. The attribute of the view is an object reference of the model class that we created previously.



Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image