Beginners’ Guide for Localization in SAP MII
h2. The Step by Step Solution h4. +Step 1: Creation of Database Table+ Let us start by the creation of a table that stores data about Material, Material Description, Batch, Quantity, and Unit of measure for example. Make sure that the quantity field is always in either integer, or float datatype (as required by the business). This is necessary because at some regions, the numeric format used by the users is in “*,*” format rather than “.” format. That means, “,” is used as a decimal point and “.” as a separator. If the quantity looks like “10,000.345” for India and US, it might look like “10.000,345” for Brazil and France. *++*
h4. +Step 2: Creation of SQL Query+ Create a SQL Query that fetches the fields mentioned in Step 1 from the table. The result of the SQL Query will look like:
Note that the result of SQL query will always be in “.” for values saved as Float datatype. For the user to see it in the “,” format, it is explained in the later steps. h4. +Step 3: Creation of BLS+ Instead of fetching the data from MII DB table, we can fetch the data from a RFC also. For this purpose, we need to create a Business Logic Service. For storing the data returned by the called FM, we need to create a XML document with the columns being returned by the FM.
It’s also possible that the FM returns some data like Material description in region specific language. In that case, we need to send the language while executing the FM. This can be done by creating a transaction variable named “Language”. Once the BLS is executed via Xacute Query which is called from the irpt page, the user’s Browser Language is automatically fetched and set to the FM through this transaction variable.
This transaction variable is then mapped to the Language field of the FM in the action block where the FM is executed:
That’s all needs to be done here. *+
+*
h4. +Step 4: Creation of Xacute Query and Display Template+ Create the Xacute Query that calls the above transaction to fetch the data and a display template of grid type that displays this data (we can either call the Xacute query, or the SQL query that we created in Step 2). 