cancel
Showing results for 
Search instead for 
Did you mean: 

i sapscript main window how to use conversions

Former Member
0 Kudos

Hi,

I have a Packing List script Layout, i want to display Weight of kgs into Tons but i know 1Ton = 1000kg.

But can any budy tell me regarding how to use conversions from kgs to tons in main window of form and also how to code that conversion in print program.

Also give some examples.

Thanks,

vamsykrishna.

if satisfied reward points

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

use FM in print program and pass the value to script



CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = l_matnr
i_in_me = 'TON'  "check this value that u have to pass
i_out_me = 'KG'
i_menge = l_gsmng
IMPORTING
e_menge = l_gsmng
EXCEPTIONS
error_in_application = 1
error = 2
OTHERS = 3.