cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt in a custom method in a custom BO

Former Member
0 Kudos

Hi All,

I have a doubt in one of the methods I am writing in a custom BO.In the meethod I have written certain select statements and after fetching some data and calculation I am also updating some custom tables too.

No what I am confused about is whether this method will work as i am basically writing ABAP in it. Also i have 3 export parameters but am not sure what will be their use as I am just updating saome tables in the method. So what exactly is the o/p? At the time of declaration i declared them with a view that I might use the output of the method but am not sure now?

Please guide me on my approach.

Thanks in advance,

Saket.

Accepted Solutions (1)

Accepted Solutions (1)

saumya_govil
Active Contributor
0 Kudos

Hi Saket,

I understand your doubt.

If you feel no need of the output parameters then you can remove them from the method.

Instead you can add a return parameter like sy-subrc to check if the method executed successfully or not.

Hence, you would get rid of unnecessary parameters and woudl also be able to verify that the method ran successfully.

No what I am confused about is whether this method will work as i am basically writing ABAP in it.

Yes, a BO method is capable to run ABAP code. There are few limitations though but most of them can be overcome easily. Try executing your code and check.

Hope this helps!

Regards,

Saumya

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks for the solution.

Former Member
0 Kudos

Hi Saket,

1) a method works like normal Funciton module with import & export parameters.

2) Tasks will be created using theses methods which in turn will be used in the workflow as one of the step.

3) The import parameters are passed from WF container to Task container and then to method container.

4) Then the method will do whatever it is intended to do like wht u hav specified to update som tables. If required u can export some values from the method which again will follow the path to Task -> WF container.

5) The values can be used as input for the next or other steps in the WF.

So it is not necessary that u should always export some values from the method. If u feel that the export parameters are not needed u can delete themand adjust the code accordingly.

Regards,

Sivagami

naval_bhatt4
Contributor
0 Kudos

Most of the ABAP commanda work fine in BO coding .

parameters are for passing the values back to your task and apparently to your workflow .

import parameter are for getting value from task and export is pass value to task .

parameters <-> task <-> workflow .

Its all about binding it right

Former Member
0 Kudos

Thanks for ur reply.But i am not returning any thing out of method as such. I am calling the method through a task to update some tables.So do i really need export parameters here is my doubt?

Thanks,

Saket.