Building a simple BSP Application to retrieve Material information

By Vakada Raghava, Mouri Tech Solutions

Go to transaction SE80. Select BSP application and input the name of the BSP application that you want to create. 


Save and activate the application.

Right click on the application name and click  àcreateàpage. 


The resultant window appears as follows.

Enter the name of the page that you want to create. In this case it is the ‘default.htm’ that I am creating.

Enter the description of the page and click on ‘continue’.


Click save. 

You can observe the ‘pages with flow logic’ and under that you can find ‘default.htm’ page in the BSP application tree. 

Change the code in the layout as shown in the image below or copy and paste the code given below in the layout window. 

<%@ page language="abap" %>
  <body BGCOLOR="#B5E1D2" >
    <h2> <B> MATERIAL DETAILS </B> </h2>
<form method="post">
  Material Number
  <input type=text   name="matnr"  value="" >
<input type=text   name="matnr2"  value="" >
  <input type=submit name="onInputProcessing(select)"  value="Get Details">
  <input type=submit name="onInputProcessing(materials)"  value="Get All">
<p> <center>
<table border=1>
   <% data: wa_mara type mara. %>
   <% if i_mara is not initial. %> 
   <tr> <td><b>MATNR</b></td>
   <% loop at i_mara into wa_mara. %>
   <td> <%= wa_mara-matnr %>  </td>
   <td> <%= wa_mara-ersda  %> </td>
   <td> <%= wa_mara-laeda  %> </td>
   <td> <%= wa_mara-vpsta  %> </td>
 <% endloop.  %> 
 <% else. %> 
 <tr> <td><b>MATNR</b></td>
 <% loop at it_mara into S_mara. %>
   <td> <%= S_mara-matnr %>  </td>
   <td> <%= S_mara-ersda  %> </td>
   <td> <%= S_mara-laeda  %> </td>
<% endloop.  %>
<% endif. %>

Create the page attributes as shown below.                                         


Save, Check and activate the BSP application and execute. Enter the login name and password in the pop-up that appears. 


The BSP page looks as shown below. 

Click here to continue...


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