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 --Global data defination--URGENT

Former Member
0 Kudos

Hi all,

I have a problem reg BADI implementation....I have a BADI LE_SHP_DELIVERY_PROC where i need to use the 2 methods "SAVE_AND_PUBLISH_DOCUMENT" and

"SAVE_DOCUMENT_PREPARE".

Now in the 1st method i populate 2 internal tables whose data i require in the second BADI.

By what means can i get the data of these tables in my second method also?Which is the best method??EXPORT/IMPORT,ZTABLE??

Please help..

Thanks & Regards,

Disha.

13 REPLIES 13

Former Member
0 Kudos

EXPORT / IMPORT is the way to go. You should not create custom tables for these purposes.

Regards,

Ravi

0 Kudos

Hi ravi,

Thanks for the info,...Could complete the reqt wwith EXPORT/IMPORT...Rewarded you the points..

Regards,

Disha.

Former Member
0 Kudos

Hi Disha,

On the first screen of your implementation you will find the name of the implementing class. Double click on the class, go to change mode and the attributes tab. Define your internal table here.

In this way you can use the tables in both methods.

Regards,

John.

0 Kudos

Hi John,

Thnaks a lot for the info...But i ahev folowed ur suggestion and defined the internal tables in the attribute TAB..But when i am go in the DEBUG mode for the 2nd method...The tables are initial(no data passed from the 1st method)...

Any suggestions on this?Please help...

Regards,

Disha.

0 Kudos

Try making these as static attributes.

Regards,

Ravi

0 Kudos

How do i make these static?

Disha.

0 Kudos

Hi,

I have tried making these static also...Still no diffrence.

Regards,

Disha.

0 Kudos

Hi,

ANy suggestions???

Regards,

Disha.

Former Member
0 Kudos

Hi Disha,

After populating the internal table in method 1,

have you populated the attribute of class like:

(say attrib_itab is your custom attribute)

me->attrib_itab = itab[].

This will populate the attribute in 1st method and then will be availale to your 2nd method.

Regds,

Akshay Bhagwat

Message was edited by: Akshay Bhagwat

0 Kudos

Hi AKshay,

Can you pls elaborate on this attribute definition???

Particularly how shud i define it(Prop lik private/static)..

Regards,

Disha.

0 Kudos

Hi Disha,

This can be a Private attribute (of your Z class for BADI ) which will be table type and of same structure as itab work area( i.e the structure which you want to populate in your custom method.)

Regds,

Akshay

0 Kudos

hi,

can you elaborate on "me->attrib_itab = itab[].?

Disha.

0 Kudos

Hi Disha,

If your problem is not solved yet, here is the explanation which you required:

'me' : is the self reference of BADI class.

attrib_itab: is the table type attribute which you will

be defining for this BADI class.

itab[]: is the internal table which you are populating

in your method 1 of BADI,

by executing the statement me->attrib_itab = itab[], it will asssign internal tables values to attribute and hence will be available to you for all other method calls after this assignment.

Hope it clarifies your doubt.

Regards,

Akshay Bhagwat

Some points would be nice if it helps:)