Application Development and Automation 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: 
Read only

BADI --Global data defination--URGENT

Former Member
0 Likes
1,833

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.

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

Regards,

Ravi

13 REPLIES 13
Read only

Former Member
0 Likes
1,669

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

Regards,

Ravi

Read only

0 Likes
1,669

Hi ravi,

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

Regards,

Disha.

Read only

Former Member
0 Likes
1,669

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.

Read only

0 Likes
1,669

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.

Read only

0 Likes
1,669

Try making these as static attributes.

Regards,

Ravi

Read only

0 Likes
1,669

How do i make these static?

Disha.

Read only

0 Likes
1,669

Hi,

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

Regards,

Disha.

Read only

0 Likes
1,669

Hi,

ANy suggestions???

Regards,

Disha.

Read only

Former Member
0 Likes
1,669

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

Read only

0 Likes
1,669

Hi AKshay,

Can you pls elaborate on this attribute definition???

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

Regards,

Disha.

Read only

0 Likes
1,669

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

Read only

0 Likes
1,669

hi,

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

Disha.

Read only

0 Likes
1,669

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:)