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

Conversion problem..

Former Member
0 Likes
538

HI all,

I want to do conversion from EA to CS. So that I am planning to use this FM.But my doubt is..

I_EA = EA

I_CS = CS

CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'

EXPORTING

INPUT = lv_qty

  • NO_TYPE_CHECK = 'X'

  • ROUND_SIGN = ' '

UNIT_IN = I_EA

UNIT_OUT = I_CS

  • IMPORTING

  • ADD_CONST =

  • DECIMALS =

  • DENOMINATOR =

  • NUMERATOR =

OUTPUT = lv_qty

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

(OR)

CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'

EXPORTING

INPUT = lv_qty

  • NO_TYPE_CHECK = 'X'

  • ROUND_SIGN = ' '

UNIT_IN = I_CS

UNIT_OUT = I_EA

  • IMPORTING

  • ADD_CONST =

  • DECIMALS =

  • DENOMINATOR =

  • NUMERATOR =

OUTPUT = lv_qty

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

SO which one correct..?

Please tell me..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
508
I_EA = EA
I_CS = CS

CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = lv_qty

NO_TYPE_CHECK = 'X' 
ROUND_SIGN = ' ' 
UNIT_IN = I_EA
UNIT_OUT = I_CS

IMPORTING 
ADD_CONST = 
DECIMALS = 
DENOMINATOR = 
NUMERATOR = 
OUTPUT = lv_qty
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
4 REPLIES 4
Read only

Former Member
0 Likes
509
I_EA = EA
I_CS = CS

CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = lv_qty

NO_TYPE_CHECK = 'X' 
ROUND_SIGN = ' ' 
UNIT_IN = I_EA
UNIT_OUT = I_CS

IMPORTING 
ADD_CONST = 
DECIMALS = 
DENOMINATOR = 
NUMERATOR = 
OUTPUT = lv_qty
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
Read only

0 Likes
508

Hi PATIL,

Here l_qty = 4.000

I have implemented the code as per your suggestion.

BUt this l_qty is remains same. no change is happend.

I think when we done the convertion between EA to CS the l_qty value will be changed know..

please clear my doubt..

Read only

0 Likes
508

It needn't necessarily change. It all depends on the conversion ratio between the EA and CS types.

For material specific info you can check the same in MM03>Additional data>Unit of measure tab, or at table level you can check in EKKO-UMREZ.

Read only

0 Likes
508

Hi Naredra and patil.

Thanks to both..

I got the solution.