cancel
Showing results for 
Search instead for 
Did you mean: 

Returning an array type from a local method in Web Dynpro Java application

Former Member
0 Kudos

Hi,

In my project, we have a requirement to display 18 rolling months along with the year, starting from current month.

How I am going to approach is that I will get the system date and get the current month and send the month and year value to a local method which will return 18 rolling months along with the year.

But, when I tried to create a new method there is no option to return an array type. It was greyed out.

So, we can not return an array type from a method from Web Dynpro for Java application?

If so, what is the alternative and how am I going to achieve it?

I will appreciate your help!

Regards

Ram

Accepted Solutions (1)

Accepted Solutions (1)

nikhil_bose
Active Contributor
0 Kudos

create your new method returns array in between begin others and end section in java editor.


 //@@begin others
 
//@@end

Regards,

Nikhil

Answers (1)

Answers (1)

xavier_aranda
Participant
0 Kudos

HI

You can create new methods in


  //@@begin others
  private ArrayList MyMethod(){
  	// ** Put your code here
  	return new ArrayList();
  }
  //@@end

Other option are create a context node with cardinality 0...n with one or more attributes, and in your method create the needed registers into this node. To read this values, you only need to read your context node.

Best regards

Edited by: Xavier Aranda on Dec 2, 2010 9:41 AM

Former Member
0 Kudos

Thanks to both of you for quick response.

I will be awarding points to both of you.

Regards

Ram