Application Development 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: 

Writing form routines in Badi and exception handling

Former Member
0 Kudos
207

Hi!

I have following two questions:

1. can any one help me with procedure to write form routines in Badi

2. How to handle exceptions in Badi.

Regards,

Digvijay

1 ACCEPTED SOLUTION

Former Member
0 Kudos
74

Hi Digvijay,

BAdI implementation is just like implementing a interface.

For calling form routines inside implemented BAdI methods - subroutines are private to a function group in which they are created. You can create a private method in your implementing class with same code and call this private method in main method. Or else you can create a wrapper of Function Module over the subroutine and call it.

For exception handling - see that if BAdI interface methods has any exceptions declared, if yes you can just raise these exceptions from your implemented class method and catch it outside.

Regards

Manas Dua

1 REPLY 1

Former Member
0 Kudos
75

Hi Digvijay,

BAdI implementation is just like implementing a interface.

For calling form routines inside implemented BAdI methods - subroutines are private to a function group in which they are created. You can create a private method in your implementing class with same code and call this private method in main method. Or else you can create a wrapper of Function Module over the subroutine and call it.

For exception handling - see that if BAdI interface methods has any exceptions declared, if yes you can just raise these exceptions from your implemented class method and catch it outside.

Regards

Manas Dua