The condundrum of managing languages for materials in the world of SAP with MM01 and MM02
By Winshuttle Staff Blogger on Jun 7, 2012
It’s been data clean up time, resulting from some data mangling as part of the demonstration routine. I thought I would look at a couple of optional ways to do this with Winshuttle Transaction. Around the release of v8.4 a couple of years ago, we introduced index based loops in Transaction for GUI scripting use on transaction screens that contained tables or grids.
SAP users that are familiar with these types of screen artifacts know that the way these tables and grids have been developed have used a number of different types of navigation.
In MM01 and MM02 for example, the additional data material descriptions tab for multilingual description support has really only one control – the Delete Line control. You can use the scroll bar on the right hand side but this is not a recordable action in batch and non batch modes. You would be constrained to using GUI scripting and this is slow and vulnerable to failure if the environment is not consistent.
When you consider the Units if Measure screen, this contains some protected fields except when you are appending data, again there is only the Delete Line control.
Since both of these screens are tricky to work with and you want to avoid using GUI scripting, an option to consider is the SAP BAPI for BAPI_MATERIAL_SAVEDATA.
I’ve previously described how you can use this with long text and with units of measure but I thought that this time it would be useful to look at the basic descriptions in the different languages.
The BAPI itself seemed very easy to expose and manipulate, however I did encounter some issues.
The transaction itself, MM01 or MM02, allows you to specify the Language and the description using a language code and a description however the BAPI only allows you to specify according to ISO 639 as field MATERIALDESCRIPTION-LANGU_ISO and a Language Key as field MATERIALDESCRIPTION-LANGU. Intuitively you would think that the ISO639 identifier is the same as the SAP transaction screen language two character ID however it isn’t.
The ISO639 is in fact the default language of the user and the system. If your system is used by many users with different language sets and you want to provide customized descriptions for each language set, then you would need to load the data for each language set individually. This is possible but probably not necessary.
What is important here is that the identifier for the language itself is often stored as a code rather than as a two letter identifier with some innate intelligence.
Using Winshuttle Query I was able to extract data from my SAP system to determine the language keys from the language tables and here is what I found.
In my IDES system I found just over 1200 language combinations, that may seem strange, however when you examine the T002 and T002T tables you will find that the content has many combinations but most frequently these combinations are derived from a 1:Many relationship between the ISO identifier and the language key.
The language key itself, in my IDES system is represented by a single character, a letter or a number. This is a case sensitive field so ‘a’ is not the same as ‘A’, My system contains 31 ISO definitions. After joining the two tables and extracting the data here is what I found. The language key in my system was actually the identifier for the language shown in my system. Accordingly if I wanted to send data to the BAPI for English, I needed to use ‘E’; that might seem intuitive, however what if I wanted to send data for Estonian? The key in this case was ‘9’. Either way I would still need to send the ISO as ‘EN’ because when I log into my SAP system I typically use EN as my language setting.
I thought it might be an idea to also test what would happen if I tried to login to my system in Korean and surprise surprise, the same data reflected as reflected under my EN login.
You may need to play around with this a little in your DEV or QA environment before taking the final plunge into your production system but the good news is that this approach is relatively painless for changing or adding descriptions or even deleting them for that matter.
For some further reading take a look at the following:
About the author
The Winshuttle blog is written by professional thought leaders who are dedicated to providing content on a variety of topics, including industry news, best practices, software updates, continued education, tips and techniques, and much more.
Questions or comments about this article?
Tweet @Winshuttle to continue the conversation!