cancel
Showing results for 
Search instead for 
Did you mean: 

can we use call method or call action in dynpro.

Former Member
0 Kudos

hi all,

In the view of a web-dynpro, can we call one action inside another action..?

or can we call a method inside an action..

if so plz help...

thanks in advance,

jithin.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

hi,

let me make my requirements clear...

i have created an action 'CREATE'..where i create a new material..

now i need to initialize my veiw once again by calling 'WDDOINIT' (Controller Initialization Method).. is this possible?

i need to initialize my view so that the new material i created comes under the dropdown in the view..

is there any alternative for this this..?

thanks in advance,

jithin

former_member188831
Contributor
0 Kudos

Hi Jithin,

Suggest you that, you keep your logic in a method which you are using for create(event).

the same method you can call in modifyview so that after you create again the modifyview will get trigger and then it fills your dropdown.

or

after create functionality is done then call a method to fill the dropdown.

try to modularize your code using methods then you can

re-use it.

still you need any clarificatinos let me know.

Regards,

Mahesh

Former Member
0 Kudos

Hi mahesh,

can u please tell me how to call the 'CREATE' method in the modifyview.

it will be really helpfull if u can give a code sample with the export and import parameters..

as u know this 'Create method' is a method which i have created for the Create action.

thanks in advance,

jithin

Former Member
0 Kudos

please help...

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

This is just normal ABAP coding. You call this method like you would any other method in ABAP. I don't understand where the confusion is. If you are calling the method from the same controller, the object prefix is WD_THIS.

If you need help calling the method, there is even support in the WD Code Wizard. There is Method Call in Current Controller and Method Call in Used Controller. It is put a code stub in place for the parameters as well.

Former Member
0 Kudos

Hi,

When you create a Action , a method is created for that action and in this method you can call another method only but not any Action or method of any Action.

So Method inside method is possible but not Aciton inside Action is not possible.

I hope it is clear to you.

Thanx.

Former Member
0 Kudos

Hi,

The action (in the sense that you are probably referring to) is actually kind of an event handler method. It is not really possible (or doesn't make sense) to "call another action from an action". Include your logic to a reusable method in the view controller, and then call this method (the wizard will do this automatically for you) in your actions.

Regards,

Karri

Former Member
0 Kudos

Jithin,

as far as i know we can call a method inside an action but not an action inside another action

Thanks

Bala Duvvuri