08-20-2007 4:48 AM
08-20-2007 4:53 AM
HI,
see this
Effect
If a conversion routine is assigned to the data object dobj by refering to a domain in the ABAP Dictionary, two equals signs "==" precede the name of the conversion routine and the result is assigned to the data object mask. If no conversion routine is assigned to the data object, mask is initialized. A character-type data object is expected for mask.
Note
If a data object mask meets these requirements, you can use it in the addition USING EDIT MASK of the statement WRITE to call the conversion routine.
Example
Since the data element S_FLTIME in the ABAP Dictionary is associated with the conversion routine SDURA due to the domain S_DURA, msk contains the value "==SDURA" after DESCRIBE FIELD and the statement WRITE returns the value "5:33" after the conversion from seconds into minutes.
DATA: time TYPE s_fltime,
seconds TYPE i,
msk TYPE string.
DESCRIBE FIELD time EDIT MASK msk.
seconds = 333.
WRITE seconds USING EDIT MASK msk.
rgds,
bharat.
08-20-2007 4:58 AM
Hi..
Using EDIT MASK is used in the WRITE statement to Change the Output format of the field as per the need.
For Eg :
DATA: T1 TYPE T VALUE '124050'.
WRITE: T1. "will display the time as 124050
WRITE :(8) T1 USING EDIT MASK '__:__:__' . "Will display as 12:40:50
We can also use this Option to enforce Conversion Exit on a Field .
DATA : VAR1(10) VALUE '123'.
WRITE:/ VAR1 USING EDIT MASK '==ALPHA'. "Will display like 0000000123
<b>Reward if Helpful</b>