‎2013 May 01 8:08 AM
Hi All ,
Firstly my question is can we use USING EDIT MASK statement only in write statement . My requirement is i need to display 9291651500 as (92)9165-1500 . i achieved this by following code
DATA w_celular(20) TYPE c VALUE '9291651500'.
WRITE w_celular USING EDIT MASK '(__)____-____'.
Issue is i dont want to display the number . Please help if there is any other way to do this .
regards
Kishore
‎2013 May 01 8:16 AM
You don't want to display the number? Do you mean that you want to get the formatted value into another variable? Perhaps WRITE... INTO is what you need.
‎2013 May 01 8:54 AM
Hi Matthew ,
I dont want to print the value as i am moving it to another variable here is the code
move w_celular to TI_DADOS-celular .
Regards,
Kishore
‎2013 May 01 8:55 AM
‎2013 May 01 9:05 AM
USE
CONCATENATE '(' w_celular+0(2) ')' w_celular+2(4) '-' w_celular+6(4) INTO TI_DADOS-celular.
‎2013 May 01 9:11 AM
‎2013 May 01 9:25 AM
Which would have been easily discovered by reading the documentation on the keyword WRITE...
‎2013 May 01 10:59 AM
Yes i could have done it before posting the question but I did not want to display any variable so was not intrested in the keyword WRITE as i didnt know write to earlier .
‎2013 May 01 2:11 PM
‎2013 May 01 8:28 AM
Hi,
There is no need to give number.U can give character fields.
DATA w_celular(20) TYPE c VALUE 'abcdefghij'.
WRITE w_celular USING EDIT MASK '(__)____-____'.
will give o/p (ab)cdef-ghij
‎2013 May 01 9:04 AM
Can we do it without using write statement . I need to move the output to other variable without displaying the result .
‎2013 May 01 10:19 AM
Hi Sriramula,
As Sai krishna suggested u can use the concatenate syntax if value fixed and expected value is also fixed.
Declare one variable with same declaration value and move concatenate variable into another one
‎2013 May 01 10:27 AM