Hi friends
These my requirement :
Use Function Module MD_CONVERT_MATERIAL_UNIT. Pass the following data:
I_MATNR = VBAP-MATNR I_IN_ME= VBAP-VRKME I_OUT_ME = “MSF” I_MENGE = VBAP-KWMENG & Execute
Use E_MENGE |
T006A-MSEHT Pass “MSF” (UOM as described above) to T006A-MSEHI. |
when i am writing the below code instead of getting conversion result iam getting kwmeng values in the output.....help me
if sy-subrc eq 0.
DATA: lv_msf LIKE mara-meins,
lv_menge TYPE ekpo-menge.
LOOP AT git_output INTO gwa_output.
SELECT msehi
mseht
FROM t006a
INTO TABLE git_t006a
WHERE msehi = 'MSF'.
lv_menge = gwa_output-kwmeng.
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = gwa_output-matnr
i_in_me = gwa_output-vrkme
i_out_me = 'MSF'
i_menge = lv_menge
IMPORTING
e_menge = lv_lfimg "lv_menge
EXCEPTIONS
error_in_application = 1
error = 2
OTHERS = 3.
IF sy-subrc = 0.
** Implement suitable error handling here
gwa_output-kwmeng = lv_menge.
ELSE.
lv_menge = gwa_output-kwmeng.
ENDIF.
MODIFY git_output from gwa_output TRANSPORTING kwmeng.
ENDLOOP.
ENDIF.