cancel
Showing results for 
Search instead for 
Did you mean: 

How to call a custom method of same view?

former_member202077
Participant
0 Kudos

Hello

I am developing a WDA on ABAP. I kept 3 LTA (Link To Action, kind of hyper link) on the initial_view, they perform the below functions (pls. note all the below 3 are on the initial_view ONLY),

1) LTA_1 -> Creates 'A' -> The linked EVENT for this LTA is CREATE_A

2) LTA_2 -> Creates 'B' -> The linked EVENT for this LTA is CREATE_B

3) LTA_3 -> Creates 'A' and 'B' -> The linked EVENT(onAction) for this LTA is CREATE_A_and_B, fine.

I wrote the ABAP code for creating the 'A' for LTA_1 in the associated Event Handler(method), same way i did for B

Now, for LTA_3 (Event is CREATE_A_and_B), i do not want to replicate the code from LTA_1 and LTA_2.

1) So, i guess, i just call the above )Event Handler) methods sequentially in CREATE_A_and_B's ABAP editor, am i right?

2) If so, pls. let me know how to call these methods, say, just for A, so that i will call for B on my own. Normally, we call as below

my_Class->my_method_name

3) If so, there is not-optional parameter as WDEVENT, just i need to pass blank for it?

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

data: wdevent TYPE REF TO CL_WD_CUSTOM_EVENT.
 
wd_this->CREATE_A ( exporting wdevent = wdevent ).
wd_this->CREATE_B ( exporting wdevent = wdevent ).

Answers (1)

Answers (1)

former_member202077
Participant
0 Kudos

Any help pls.?

Thank you

former_member199125
Active Contributor
0 Kudos

In 3rd LTA action , just call the 2 methods consequentially.

wd_this->first method()

wd_this->second method()

Regards

Srinivas