Application Development and Automation 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: 
Read only

Split string into decimal - possible directly ?

Former Member
0 Likes
1,255

Hi,

I have a .csv file, which consist of combination of strings and decimals. i want to put them into corresponding fields using split statement. Is it possible ? if so, please provide me with example codes.

Thanks,

Gaurav.

3 REPLIES 3
Read only

Former Member
0 Likes
676

Please search in SCN. You will find quite a lot of examples for using SPLIT statement

Read only

Former Member
0 Likes
676

Hi,

SPLIT wa_string AT ',' INTO field1 field2 ...

For this u need to know the number of fields in the string. Also u can make use of a table to get the values.

SPLIT wa_string AT ',' INTO TABLE it_tab.

Revert if u need more on this.

Read only

Former Member
0 Likes
676

Just press F1 on split. you will get the sample code.. make sure you define the variables/fields as needed.. like dont pass floating points numbers to integers.. you will minn the right data...