Application Development and Automation 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: 
Read only

edit mask

Former Member
0 Likes
1,430

What is meant by EDITMASK and IT uses?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,077

Hi,

1) EDIT MASK can be used for output formatting options.

Outputs field f according to the formatting template mask .

Without this addition, field f is output in the standard format for that particular type or with a format defined in the ABAP/4 Dictionary . The addition allows you to define a different format.

For example, formatted output of the time:

DATA TIME TYPE T VALUE '154633'.

WRITE (8) TIME USING EDIT MASK '__:__:__'. "Output: 15:46:33

2) EDIT MASK can be used to supply attributes of a field.

If the field f has a conversion routine in the ABAP/4 Dictionary , this is placed in the field mask in the form " ==conv ". " conv " stands for the name of the conversion routine, e.g. " ==ALPHA " in the conversion routine " ALPHA ". In this form, mask can then be used in the addition USING EDIT MASK mask of the WRITE statement.

Example

Check whether there is a conversion routine for the field "customer number" in the table SBOOK :

TABLES SBOOK.

DATA: CONV_EXIT(10).

DESCRIBE FIELD SBOOK-CUSTOMID EDIT MASK CONV_EXIT.

IF CONV_EXIT <> SPACE. ... ENDIF.

Result: CONV_EXIT contains the value " ==ALPHA ".

Regards,

Ferry Lianto

3 REPLIES 3
Read only

suresh_datti
Active Contributor
0 Likes
1,077

Its a formatting option.. ex

DATA time TYPE t VALUE '154633'.

WRITE: time,

/(8) time USING EDIT MASK '__:__:__'.

~Suresh

Read only

Former Member
0 Likes
1,078

Hi,

1) EDIT MASK can be used for output formatting options.

Outputs field f according to the formatting template mask .

Without this addition, field f is output in the standard format for that particular type or with a format defined in the ABAP/4 Dictionary . The addition allows you to define a different format.

For example, formatted output of the time:

DATA TIME TYPE T VALUE '154633'.

WRITE (8) TIME USING EDIT MASK '__:__:__'. "Output: 15:46:33

2) EDIT MASK can be used to supply attributes of a field.

If the field f has a conversion routine in the ABAP/4 Dictionary , this is placed in the field mask in the form " ==conv ". " conv " stands for the name of the conversion routine, e.g. " ==ALPHA " in the conversion routine " ALPHA ". In this form, mask can then be used in the addition USING EDIT MASK mask of the WRITE statement.

Example

Check whether there is a conversion routine for the field "customer number" in the table SBOOK :

TABLES SBOOK.

DATA: CONV_EXIT(10).

DESCRIBE FIELD SBOOK-CUSTOMID EDIT MASK CONV_EXIT.

IF CONV_EXIT <> SPACE. ... ENDIF.

Result: CONV_EXIT contains the value " ==ALPHA ".

Regards,

Ferry Lianto