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

...Previous

Modify layout code for the search view (input.htm) as shown below. 

 

Code :

Code : 
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
  <htmlb:page title = "Input page ">
    <htmlb:form>
    <P><CENTER>
<BR><BR>
<BR><BR>
<htmlb:label for="//BUPAOBJ/ADDRESSDATA.CITY1" />
<htmlb:inputField value="//BUPAOBJ/ADDRESSDATA.CITY1" />
<htmlb:label for="//BUPAOBJ/CENTRALDATA.PARTNER" />
<htmlb:inputField value="//BUPAOBJ/CENTRALDATA.PARTNER" />
   <htmlb:label for="//BUPAOBJ/CENTRALDATA.MC_NAME1" />
<htmlb:inputField value="//BUPAOBJ/CENTRALDATA.MC_NAME1" />
   <htmlb:label for="//BUPAOBJ/CENTRALDATA.SEARCHTERM1" />
<htmlb:inputField value="//BUPAOBJ/CENTRALDATA.SEARCHTERM1" />
<htmlb:button text = "GET BUPA" onClick = "myclick1" />
    </htmlb:form>
  </htmlb:page>
</htmlb:content>

2) Create second view. 

 

 

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

 

Modify layout code for the search view (output.htm) as shown below. 

 
Code : 

<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
  <htmlb:page title = "Output page ">
    <htmlb:form>
      <P><CENTER>
<BR><BR>
<BR><BR>
 <htmlb:tableView id="SEARCHRESULTS" table="//BUPAOBJ/SEARCHRESULT"
                            visibleRowCount="10" width="10">
 <htmlb:tableViewColumns>
 <htmlb:tableViewColumn columnName="PARTNER"/>
 <htmlb:tableViewColumn columnName="ADDRESSGUID"/>
 <htmlb:tableViewColumn columnName="ADDRESSTYPE"/>
 <htmlb:tableViewColumn columnName="COMPANY_PARTNER"/>
 <htmlb:tableViewColumn columnName="PSTAT"/>
 </htmlb:tableViewColumns>
 </htmlb:tableView>
<P><CENTER>
<BR><BR>
 <htmlb:tableView id="BAPIRET2"
               table="//BUPAOBJ/RETURN"
     visibleRowCount="10" width="10">
 <htmlb:tableViewColumns>
 <htmlb:tableViewColumn columnName="TYPE"/>
 <htmlb:tableViewColumn columnName="MESSAGE"/>
 <htmlb:tableViewColumn columnName="PARAMETER"/>
 <htmlb:tableViewColumn columnName="SYSTEM"/>
 </htmlb:tableViewColumns>
 </htmlb:tableView>
    </htmlb:form>
  </htmlb:page>
</htmlb:content>

create a controller for the application as shown below. Right click on the application name à Create à Controller. 

 

Input the description of the controller and click on the continue button.

 

The screen appears as shown below.

Continued...

 

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