cancel
Showing results for 
Search instead for 
Did you mean: 

Using of Assistance class?

former_member194142
Participant
0 Kudos


Hello

I have created a WDA, wherein I created a assistance class.

In my MAIN view, I have a my_action_method, here am pulling the data from database, hence I wrote a FETCH_ORDERS method in the assistance class and I am calling this method from my_action_method, I specified assistance class's FETCH_ORDERS as INSTANCE method, pls. let me know is it OK of INSTANCE method or I should go with STATIC method in assistance class?

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi, what the visibility of the assistance class methods you created. For E.g : - Instance method with visibility as public, wd_assit->FETCH_ORDERS to get orders in your method. Thanks, Chaitanya.

former_member194142
Participant
0 Kudos

Yes, pls. Its PUBLIC

Thank you

ramakrishnappa
Active Contributor
0 Kudos

Hi,

Its fine to call an instance method of your assistance class from your action method and no need of static methods as you have wd_assist object created by the WDA framework.

You can access all methods ( instance public methods ) of your assistance class like 

WD_ASSIST->FETCH_ORDERS( ).

In your case, the static method call is not required.

To understand more about static methods & instance methods, please refer the below link

ABAP Static vs Instance method - Which to use when? - ABAP Help Blog

Hope this helps you.

Regards,

Rama

former_member194142
Participant
0 Kudos

You are awesome,

Thank you for providing the link

former_member194142
Participant
0 Kudos

Hello Rama,

When you get a chance pl. look into my below thread bcz its stopping our users, its about how & where SAP is populating a attribute? I'm not sure whether your system has this WD component or not to have a better look? Thank you

http://scn.sap.com/thread/3757494?start=0&tstart=0

ramakrishnappa
Active Contributor
0 Kudos

Sure

former_member194142
Participant
0 Kudos

Hi Ramakrishna,

When you get a chance pl. help us, pl. check below  question,

http://scn.sap.com/thread/3769244

Thank you

Answers (0)