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: 

Customer BadI

Former Member
0 Kudos

Hi Guys,

hobe anybody can help.

I created a customer enhancement spot and in there a badi definition. This badi has a interface which inherits the interface IF_BADI_INTERFACE.

Name of the enhancement spot: ZTEST_EH

Name of the badi definition: ZTEST_BADI_D

Interfacename : ZIF_TEST_BADI_D

Badi is defined as single use.

The interface has one methode called change_address with importing parameter iv_partner and changing parameter cv_address.

At the moment i want no implementation of the badi. I only want to insert the badi call in my class and implement the badi when i need it.

So in my class i insert following code:


data: obj_badi type ref to ZTEST_BADI_D.

get badi obj_badi.

call badi->change_address
  exporting
    iv_partner = lv_partner
  changing
    cv_address = lv_address.

If i try to activate my coding, i get the message that the method CHANGE_ADDRESS ist unknokn or private.

Can anybody help?

Regards,

Anton

10 REPLIES 10

Former Member
0 Kudos

hi

Check the Change_address method is declare prive inVisibilit se24.change as public

0 Kudos

Hi dharma,

at the moment there are no badi implementation. Only a body definition.

At the moment i will only create the BadI definition and place the BadI call in my class. Therefore i set a try and catch arround the body call to catch the exeption if the badi is not implemented.

Regards,

Anton

0 Kudos

Hi,

Change the method level of the interface to Instance Method .......and try

Thanks,

Shailaja Ainala.

0 Kudos

Hi Shailaja Ainala,

its a instance method.

Regards,

Anton

0 Kudos

Hi,

Its working for me ......check all the steps once again

Thanks,

Shailaja Ainala.

Pawan_Kesari
Active Contributor
0 Kudos

check your syntax.. its CALL BADI obj_badi ..

data: obj_badi type ref to ZTEST_BADI_D.
 
get badi obj_badi.
 
call BADI obj_badi->change_address
  exporting
    iv_partner = lv_partner
  changing
    cv_address = lv_address.

Edited by: Pawan Kesari on Feb 4, 2010 6:58 PM

0 Kudos

Hi Pawan Kesari,

i used pretty print in my code. So there it is CALL BADI.

But that is not the problem.

Regards,

Anton

0 Kudos

>

> Hi Pawan Kesari,

>

> i used pretty print in my code. So there it is CALL BADI.

>

> But that is not the problem.

>

> Regards,

> Anton

Hi Anton,

What message you get with call BADI obj_badi->change_address ..

 
call BADI obj_badi->change_address
  exporting
    iv_partner = lv_partner
  changing
    cv_address = lv_address.

0 Kudos

Hi Pawan,

that the method not exist....

Regards,

Anton

0 Kudos

Hi Guys,

thanks for your help but i resolved my problem. But i didn`t know how.

I deleted my enhancement spot and my badi definition and created them new. And now it works......

Regards,

Anton