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

WRITE

Former Member
0 Likes
641

How to use EDIT-MASK option in WRITE statement?

Regards,

Sharayu

1 ACCEPTED SOLUTION
Read only

former_member404244
Active Contributor
4 REPLIES 4
Read only

Former Member
0 Likes
618

<b>Effect</b>

If the field f has a conversion routine in the ABAP Dictionary, this is placed in the field mask in the form "==conv". " conv" stands for the name of the conversion routine; for example, " ==ALPHA" for the conversion routine " ALPHA". You can use the contents of mask in this form in the USING EDIT MASK mask addition of the WRITE statement.

Example

Check whether the "Customer number" field in the table SBOOK has a conversion routine:

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".

The following example that uses editing template EDIT MASK for the <b>WRITE command</b>

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.

Regards,'

Maha

Read only

former_member404244
Active Contributor
Read only

asik_shameem
Active Contributor
0 Likes
618

Hi,

use like this..

data: name(20) vale 'abcdefgh'

<b>WRITE: name USING EDIT MASK '_________'.</b>

Read only

Former Member
0 Likes
618

Hi .

Try this

DATA time TYPE t VALUE '154633'.

WRITE: time,

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

154633

15:46:33

Reward if useful.

Regards,

Chitra Parameswaran