on 09-07-2005 3:06 AM
Hi,
I have got a JCO.Table with results from teh CRM system and now want to display this in ISA.
Is there any templates, or code, that could guide me as to how to transfer the table to jsp.
thanks,
sunil
You can also use CRM BAdI to pass the table contents then read it from the JSP directly without creating any Action or Backend objects.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunil,
The code from bean class is here,
public void listDetails(String releaseGroup,String releaseCode)
throws Exception
{
try
{
if (mRepository == null )
{
System.out.println("NuLL");
}
try
{
IFunctionTemplate ft=mRepository.getFunctionTemplate("BAPI_REQUISITION_GETITEMSREL");
myFunction=ft.getFunction();
}
catch (Exception ex)
{
throw new Exception(ex + "Problem retrieving JCO.Function object.");
}
if (myFunction == null)
{
System.exit(1);
}
mConnection.execute(myFunction);
JCO.ParameterList input = myFunction.getImportParameterList();
input.setValue(releaseGroup,"REL_GROUP");
input.setValue(releaseCode,"REL_CODE");
input.setValue(releaseFlag,"ITEMS_FOR_RELEASE");
System.out.println("Imported");
}
catch (Exception ex)
{
ex.printStackTrace();
System.exit(1);
}
mConnection.execute(myFunction);
JCO.Table codes = null;
codes =myFunction.getTableParameterList().getTable("REQUISITION_ITEMS");
size =codes.getNumRows();
if (size == 0)
{
System.out.println("No value matches the selection cretaria");
}
purchaseRequisitionNo = new String[size];
item = new String[size];
requestorName = new String[size];
description = new String[size];
creatorName = new String[size];
purchaseRequisitionDate = new String[size];
plant = new String[size];
// getter methods
public int getSize() { return size; }
public String getPurchaseRequisitionNo(int i){return purchaseRequisitionNo<i>; }
public String getItem(int i) { return item<i>; }
public String getDescription(int i) { return description<i>; }
public String getCreatorName(int i) { return creatorName<i>; }
public String getPurchaseRequisitionDate(int i)
{return purchaseRequisitionDate<i>; }
public String getplant(int i) { return plant<i>; }
Now in the JSP page get the number of entries in the table and try to get row by row from the bean class using the row number.
<%
int count = PR.getSize() ; // This method will return the number of
rows in the table.
for ( int i = 0; i < count ; i++ ) {
%>
<TR><TD ALIGN = "center"><%= PR.getPurchaseRequisitionNo(i) %> </TD>
<TD ALIGN = "center"><%= PR.getItem(i) %> </TD>
<TD ALIGN = "center"><%= PR.getDescription(i) %></TD>
<TD ALIGN = "center"><%= PR.getCreatorName(i)%> </TD>
<TD ALIGN = "center"><%= PR.getPurchaseRequisitionDate(i)%> </TD>
<TD ALIGN = "center"><%= PR.getplant(i)%> </TD>
<% } %>
Hope this is a simple way to get your requirement.
Let me know if this does not help you.
Thanks
Kathirvel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kathirvel,
I actually have ISA, with CRM 4.0 at the back end.
I am assuming the code you had posted is from ISA for R/3 as back end.
My email id is pubbs48@yahoo.com.
Could I e-mail the code that I have written, for the Back End object. I can also send the code in the jsp page that I am trying to get. If you send a test e-mail, I will reply back.
Also, Kathirvel, one of the reqs I have is, how do I get the Userid of a customer who logs in from portals and enters the Internet Sales Application. I need to access this userid in ISA?
I appreciate your help.
Thanks,
Sunil
Message was edited by: sunil kumar
Hi Sunil,
The below jsp code is meant for displaying the table returned from JCo on a JSP page.
<TABLE BORDER="3" CELLSPACING="1" CELLPADDING="1">
<CAPTION>Pendig PR</CAPTION>
<TR>
<TD ALIGN = "center">PR Number</TD>
<TD ALIGN = "center">Item Number</TD>
<TD ALIGN = "center">Description</TD>
<TD ALIGN = "center"> Created By</TD>
<TD ALIGN = "center">PR Date</TD>
<TD ALIGN = "center">Plant</TD>
</TR>
<%
int count = PR.getSize() ; // This method will return the number of
rows in the table.
for ( int i = 0; i < count ; i++ ) {
%>
<TR><TD ALIGN = "center"><%= PR.getPurchaseRequisitionNo(i) %> </TD>
<TD ALIGN = "center"><%= PR.getItem(i) %> </TD>
<TD ALIGN = "center"><%= PR.getDescription(i) %></TD>
<TD ALIGN = "center"><%= PR.getCreatorName(i)%> </TD>
<TD ALIGN = "center"><%= PR.getPurchaseRequisitionDate(i)%> </TD>
<TD ALIGN = "center"><%= PR.getplant(i)%> </TD>
<% } %>
</TR>
</TABLE>
Hope this will help you out.
Thanks
Kathirvel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.