|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
BSP Application using MVC Architecture - Displaying Business Partner data using a BAPI
By Raghava Vakada, Mouri Tech Solutions
To display business partner data using the BAPI bapi_bupa_search_2 on a
BSP application view.
Go to transaction SE80, select ‘BSP application’
from the dropdown list.
Create a BSP application with the name ZMVC_BUPA.
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
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
Double click on the
Write the following code.
CALL FUNCTION 'BAPI_BUPA_SEARCH_2' EXPORTING ADDRESSDATA = ADDRESSDATA CENTRALDATA = CENTRALDATA TABLES SEARCHRESULT = SEARCHRESULT RETURN = RETURN.
Save, check and activate the class.
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
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
©2006-2007 SAPTechnical.COM. All rights reserved.
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG.
Graphic Design by Round the Bend Wizards