cancel
Showing results for 
Search instead for 
Did you mean: 

How to display JCO.Table in jsp, CRM ISA

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

kyo_choi2
Participant
0 Kudos

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.

Former Member
0 Kudos

Hi Sunil,

Hope the document was useful.I am facing the same problem,

In fact I am aware of this thread also

Till now I have no solution. But when ever I come across some tip surely I will mail that to you. Thanks for the rewarding points.

Regards

Kathirvel

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Kathirvel,

The code is good. Where is the JCO.Table being passed to the jsp page from the Action class.

Is PR the JCO.Table in the code?

Can you please show me how to pass the jco table from the Action to the JSP page.

Appreciate your help.

Thanks,

Sunil

Message was edited by: sunil kumar