on 07-04-2011 9:13 AM
i have used a JCO in netbeans-JSP to create a connection with sap and have retrieved data in a table in the .jsp file.
i want to know whether we can create a grid and bring the data into it, in a jsp as well.
If possible to create a data grid, please give me an example.
Study below given link....
http://www.roseindia.net/jsp/data-grid.shtml
once you manage to create a data grid in JSP....then populating it with rfc data will be a cakewalk for you.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The process seems to be confusing me.
actually i have established a connection and retrieved data and displayed it in a table.
the code for data display in table is as fillows.
repository = JCO.createRepository("MYRepository", SID);
try {
// Get a function template from the repository
IFunctionTemplate ftemplate = repository.getFunctionTemplate("YABAP_FM4");
// Create a function from the template
JCO.Function function = new JCO.Function(ftemplate);
// Get a client from the pool
JCO.Client client = JCO.getClient(SID);
JCO.Field fld = function.getImportParameterList().getField("I_KUNNR");
fld.setValue(user.getdealer());
// We can call 'RFC_SYSTEM_INFO' directly since it does not need any input parameters
client.execute(function);
// The export parameter 'RFCSI_EXPORT' contains a structure of type 'RFCSI'
// JCO.Structure s = function.getExportParameterList().getStructure("S_VBAK");%>
<%
JCO.Table tableList = function.getTableParameterList().getTable("T_VBAK");
%>
<TABLE width="auto">
<thead >
<tr>
<% for (JCO.FieldIterator fI = tableList.fields();
fI.hasMoreElements();) {
JCO.Field tabField = fI.nextField();%>
<th BGCOLOR ='#154c71' style="color:blanchedalmond" align='center'><font style="font-family: Broadway" size="2">
<%=(tabField.getName())%></font></th>
<% }%></tr>
</thead>
</table >
<div style="height: 400px;overflow:auto;overflow-x:hidden;width:auto ">
<TABLE width="auto">
<tbody>
<%if (tableList.getNumRows() > 0) {
do {%>
<tr>
<% for (JCO.FieldIterator fI = tableList.fields();
fI.hasMoreElements();) {
JCO.Field tabField = fI.nextField();%>
<td BGCOLOR ="blanchedalmond" style="color:black" align='center'><font style="font-family: Arial Rounded MTarial" size='2' >
<%=(tabField.getString())%>
<BR></font></td><%}%></tr>
<%} while (tableList.nextRow() == true);
}%>
</tbody>
</TABLE>
</div>
________________________________
please help me replace the table with datagrid.
Edited by: crimsonnoel on Jul 6, 2011 9:22 AM
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.