Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function Over riding.

Former Member
0 Likes
792

I m new to ABAP programming. Please let me know that is it possible to call a funtion inside a function. if possible please let me know if funtion over riding is applicable in ABAP/4.

4 REPLIES 4
Read only

Former Member
0 Likes
753

Hi Hitanshu,

Yes it is possible to call a function from a function or to a subroutine from a subroutine. Function overriding is not possible in ABAP. But can you tell me why do you want to override a function.

Regards,

Komal.

Read only

0 Likes
753

Hi Komal,

Thanx for the info. Actually i was looking for a way to pass a user defined function into an another function.

I was just looking for a more convenient way other than exporting tables back into the main program and passing those tables back into another function.

Read only

0 Likes
753

Hi Hitanshu,

you cannot pass a function to another function.

If both the functions are custom functions then one way to do this is to assign both functions to single function group and define a global internal table which if you initialize in one function it will be available to other function. you won't need to export it back and pass it again to other function.

alternatively you can use EXPORT/IMPORT to memory.

Regards,

Komal.

Read only

nablan_umar
Product and Topic Expert
Product and Topic Expert
0 Likes
753

If both those functions are custom, you can call the second function from your first function. This way, your main program won't need to receives the internal table from the first function, then pass it to the second function.