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: 

BAdI doesn't get called

Former Member
0 Kudos

Hi experts,

With the Transaction SE18 I created a BAdI for the printout of an invoice.

But it doesn't get called with the following code:


GET BADI bd_sd_bil
   FILTERS
      filter_billing = 'filter_name'.

In SE18 the BAdi is activated. Does it have to be activated elsewhere?

Kind regards,

Benjamin

1 ACCEPTED SOLUTION

guilherme_frisoni
Contributor
0 Kudos

Hi Benjamin,

assuming you did create the implementation and activated it, the next step should be to set the filter properly. This BADI needs a filter option to be called.

Set Value1 with your Smartforms Object and check if it is called.

Ps.:

You don't need to replace, just create another implementation like I did, ZTEST below.

But this BADI doesn't allow multiple implementations with the same filter, so each implementation will be called for its own form name.

Regards,

Frisoni

15 REPLIES 15

ShrutiJoshi
Active Contributor
0 Kudos

Hi Benjamin

The format to call a BADI is

CALL BADI { badi->meth         parameter_list }
         | { badi->(meth_name) {parameter_list
                               |parameter_tables} }.


Please refer the below link for details:


ABAP Keyword Documentation

0 Kudos

Hi Shruti,

Thanks for your help,

I guess my question was not exactly enough. The problem is, that Get BADI determines the original SAP-BAdI and not the new customer-BAdi. Any further ideas why the customer BAdi doesn't get determined?

Kind regards,

Benjamin

0 Kudos

Hi Benjamin,           Make sure that you have been activate it also try to make a break point or watch point and see if it is called or not.

0 Kudos

Hi Abd El-Rahman Abu Shady,

The BAdi is acitvated in the Transaction SE18. Does it have tobe activated elsewhere?

I already debbuged it, unfortunately the standard-BAdi gets called.

0 Kudos

Please share the BADI name also the transaction

0 Kudos

The BAdI's name is BADI_SD_BIL_PRINT01 respectively Z_BADI_SD_BIL_PRINT01. It gets called by the print program SD_INVOICE_PRINT01 for the invoices (VF03).

0 Kudos

So, Z_BADI_SD_BIL_PRINT01 is not a copied BADI, its an enhancement spot created throw the original BADI. Try to access it and see if it is active or not.

gabmarian
Active Contributor
0 Kudos

Hi Benjamin,

I am a bit confused here. As far as I understand you dont want to create a new BAdI definition, but rather an implementation to the existing BADI_SD_BIL_PRINT01.

For creating an implementation transaction SE19 should be used.

BR,

Gábor

0 Kudos

Hi Gabor,

           

For this BADI its not supported, only enhancement point is applicable.

gabmarian
Active Contributor
0 Kudos

Hi,

How do you mean that it is not supported?

In the definition of the BAdI I dont see that it is marked for internal usage only, and the system offers me the opportunity to create a new one.

Former Member
0 Kudos

Hi Gábor,

I created both a BAdi defination and implemtation. But the standard BAdI instead of mine gets called.

Any futher ideas?

BR

Benjamin

gabmarian
Active Contributor
0 Kudos

Hi Benjamin,

In this case, you dont need to create a definition, only an implementation which will replace the default implementation of BADI_SD_BIL_PRINT01.

Have you created you implementation for BADI_SD_BIL_PRINT01? If you have, you should see it in SE18 under the "Implementation" list of the BAdI (in addition to the standard ones). Could you check it?

BR,

Gábor

0 Kudos

I am working on SAP ECC 6.0, when I tried to create it from SE19 this message appear  : BAdI definition BADI_SD_BIL_PRINT01 does not exist Message no. ENHANCEMENT190 Diagnosis The BAdI definition you chose does not exist. Procedure Try using the name of an existing BAdI definition. And from SE18 system created an enhancement spot !

Former Member
0 Kudos

Hi Gábor,

Replacing the implentation of BADI_SD_BIL_PRINT01 looks like a good way. I will try this.

BR.

Benjamin

guilherme_frisoni
Contributor
0 Kudos

Hi Benjamin,

assuming you did create the implementation and activated it, the next step should be to set the filter properly. This BADI needs a filter option to be called.

Set Value1 with your Smartforms Object and check if it is called.

Ps.:

You don't need to replace, just create another implementation like I did, ZTEST below.

But this BADI doesn't allow multiple implementations with the same filter, so each implementation will be called for its own form name.

Regards,

Frisoni