Anda di halaman 1dari 10

Building a simple BSP Application to retrieve Material

information
By Vakada Raghava, Mouri Tech Solutions
Go to transaction SE80. Select BSP alication and inut the na!e o" the BSP alication that
you #ant to create.

Save and activate the alication.
Right click on the alication na!e and click createage.

The resultant #indo# aears as "ollo#s.
Enter the na!e o" the age that you #ant to create. $n this case it is the %de"ault.ht!& that $ a!
creating.
Enter the descrition o" the age and click on %continue&.

'lick save.
(ou can o)serve the %ages #ith "lo# logic& and under that you can "ind %de"ault.ht!& age in the
BSP alication tree.
'hange the code in the layout as sho#n in the i!age )elo# or coy and aste the code given
)elo# in the layout #indo#.
<%@ page language="abap" %>
<html>
<body BGCOLOR="#B5E1!" >
<h!> <B> "#$ER%#L E$#%L& <'B> <'h!>
<(o)m method="po*t">
"ate)+al ,umbe)
<+nput type=te-t name="matn)" .alue="" >
<+nput type=te-t name="matn)!" .alue="" >
<p>
<+nput type=*ubm+t name="on%nput/)o0e**+ng1*ele0t2" .alue="Get
eta+l*">
<p>
<+nput type=*ubm+t name="on%nput/)o0e**+ng1mate)+al*2" .alue="Get
#ll">
<p> <0ente)>
<table bo)de)=1>
<% data3 4a5ma)a type ma)a6 %>
<% +( +5ma)a +* not +n+t+al6 %>
<t)> <td><b>"#$,R<'b><'td>
<td><b>ER&#<'b><'td>
<td><b>L#E#<'b><'td>
<td><b>7/&$#<'b><'td>
<'t)>
<% loop at +5ma)a +nto 4a5ma)a6 %>
<t)>
<td> <%= 4a5ma)a8matn) %> <'td>
<td> <%= 4a5ma)a8e)*da %> <'td>
<td> <%= 4a5ma)a8laeda %> <'td>
<td> <%= 4a5ma)a8.p*ta %> <'td>
<'t)>
<% endloop6 %>
<% el*e6 %>
<t)> <td><b>"#$,R<'b><'td>
<td><b>ER&#<'b><'td>
<td><b>L#E#<'b><'td>
<'t)>
<% loop at +t5ma)a +nto &5ma)a6 %>
<t)>
<td> <%= &5ma)a8matn) %> <'td>
<td> <%= &5ma)a8e)*da %> <'td>
<td> <%= &5ma)a8laeda %> <'td>
<'t)>
<% endloop6 %>
<% end+(6 %>
<'table>
<'(o)m>
<'body>
<'html>
'reate the age attri)utes as sho#n )elo#.


Save, 'heck and activate the BSP alication and e*ecute. Enter the login na!e and ass#ord
in the o+u that aears.

The BSP age looks as sho#n )elo#.
$n the %Event ,andler& ta), under %-n$nutProcessing& ta), #rite the code as sho#n )elo# or coy
and aste the code that is given )elo#.


'ode under %-n$nutProcessing&.
C#&E E7E,$5%6
9:E, ;*ele0t;6
,#7%G#$%O,8>&E$5/#R#"E$ER1 ;matn); 26
&ELEC$ < =RO" "#R# %,$O $#BLE %5"#R# 9:ERE "#$,R BE$9EE, "#$,R #,
"#$,R!6
9:E, ;mate)+al*;6
&ELEC$ < =RO" "#R# %,$O $#BLE %5"#R#6
9:E, O$:ER&6
E,C#&E6
'lick on the BSP alication na!e and inut as sho#n )elo#.
Save, check and activate the BSP alication and then e*ecute the alication. The age #ould
)e dislayed as sho#n )elo#.






Enter the !aterial nu!)ers in the te*t)o*es and then click on %Get details&.
The outut #ould )e as "ollo#s.
The outut is a result o" the select .uery that #e "ired selecting the seci"ied set o" "ields.


'lick on the %Get all& )utton to get the outut as "ollo#s.
Re!e!)er, #e have "ired a select .uery selecting all the records "ro! the data)ase ta)le %M/R/&
and are dislaying it.

Anda mungkin juga menyukai