Application Development 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: 

ABAP Function Module

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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á

former_member125931
Active Participant
0 Kudos

resize the particular field length for char2 while you r uploading or downloading as per your requirement.

Former Member
0 Kudos

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.

former_member200872
Active Participant
0 Kudos

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.