Skip to Content
0
Former Member
Jan 02, 2010 at 06:48 AM

How to find out top 10 records from the R/3 using Java code (WD Program)

16 Views

Hi Experts,

I have used Java Web Dynpro program to fetch records from the backend. Following code helps me and fetches record. As per the customer reqirement, we have to fetch only top 10 records (Actual Cost) from the backend. So I have to modify the Java code. How I can do so? Please help.

		wdContext.nodeGraphData().invalidate();
		IPublicCostcnt.IGraphDataElement categoryElement;
			for (int i = 0; i < wdContext.nodeItab_Final1().size(); i++) {
			categoryElement = wdContext.createGraphDataElement();
			categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
			categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
			categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
			wdContext.nodeGraphData().addElement(categoryElement);
		}

Regards,

Gary