We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE: [sap-dev] Problem with Unit of Measure

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Posted by mauriciosilva (Mauricio Silva (Brasil))
on Sep 30 at 11:03 AM
Mark this reply as helpfulMark as helpful
Edson Luiz,

Look at this FM, maybe it'll help you.

CONVERSION_EXIT_CUNIT_OUTPUT
CONVERSION_EXIT_CUNIT_INPUT

Mauricio

De: R. Neal Wilhite via sap-dev [mailto:sap-dev@Groups.ITtoolbox.com]
Enviada em: quinta-feira, 30 de setembro de 2010 11:48
Para: Mauricio Silva
Assunto: Re: [sap-dev] Problem with Unit of Measure

Posted by R. Neal Wilhite (Senior Project Manager)
on Sep 30 at 10:49 AM Mark as helpful


Ed,

You'll have to define "not OK" for us.

Neal

-----Original Message-----
From: edsonluiz via sap-dev <sap-dev@Groups.ITtoolbox.com>
To: R. Neal Wilhite email@removed
Sent: Thu, Sep 30, 2010 10:36 am
Subject: [sap-dev] Problem with Unit of Measure

Posted by edsonluiz
on Sep 30 at 10:37 AM

Hi All,

Here I am with a new issue.
I have tried to fix but it was not possible.
So, I need your help.

I have a FM :
*"----------------------------------------------------------------------
""Local Interface:
*" IMPORTING
*" VALUE(I_MATERIAL) TYPE BAPIMATVP-MATNR
*" VALUE(I_CENTRO) TYPE BAPIMATVP-WERKS
*" VALUE(I_DEPOSITO) TYPE BAPICM61V-LGORT
*" EXPORTING
*" VALUE(E_UNIDADE) TYPE BAPIMATVP-MEINS
*
DATA:
vunit TYPE bapimatvp-meins

,tab_wmdvsx TYPE TABLE OF bapiwmdvs WITH HEADER LINE
,tab_wmdvex TYPE TABLE OF bapiwmdve WITH HEADER LINE

,vstge_loc TYPE bapicm61v-lgort
,vendleadtime TYPE bapicm61m-wzter
,vav_qty_plt TYPE bapicm61v-wkbst
,vdialogflag TYPE bapicm61v-diafl
,vreturn TYPE BAPIRETURN

,vmat_gen_data TYPE bapimatdoa
,vreturn_detail TYPE bapireturn
,vmat_plant_data TYPE bapimatdoc
,vmat_valuation_data TYPE bapimatdobew
.

CALL FUNCTION 'CONVERSION_EXIT_MATN2_INPUT'
EXPORTING
input = i_material
IMPORTING
output = i_material.

CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'
EXPORTING
material = i_material " bapimatdet-material Material No.
plant = i_centro " bapimatall-plant Plant
* valuationarea = " bapimatall-val_area Valuation area
* valuationtype = " bapimatall-val_type Valuation type
IMPORTING
material_general_data = vmat_gen_data " bapimatdoa General material data
return = vreturn_detail " bapireturn Return Parameter
materialplantdata = vmat_plant_data " bapimatdoc Plant data
materialvaluationdata = vmat_valuation_data " bapimatdobew Valuation area data
.
e_unidade = vmat_gen_data-BASE_UOM.

CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'
EXPORTING
plant = i_centro
material = i_material
unit = e_unidade
stge_loc = i_deposito
IMPORTING
endleadtme = vendleadtime
av_qty_plt = vav_qty_plt
dialogflag = vdialogflag
return = vreturn
TABLES
wmdvsx = tab_wmdvsx " bapiwmdvs Input table (date and quantity)
wmdvex = tab_wmdvex " bapiwmdve Output table (date and ATP quantity)
.
=================================================================

So, when I test this FM into SAP, the answer is e_unidade = EA. This is ok.
But When I consume this FM, the answer is e_unidade = ST. This is not ok.

Please, do I need to do any conversion, as I did with article number?

Thanks in advance,
Edson Luiz

__.____._
Copyright © 2010 Toolbox.com and message author.

Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
Related Content
White Papers

In the Spotlight
Toolbox.com for iPhone: Ask Questions & Get Answers Anywhere. Use the New iPhone App
_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language