cancel
Showing results for 
Search instead for 
Did you mean: 

Interactive table help.

Former Member
0 Kudos

we have established connection to SAP R/3 using JCO and obtained RFC table and displayed it in a jsp page.

Now we are trying to extend the project..

ie, now we are trying to click on a field in the table displayed (table 1 in the jsp page) and the field value should be passed to another RFC and a second table should be displayed in the page.

If we click on a different value the 2nd table should change accordingly.

kindly give some suggestions...

Thank you...

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I hope you already have your second RFC in place..with a field(table cell value) as import parameter and a table as export...

1. Form JSP1 in you table when you click a cell(a hyperlink on cell) call JSP2/Servlet2....

Pass the value of clicked cell in URL for JSP2/Servlet2...

<td ><a href="JSP2.jsp?id=<%=rs.getInt("id")%>">    <%=rs.getInt("id")%>    </a> </td>

2. In your JSP2/Servlet2 fetch record for this new table and display it...

Edited by: Saurabh Agarwal on Aug 3, 2011 3:17 PM

Former Member
0 Kudos

Hi Saurabh,

Thankyou for the suggestion.

Here you have give the answer for the tables to be seen in 2 different pages.

What i am searching is to view both the tables in the same page.

ie. in jsp1 we have a table, on selecting a field i need the corresponding table populated under the table1 itself.

on selecting another field the table2 should change accordingly.

Thankyou..

Former Member
0 Kudos

In that case you can redirect the flow from JSP2/Servlet2 to JSP1/Servlet1 once the processing has been done in JSP2/Servlet2..

1. You got JSP1 with displayed table and a link on some cell...

2. User Click on cell and calls JSP2/Servlet2.....

3. Now in Servlet2 you call your second RFC and store output in Java Bean...

4. Keep this bean in session or request object and call JSP1 again...

The trick will be to hide Table2 in JSP1 if Bean produced in Step4 is empty/Null....(which will be the case when application is accessed first time)

However, doing this as an end user you will observe a page refresh.....

To avoid this you can use the concept of Ajax in you application......

Former Member
0 Kudos

deleted

Edited by: Saurabh Agarwal on Aug 3, 2011 3:18 PM