07-17-2008 10:20 AM
Hello Experts,
I am working on requirement in which i m facing problem.
I have an excel sheet with 5000 records.
In which i shud retreive only last 2 charecters of a particular column.
can anyoen help me what to write..?
Thanks,
varun.
\[removed by moderator\]
Edited by: Jan Stallkamp on Jul 17, 2008 12:34 PM
07-17-2008 10:24 AM
Hi!
1. use the ALSM_EXCEL_TO_INTERNAL_TABLE fm to upload the excel table into an internal table
2. make a LOOP at the internal table and process it to your needs.
Regards
Tamá
07-17-2008 10:24 AM
resize the particular field length for char2 while you r uploading or downloading as per your requirement.
07-17-2008 10:26 AM
Hi,
Use ALSM_EXCEL_TO_INTERNAL_TABLE Function moule : it will transfer data in a flat file of .csv or .xls format to an internal table.
After that process your internal table to get the last two characters.
like:
loop at itab.
length = strlen ( itab-field2 ).
length = length - 2.
two_char = itab-field2+length(2).
endloop.
regards,
rama.
07-17-2008 10:32 AM
Hi,
Upload the data in spread sheet to an internal table.
Get the last two digits of required column in loop.
Try out the sample given below.
Regards,
Wajid Hussain P.
* * * *
Say the internal table itab has a column col4 with size 12
after you get all records into itab
loop at itab into wa.
move: col4+10(2) to v_data.
manipulate data as per need
write v_data.
endloop.