Skip to Content

Question on inbound idoc and need to change the unit of measure

Jan 10 at 04:30 PM


avatar image


My requirement is that an inbound idoc has UOM ( unit of measure as PCE ) and its trying to create a representative number, if the UOM is PCE it should be changed to EA, I had found one standard exit LVED4F0Z, but the problem is I am not sure where I can implement the change for changing the UOM. pfa screenshot.




capture.png (53.5 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Raymond Giuseppi
Jan 11 at 06:12 AM

PCE, EA and ST are already the same UOM, but in french, english and german languages (check CUNI conversion exit)

10 |10000 characters needed characters left characters exceeded
SAPEKSH GUPTA Jan 10 at 05:16 PM

Hi Bala,

Please check what is the ISO Code for ALE/EDI for 'Each' in transaction CUNI. (Transaction CUNI -> Unit of measurement (no dimensions).

Whatever is the value maintained there, your Idoc should have that value in the inbound idoc (E1EDP10-VERME) and it will get converted to SAP unit by FM 'ISO_TO_SAP_MEASURE_UNIT_CODE'.

Just to let you know that 'PC' or 'EA' might internally be stored as 'ST' as is visible in your debug session. You should check this in table T006. More often units are stored after an internal format conversion. Therefore, their internal value might look different from external value.


Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Sapeksh,

Thanks for the reply, yes you are correct the E1EDP10-VERME field is converted from PCE to ST using ISO_TO_SAP_MEASURE_UNIT_CODE,. Now how to achieve my requirement to change the unit of measure from PCE to EA , If I find a suitable exit in LVED4F0Z and modify the XIDOC table where E1EDP10-VERME value is changed to EA will lit work or will it have any impact. I understood that if we change the setting in CUNI the value is changed, but the functional consulatnt is not willing to change the Customization for CUNI transaction.




You need not worry about ST. In bebug mode it will appear as 'ST' only while to outside world, it will be shown as 'EA' provided this is the setting in CUNI.

In fact, in all your logic to do any postings (say Material Document) or for any processing, you must pass the UoM (MEINS) as 'ST', meaning that you have to pass the value in internal format of the unit. Otherwise, the BAPIs will throw an error saying 'UoM "EA" is not defined.'

While in all your SAP transactions, the UoM will automatically be displayed in its external format i.e. 'EA'., meaning when you display the material document in MIGO (or through table MKPF from SE16N), the UoM would automatically show a value 'EA', while internally it would be stored as 'ST'.

Note that: If you are using BDC, then you have to pass 'EA' to the UoM field, meaning BDC will accept the value in external format.

To convert the UoM from internal to external and vice versa you can use below conversion routines (FMs):



To summarize (for your case and as per your CUNI):

SAP Internal Meas. Unit : 'ST' <=> Display in output/screen-fields : 'EA' <=> ISO Code: 'PCE'.


Hi Sapeskh,

Actually I am getting data from INBOUND IDOC so if i chnage the UOM from PCE to EA in user exit LVED4F0Z that means in the internal table XIDOC where segname equal to E1EDP10 -VRKME field can I able to meet the requirement?

please suggest.