01-30-2008 11:35 AM
Hi all,
I have next issue:
When i do:
SELECT meins
FROM MARA
INTO l_meins
WHERE mara = i_matnr-matnr.
IF l_meins EQ 'TS'......
The value of l_meins should be TS but select returns TH. But when you go to MARA through SE16 and insert the matnr and meins (with TS) you obtain the result but MEINS has TH value. Again, if you do a double click in the line, MEINS appears with TS.
Are there any FM to convert TH into TS?
I can't use T006 talbe because i have the same issue.
Thx
01-30-2008 11:44 AM
hi Manel,
this happens because there are conversion exits behind MEINS. This means, everything is stored in German in the database, but displayed in logon language (you can turn this off in SE16). In ABAP you have to handle this accordingly.
The following FMs are used for the conversion:
CONVERSION_EXIT_CUNIT_INPUT
CONVERSION_EXIT_CUNIT_OUTPUT
hope this helps
ec
01-30-2008 11:44 AM
hi Manel,
this happens because there are conversion exits behind MEINS. This means, everything is stored in German in the database, but displayed in logon language (you can turn this off in SE16). In ABAP you have to handle this accordingly.
The following FMs are used for the conversion:
CONVERSION_EXIT_CUNIT_INPUT
CONVERSION_EXIT_CUNIT_OUTPUT
hope this helps
ec
01-30-2008 11:44 AM
In the data element MEINS, there is a domain MEINS. navigating to this domain you can see there is a conversion exit bound to that domain.
so these two FM´s might be quite useful for you.
CONVERSION_EXIT_CUNIT_INPUT
CONVERSION_EXIT_CUNIT_OUTPUT
01-30-2008 11:46 AM
Some values stored in database tables are not the same when they are displayed.
This is because they pass through conversion routine when they are displayed.
If you check the converison routine for MEINS in its domain, it is CUNIT
i.e FMs :CONVERSION_EXIT_CUNIT_INPUT
CONVERSION_EXIT_CUNIT_OUTPUT
Execute the FM CONVERSION_EXIT_CUNIT_INPUT to find out the storage value.
INPUT= TS will give OUTPUT=TH
Execute the FM CONVERSION_EXIT_CUNIT_OUTPUT to find out the display value.
INPUT= TH will give OUTPUT=TS
In code you will always have to use the storage value i.e TH in your case.
Else if you want to convert it to TH use the FM CONVERSION_EXIT_CUNIT_INPUT