‎2007 Apr 05 11:16 AM
Hi All,
I having an input file which the data have 10 digits of number.
eg: 1000000000.
What I required is to read this data and putiing it in internal table then convert this 10 digits data to 15 digits.
Like adding another 5 zero to it. (000001000000000).
Thank you!
‎2007 Apr 05 11:17 AM
Hi ,
Before appending the data to the table use the unpack command.
Or you can use the data type of the resulting table as 15 type n.
Regards
Arun
‎2007 Apr 05 11:17 AM
Hi ,
Before appending the data to the table use the unpack command.
Or you can use the data type of the resulting table as 15 type n.
Regards
Arun
‎2007 Apr 05 11:17 AM
Hi,
To remove leading zeros and leading blanks
Please use FM
CONVERSION_EXIT_ALPHA_INPUT Conversion exit ALPHA, external->internal
CONVERSION_EXIT_ALPHA_OUTPUT Conversion exit ALPHA, internal->external
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = wf_version
IMPORTING
output = wf_version.
Example:
input = 1230000
output = 12300000000
Hope this resolves your query.
Reward all the helpful answers.
Regards
‎2007 Apr 05 11:18 AM
Hi,
Use FM.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = data
IMPORTING
output = data.
It will give u the no of zeroes u need...
Cheers,
Simha.
Reward all the helpful answers..
‎2007 Apr 05 11:18 AM
add one more field to ur itab of length 15
loop at itab into wa_itab.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = iwa_itab-ten_digit " ur 10 digit field
IMPORTING
OUTPUT = wa_itab-fifteen_digit. " new fifteen digit field
modify itab from wa_itab.
endloop.
‎2007 Apr 05 11:21 AM
Little,
Give internal table field length 15.and Use this FM
CONVERSION_EXIT_ALPHA_INPUT
Don't forget ot reward if useful..
‎2007 Apr 05 11:22 AM
HI,
try this.
data: a(15) value '1000000000'.
SHIFT a right by 5 places.
a(5) = '00000'.
write:/ a.
‎2007 Apr 05 11:25 AM
Hi,
Take one variable of type <b>'N'</b> length <b>15</b>.
And move your variable to this.
<b>data w_numc(15) type n.
w_numc = <your variable>.</b>
Hope this solves your query.
Reward if it helps you.....
Regards,
Sandhya
‎2007 Apr 05 11:29 AM
Hi,
Try the following code:
shift number right deleting trailing space.
overlay number with '000000000000000'.
The number of zeroes in the overlay statement is 15.
reward all useful answers.