Skip to Content
0
Former Member
Aug 29, 2009 at 05:03 AM

Simple query related to Java and WDTextViewSemanticColor

15 Views

Hi Experts,

I have created WD screen which fetches data from R/3 using RFC. The code is like as below.

public com.sap.tc.webdynpro.clientserver.uielib.standard.api.WDTextViewSemanticColor getMyOpenTripsColor(IPrivateList_trips_appView.IMyOpenTripsElement element)
  {
    //@@begin getMyOpenTripsColor(IPrivateList_trips_appView.IMyOpenTripsElement)
	for(int x=0; x<wdContext.nodeMyOpenTrips().size(); x++){
	  if(wdContext.nodeMyOpenTrips().getMyOpenTripsElementAt(x).getRecommendedActionsTravel().equalsIgnoreCase("Change Travel Request")){
		  wdComponentAPI.getMessageManager().reportSuccess("i "+ wdContext.nodeMyOpenTrips().getMyOpenTripsElementAt(x).getRecommendedActionsTravel()+ "  trpno "+ wdContext.nodeMyOpenTrips().getMyOpenTripsElementAt(x).getTripNumber() );
		
		 return WDTextViewSemanticColor.CRITICAL;
		 
		}
	   if(wdContext.nodeMyOpenTrips().getMyOpenTripsElementAt(x).getRecommendedActionsTravel().equalsIgnoreCase("***Request Cancellation***")){
		  wdComponentAPI.getMessageManager().reportSuccess("j");
		return WDTextViewSemanticColor.MARKED1;
		}
	 }
	return null;

My problem is that there are 47 records in the table (wdContext.nodeMyOpenTrips().size() is 47). When I am executing the following code, only first record is being displayed. The wdComponentAPI.getMessageManager.reportSuccess statements return following records. There are many trip nos in addition to 1427. Why only first record is getting displayed?

hi1 47 
 i Change Travel Request  trpno 1427 
 
 hi1 47 
 i Change Travel Request  trpno 1427 
 
 hi1 47 
 i Change Travel Request  trpno 1427 
 
 hi1 47 
 i Change Travel Request  trpno 1427 

..many more rows (19 rows)

Please help.

Regards,

Gary