on 01-02-2010 6:46 AM
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
Hi,
I got the RFC changed by ABAP team. The modified ABAP code returns records in descending order of actual_cost. After that I selected top 10 records using Java code. It is simple.
I could have done the same work by sorting the records in Java. I could have used sort class.
Anyway issue got sorted out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.