cancel
Showing results for 
Search instead for 
Did you mean: 

adding methods in webdynpro existing code

Former Member
0 Kudos

Hi Friends,

I am trying to add one method in Controller implementation class, when I save the project, the method is commented and declared as obsolete.

I tried using writing the method between @@begin and @@ end comments, but still same problem.

please advise.

Accepted Solutions (1)

Accepted Solutions (1)

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Please do not directly define a method in the implementation. You need to first define your method int he "Methods" tab. Once you do this, the method will be created in the source code or implementation. You can then put your code in the method.

REgards,

Rich Heilman

Former Member
0 Kudos

Thanks Rich!

one more question related to it, I want to make the rturn type of method as Bigdecimal, instead of predefined return types.

How to do it?

Former Member
0 Kudos

Thanks Rich, I got it How to add BigDecimal as method return type!

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

In the methods tab, when click new, select "Method" in the dialog, click next, give you method name, now next to the return type field, there is a button, click it. Now select the Java Native Type radiobutton and click browse. Type "Big" into the field, notice that BigDecimal is now first in the list. Select it and click ok. java.math.BigDecimal has now been populated into the type field. Click ok. You return type now has the correct type. Finish building your method either by clicking "Next" or "Finish".

Regards,

Rich Heilman

Answers (1)

Answers (1)

Former Member
0 Kudos

hi, am new to work in SAP so i want to know how to work