‎2008 Jan 24 7:29 PM
All,
Can someone please help me determine why the BAPI BAPI_MATERIAL_GET_ALL returns a German UOM for a material when it is configured in the Material Master as English. For example in MM03 I see three UOMs configured for the material with GAL being the default. When the BAPI runs the data received specifies the UOM to be GLL, which is the German version of GAL. Any ideas or suggestions to fix this? I've tried this with both a German and English user and the BAPI data is always the same.
Thanks.
Sam
‎2011 Aug 25 3:34 PM
We run ECC 6.0 in our company and we noticed a similar issue with BAPI_MATERIAL_GETALL reporting UOM in GERMAN. Our default lang. is English and I am trying to find a resolution to this issue. Really appreciate if someone could suggest how to resolve this issue. Thanks!
‎2011 Aug 25 3:51 PM
Hi,
BAPI is always returning the data in the Input format. The Input format of GAL is GLL. In table level also you will see the same. What you see is ithe output format in MM03. Use CONVERSION_EXIT_CUNIT_OUTPUT to convert GLL to GAL. Even if you login in French you should get the same result.
I hope this helps.
Regards.
‎2011 Aug 26 9:39 AM
BAPI works in internal format (so the "german" language internal code of unit of measure) ([Internal and External Data Formats|http://help.sap.com/saphelp_nw04/helpdata/en/a5/3ec9ea4ac011d1894e0000e829fbbd/content.htm])
Fields in BAPI parameters must be presented in the internal form used in the database and not in a form formatted in the BAPI interface.
Reason : The internal format is used since the server cannot anticipate client-specific data.
So i you want to display data in external format you must convert it, you can use classical conversion exit FM, or WRITE statement, or even use BAPI BapiService.DataConversionInt2Ext1 (BAPI_CONVERSION_INT2EXT1)
Regards,
Raymond
‎2011 Aug 31 2:54 AM
HI sam,
Check as Raymond suggested.You have to convert that UOM by using FM.
Regards,
Madhu.
‎2011 Sep 06 1:45 PM
'GLL' is the ISO-Code for 'GAL' (at least as SAP is concerned). The BAPI always uses the ISO-code, and the conversion is done with FM 'UNIT_OF_MEASURE_SAP_TO_ISO'.
‎2011 Sep 06 2:43 PM
The BAPI always uses the ISO-code
There is always a field for internal value, when BAPI returns values it fills both fields, when it receives it only uses ISO code if internal field is empty/not sent. Here BAPI_MATERIAL_GET_ALL returns in CLIENTDATA two fields for the base unit: BASE_UOM (internal code, i.e. german) and BASE_UOM_ISO (ISO code) - You can perform some check by generating some MAP2 FM via transaction BDBS (those generated FM use the required FM to code from and to ISO code)
Read ([Internal and External Data Formats|http://help.sap.com/saphelp_nw04/helpdata/en/a5/3ec9ea4ac011d1894e0000e829fbbd/content.htm])
* ISO codes
In an SAP System, ISO codes are currently supported for language, country, currency, and unit of measure fields.
If you use one or more of these fields in your BAPI you have to make two fields available for each of these fields in the BAPI interface: one field containing the SAP code and another containing its corresponding ISO code. Use the naming convention, Fieldname_for_SAPCode_ISO for the field containing the ISO code.
Implement the BAPI as follows:
o When you export data from the BAPI both fields must contain corresponding values.
o When you import data into the BAPI the ISO code is only significant if no value was given in the SAP code.
Regards,
Raymond