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: 

How to Report on Alternate Unit of Measure

Former Member
0 Kudos

Hi All,

We recently implemented SAP for our Canadian operations. The Canadians want to see all our custom and standard reports in Alternate units of measure ( KG's & Ltr's ) but our reports only display in Lbs & Gal's. We were able to change our custom reports but is there any setting that SAP provides for the standard reports/transactions to display Alt UoM. We don't want to rush in and start changing standard reports. I'm sure, lot of you faced this situation before.

Regards,

Srini

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

use the FM UNIT_CONERSION_SIMPLE

hope this helps

check this code

unit_in = itab-meins

unit_out = 'GLL'.

CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'

EXPORTING

input = itab-meins

  • NO_TYPE_CHECK = 'X'

  • round_sign = ' '

unit_in = unit_in

unit_out = unit_out

IMPORTING

  • ADD_CONST =

  • DECIMALS =

  • DENOMINATOR =

  • NUMERATOR =

output = factor

EXCEPTIONS

conversion_not_found = 1

division_by_zero = 2

input_invalid = 3

output_invalid = 4

overflow = 5

type_invalid = 6

units_missing = 7

unit_in_not_found = 8

unit_out_not_found = 9

OTHERS = 10.

IF sy-subrc <> 0.

e_error = 1.

EXIT.

ENDIF.

Message was edited by: srinu k

6 REPLIES 6

Former Member
0 Kudos

hi,

use the FM UNIT_CONERSION_SIMPLE

hope this helps

check this code

unit_in = itab-meins

unit_out = 'GLL'.

CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'

EXPORTING

input = itab-meins

  • NO_TYPE_CHECK = 'X'

  • round_sign = ' '

unit_in = unit_in

unit_out = unit_out

IMPORTING

  • ADD_CONST =

  • DECIMALS =

  • DENOMINATOR =

  • NUMERATOR =

output = factor

EXCEPTIONS

conversion_not_found = 1

division_by_zero = 2

input_invalid = 3

output_invalid = 4

overflow = 5

type_invalid = 6

units_missing = 7

unit_in_not_found = 8

unit_out_not_found = 9

OTHERS = 10.

IF sy-subrc <> 0.

e_error = 1.

EXIT.

ENDIF.

Message was edited by: srinu k

Former Member
0 Kudos

try the below function modules:

<b>MC_UNIT_CONVERSION

UNIT_CONVERSION_SIMPLE</b>

0 Kudos

Thanks for FM's. The function modules are good for custom reports. But how about standard SAP transactions like MC.A, MC.B, MC.C and whole bunch of others which report in the base UoM.

S

Former Member
0 Kudos

Hi,

TCODE- CUNI. It is in the Global settings. There you define a base unit of measure and set a conversion for each other unit of measure in respect to the base unit of measure

Regards

Sudheer

Former Member
0 Kudos

Thanks for your answers. We have been successful in converting all our custom reports to display both Base UoM and Alt UoM but our issue is with standard SAP delivered reports ( about 10 reports in all ). They all output in GAL/LB butI want them to output in GAL/LB for US and Litres/KG for Canada.

Regards,

S

Former Member
0 Kudos

We ended up copying and modifying standard reports.