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,418

Hi to all Guru's,

i am not getting how this edit mask get works?

here it display's 5:33 seconds but how this get works?

DATA: time TYPE s_fltime,

seconds TYPE i,

msk TYPE string.

DESCRIBE FIELD time EDIT MASK msk.

write:msk.

seconds = 333.

WRITE seconds USING EDIT MASK msk.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,115

Hi,

What's the output of the line "write:msk".

I can't test your code now, but the mask is transforming the 333 seconds in 5 minutes and 33 seconds (that is equal to 333s).

Probably this mask is in the format MM:SS or HH:MM:SS.

Tell me the output of the line "write:msk" to confirm the above.

Regards,

Charles

8 REPLIES 8
Read only

andreas_mann3
Active Contributor
0 Likes
1,115

look conversion exit SDURA

fm <b>CONVERSION_EXIT_SDURA_OUTPUT</b>

A.

Read only

Former Member
0 Likes
1,115

Hi Priya,

It is working based on Conversion Routine SDURA.

Regards,

Satish

Read only

Former Member
0 Likes
1,116

Hi,

What's the output of the line "write:msk".

I can't test your code now, but the mask is transforming the 333 seconds in 5 minutes and 33 seconds (that is equal to 333s).

Probably this mask is in the format MM:SS or HH:MM:SS.

Tell me the output of the line "write:msk" to confirm the above.

Regards,

Charles

Read only

0 Likes
1,115

Hi charles,

The output of "write:msk" is

==SDURA

Thanks

Priya

Read only

0 Likes
1,115

Hi,

The output of "write:msk" is

==SDURA

This refers to a Converion Routine (i.e Function module) CONVERSION_EXIT_SDURA_OUTPUT.

Execute this FM , and pass input as 333 and exceute, the nthis will return 5:33 i.e it will consider 333 as seconds and convert to minutes.

revert back if any issues,

regards,

Naveen

Read only

0 Likes
1,115

Priya, so the mask really hasn't the format that i wrote above.

The mask is a conversion exit. If you don't know what's a conversion exit follow a explain:

A conversion exit is a routine that formats the output. An edit mask that begins with == followed by a ID calls a function module that formats the output. That ID is known as a conversion exit, or conversion routine. The name of the function module will be CONVERSION_EXIT_XXXXX_OUTPUT, where XXXXX is the id that follows ==. In this case CONVERSION_EXIT_SDURA_OUTPUT. The write statement passes the value first to the function module, which changes it in any desired way and then returns the changed value, and that value is written out.

Regards,

Charles

Read only

0 Likes
1,115

Thanks Charles,

Thank you very much

Read only

Former Member
0 Likes
1,115

Hi,

you can use edit mask to display the dates or time in your desired format.

example:

write:/ sy_datum using edit mask 'DD/MM/YYYY' or 'DD.MM.YYYY' or 'DD:MM:YYYY'.

you can interchange the DD, MM & YYYY.

in the same way you can print the time also.

write: sy-uzeit using edit mask 'H:MM:SS'.

you can interchange the HH,MM & SS.

reward if useful.

Thanks,

Sreeram.