2009 Aug 14 1:33 PM
hi,
i have one value 35768. iwant to split into 35 and 768 how to achieve this??
please help me
Moderator message - Please do not ask or answer such basic questions - post locked
Edited by: Rob Burbank on Aug 14, 2009 9:28 AM
hi,
i have one value 35768. iwant to split into 35 and 768 how to achieve this??
please help me
Moderator message - Please do not ask or answer such basic questions - post locked
Edited by: Rob Burbank on Aug 14, 2009 9:28 AM
2009 Aug 14 1:37 PM
Hi,
If it is stored in char variable or type n , u can do it.
data w_c(5) type c value '35678'.
w_c1 = w_c+0(2).
w_c2 = w_c+2(3).
2009 Aug 14 1:45 PM
data:num type i value '35678'.
data:begin of val,
c1(2) type c,
c2(3) type c,
end of val.
val = num.
2009 Aug 14 2:13 PM
If it is a chaacter field I hope you already got the reply.
If it is int or type p variable
Just check this
DATA : lv_val1 TYPE i VALUE 35768,
lv_result1 TYPE p,
lv_result2 TYPE i.
lv_result1 = FLOOR( lv_val1 / 1000 ).
lv_result2 = lv_val1 MOD 1000.
WRITE : / lv_result1.
WRITE : / lv_result2.Regards
Shiba Prasad Dutta
2009 Aug 14 2:15 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |