‎2008 May 24 9:22 AM
‎2008 May 24 10:25 AM
‎2008 May 24 10:37 AM
hi check this...
ALPHA Conversion Routine
Use
The ALPHA conversion is used in the BW system for each presetting for character
characteristics. The ALPHA conversion routine is registered automatically when a characteristic is
created. If you do not want to use this routine, you have to remove it manually.
The ALPHA conversion routine is used, for example, with account numbers or document
numbers.
Functions
When converting from an external into an internal format this checks whether the entry in the
INPUT field is wholly numerical, whether it consists of digits only, possibly with blank spaces
before and/or after. If yes, the sequence of digits is copied to the OUTPUT field, right-aligned,
and the space on the left is filled with zeros (0). Otherwise the sequence of digits is copied to the
output field from left to right and the space to the right remains blank.
For conversions from an internal to an external format (function module
CONVERSION_EXIT_ALPHA_OUTPUT) the process is reversed. Blank characters on the lefthand
side are omitted from the output.
Example
Input and output fields are each 8 characters long. A conversion from an external to an internal
format takes place:
...
1. '1234 ' -> '00001234'
2. 'ABCD ' -> 'ABCD '
regards,
venkat
‎2008 May 24 11:36 AM
hi there...
Purpose
You use a conversion exit to define a jump to a conversion routine for a column of your output table. As the exit you specify the <conv> part of a function module called CONVERSION_EXIT_ <conv> OUTPUT . For example, you can use conversion exit ALPHA (see function module CONVERSIONEXIT_ALPHA_OUTPUT ) to suppress leading zeros of account numbers.
The conversion exit is implemented through WRITE addition USING EDIT MASK .
Prerequisites
So that the ALV Grid Control can perform the conversion, it must know the internal and the external length of the field, which is the same as the length before and the length after the conversion.
The following example that uses editing template EDIT MASK for the WRITE command shows you how these lengths are specified:
DATA TIME TYPE T VALUE '154633'.
WRITE (8) TIME USING EDIT MASK '__:__:__'. "Output: 15:46:33
In this example, the internal length (of type T) is six characters, while the output length is eight.
The column width (which can be set using the current layout) does not depend on these values and needs not be adjusted accordingly.
Process Flow
Declare the internal and the external length of the field to the ALV Grid Control.
For fields with DDIC reference, the ALV Grid Control automatically uses the internal and the external length.
For fields without DDIC reference, you must specify the internal length using field INTLEN and the external length using field DD_OUTLEN of the field catalog (see Parameters for Fields Without DDIC Reference).
Specify the conversion exit using field EDIT_MASK of the field catalog (see Formatting Column Contents).
Pass the field catalog with method set_table_for_first_display before the list is displayed for the first time.
Result
The values of the columns are run through the conversion routine before display.
do reward if helpful...
‎2008 May 24 12:11 PM
hi,
conversion exit are generally used while extracting data into bw in the infoobject.
the conversion exit are used when the source data format is not as the target
data format.
for eg in source if data is' pads fdfgg' and in target if u do not want spaece
then u can go for ' numcv' routine.
For further details go through...
http://help.sap.com/saphelp_nw2004s/helpdata/en/9b/f9c18f5a07f0459127e9676ae22a54/frameset.htm
Regards
Sunil Kumar Mutyala
‎2008 May 24 1:12 PM
Hi,
There are ome standard function modules for conversion exits like CONVERSION_EXIT_ALPHA_INPUT.These can be used for zero padding and to replace the spaces in your numeric variabl with zeroes.
But thses conversion exits are valid only for numeric variables and not for characters.
Also there is ne more function module CONVERSION_EXIT_KONPD_INPUT which is used for changing numric values to character values.
eg:- in case of project id(psphi)