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: 

How to use Filters in GET BADI ststement in new Enhncement Framework

nitin_gupta
Explorer
0 Kudos

Hi All,

I am working on the new Enhancement Framework in EC 6.0.

I have defined a new BADI Definition Z_BADI_CAL_TAX in the Enhancement Spot. The BADI definition contains a filter 'AB' of character type filter.

Now to instantiate the active implementations of this BAdI through my application program, I am using the GET BADI command in my application program.

DATA: handle TYPE REF TO z_badi_cal_tax.

data: ctry(2) TYPE c value 'US'.

GET BADI handle

FILTERS

ab = ctry .

The program is giving the syntax error:

Formal parameter "AB" does not exist...

I have defined the filter AB in the BAdI. Still this error is coming.

Can you please help me out whether I am using the correct syntax of GET BADI or is their a different way to use filter??

With Best Regards,

Nitin

7 REPLIES 7

Former Member
0 Kudos

Hi Nitin,

Your syntax is fine. Just ensure the BAdi is Active.

Cheers.

0 Kudos

Hi Aditya,

I have checked. The BAdI is active.

Regards,

Nitin

0 Kudos

Hi Nitin,

I just created a new BAdi from scratch with an implementation and invoked it using the GET BADI from a Z program. It worked fine.

Susbequenetly, I have tried a number of steps of trying to get the syntax error you are getting by making deliberate errors. However am unable to reproduce your error.

Just run through this [link|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bb54c452-0801-0010-0e84-a653307fc6fc] and see if you have missed our or made an error in the implementation.

0 Kudos

Hi Aditya,

Thanks for your response. I have looked into the article.

I have also cheched everything. And it should work fine. Because as soon as I remove the filters, the program gives the error - to use the filter 'AB' is mandatory. But when I give the filter, the system does not recognize it.

I am trying to find out what the problem is.

I will update you if I will be able to find the solution.

Best regards,

Nitin

Former Member
0 Kudos

Hi Nitin ,

Can you tell the system in which you are checking this,so that i can narrow down on this problem?

Regards,

Abhishek

0 Kudos

Hi Ahhishek,

I am using SAP ECC 6.0 system.

The GET BADI command is working fine if I do not define any filter in my custom BADI. But as soon as I define the filter in my BAdI, and then if I try to use the GET BADI command in my proram, the above syntax error appears.

I have also tried to use the GET BADI Command for standard BAdI /ISDFPS/BADI_DATAEXP. This BAdI has 2 filters defined in it. And to my surprise GET BADI command worked perfectly fine here. Means the problem is coming only with the custom BAdI with filters.

I want to highlight one point here that my system is giving 'Time Out' dump when I activate any Enhancement Spot. But even after this time out dump, the Enhancement Spot gets Activated. So I am wandering whether this may be the problem in my system itself.

With Best Regards,

Nitin

0 Kudos

Hi Nitin ,

The calling syntax seems to be correct.I dont think its relatd to the dump you are mentioning.Try changing the county parameters by putting/removing Quotes(" ) and see if it helps.

Regards,

Abhishek