Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

EDIT MASK

Former Member
0 Kudos

WHAT IS THE USE OF EDIT MASK STATEMENT

2 REPLIES 2

Former Member
0 Kudos

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.

varma_narayana
Active Contributor
0 Kudos

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>