Former Member

# UOM issue when running Macro

Hi All,

I have a requirement here:

I have created a planning area with UOM mentioned as 'KG'. I have KF 'Forecast adjustment(%)' where users put value as %.Actually user is putting just a value and in the background I have written a macro which is converting it into percentage value.

E.g If user put 20 in 'Forecast adjustment(%)' , macro in the background is performing the below calculation :

(1 + 20/100) = 1.2 and multiplying this factor with the KF 'Baseline Forecast.

Now I changed the UOM in planning book through 'Maintain User Settings' into TONs , the values in the KFs are getting converted into TONs which is fine . Now if I put some 20 in 'Forecast adjustment(%)' , it is converting 20 in KGs and performing the below calculation:

20 TON = 20,000 KGs

(1 + 20000/100) = 201 and multiplying this factor with the KF 'Baseline Forecast. Which I don't want.

Say,

If KF 'Baseline Forecast' = 300 TON and 'Forecast adjustment(%) is 20 , then I expect a result = 300 * (1 + 20/100) = 360

but I am getting = 300 * ( 1 + 20,000/100) = 60300 .

Can anybody please suggest how this can be tackled ?

10|10000 characters needed characters exceeded

### Related questions

Posted on Aug 22, 2011 at 10:55 AM

Hi,

What is the UoM maintained for your Forecast Adjustment key figure? If it is Kg, then I think this problem will happen.

Regards,

Manimaran M.

10|10000 characters needed characters exceeded
• Former Member Former Member

HI,

Sorry for the delay in response.

Thanks Nithin for your detail response . Actually I had resolved the issue in the same way as suggested by you .

I have modified the data type of the infoobject in Numbers.

Anyways Thanks a lot for youe help.

• Former Member
Posted on Aug 22, 2011 at 07:24 PM

Hi,

Using macro function DISPLAY_CONV_FACTOR you can meet your requirement.

refer to the note 1480509 for moe details.

Regards,

Sunitha

10|10000 characters needed characters exceeded
• Former Member

Hi Sunitha,

Thanks for your input . I had found that function but was facing some problem to use it.

I will try to use this option as well. As of now I have changed the data type of the infoobject.

Anyways thanks a lot for your help.