Skip to Content

APO Planning book Change Unit measure in a KF with a Macro.

Hi.

Just i want to know if i can change the KF Value with a Macro, e,g. I have Hectolitres (This is my base unit), but i want to change the value to Box (cs) with out change the key figure unit i only want to change the value.

Can i do it with a funtion macro? I was trying to use a funtion like UNIT_CONV_FACT ( HL ; CJ ) but i didn't have success results.

P.S I cant use a constant value because each material sometimes have different convertion factor.

Thanks in advance

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Apr 24 at 08:24 AM

    Hi,

    In this case, better to new macro function for internal Unit of Measure.

    https://launchpad.support.sap.com/#/notes/1828487

    The enclosed correction provides a new macro function that returns the current Unit of Measure of the keyfigure values table (the tab table).

    Macro function is "ACT_INTERNAL_UOM".
    Here an example of macro usage:
    CURRENT UoM of the loaded data
    Step : ( 1 Iterations : W 03.2013; W 03.2013 )
    Row: Conversion Factor ( Frm W 03.2013 ) =
    UNIT_CONV_FAC( ACT_INTERNAL_UOM ;
    MAT_C( 'MEINS' ; ACT_PRODUCT ) )

    The above macro

    • gets the current UoM ( via "ACT_INTERNAL_UOM" ) ,
    • gets the Base UoM of the current Product ( via "MAT_C" ),
    • and returns the conversion factor into keyfigure "Conversion Factor", via macro function "UNIT_CONV_FAC"

    Best Regards,

    Lingaiah

    Add comment
    10|10000 characters needed characters exceeded