Skip to Content
0
Former Member
Jan 06, 2011 at 09:31 AM

Creating counter inside badi.

31 Views

Hi All,

I am using the badi BADI_MATERIAL_REF for defaulting material master. In this i need to make the value blank of the fields

standard price and moving price in veiw Accounting 1 while creating the material in mm01 by using referece material (copying).

In this process the standard price and moving price get copied from reference material.

So i wrote the code to make these two fields blank but this badi gets triggered on each and every veiw. so my problem is that

in the very first time my badi is reseting the value of standard price and moving price. But when the user enters the price and switch to other veiw or save the material, again my badi gets triggered and make the fields value blank.

My system is ECC5.0, So i cant create enhancement point for global counter to put the condition such that my code should get triggered only first time.

Can anyone suggest me for this? Is there any global variable for badi which counts its occurance?

Thanks,

Rudhir Bhaskar.