2008 Aug 20 10:21 AM
Hi,
I really need your help with this!
I have a csv file with ; as separation mark and I need to do 2 things :
1) First line is the header which looks like :
STDTOT;CT;INFO; ;DFULOC;28/07/08;04/08/08;11/08/08;18/08/08;25/08/08;01/09/08;08/09/08; etc.
There is no ';' after the last date (end of the line).
I need to capture the dates (it can be very long) and put them in a table with single column.
2) The remaining lines are items :
XXXDDDDD;AAAADD;GGGGG;HHHH;;;50.3;60.8;89.1;90.2
YYYDDDD;GGFFGF;FFFFFF;GTYYJ;;;;10.6;12.3;13.5;18.9
etc.
I need to take in account every line where there is a qty in order to find the first and last date of the header.
For ex. item 1:
XXXDDDDD start date = 11/08/08 & end date = 01/09/08.
If I can find out the way to see in which position the first and last quantity are then I can easily point it to the table with dates did in section 1).
I know that this is a very difficult task but any good suggestion is always welcomed!
Can anyone help me?
Thanks!
Tarick.
2008 Aug 20 10:27 AM
hi,
Use SPLIT.
SPLIT line AT ';' INTO TABLE itab1.
after execution, itab1 will look like this base from your example.
STDTOT
CT
INFO
DFULOC
28/07/08
04/08/08
11/08/08
18/08/08
25/08/08
01/09/08
08/09/08
regards,
Peter
Hi,
I really need your help with this!
I have a csv file with ; as separation mark and I need to do 2 things :
1) First line is the header which looks like :
STDTOT;CT;INFO; ;DFULOC;28/07/08;04/08/08;11/08/08;18/08/08;25/08/08;01/09/08;08/09/08; etc.
There is no ';' after the last date (end of the line).
I need to capture the dates (it can be very long) and put them in a table with single column.
2) The remaining lines are items :
XXXDDDDD;AAAADD;GGGGG;HHHH;;;50.3;60.8;89.1;90.2
YYYDDDD;GGFFGF;FFFFFF;GTYYJ;;;;10.6;12.3;13.5;18.9
etc.
I need to take in account every line where there is a qty in order to find the first and last date of the header.
For ex. item 1:
XXXDDDDD start date = 11/08/08 & end date = 01/09/08.
If I can find out the way to see in which position the first and last quantity are then I can easily point it to the table with dates did in section 1).
I know that this is a very difficult task but any good suggestion is always welcomed!
Can anyone help me?
Thanks!
Tarick.
2008 Aug 20 10:26 AM
2008 Aug 20 10:27 AM
hi,
Use SPLIT.
SPLIT line AT ';' INTO TABLE itab1.
after execution, itab1 will look like this base from your example.
STDTOT
CT
INFO
DFULOC
28/07/08
04/08/08
11/08/08
18/08/08
25/08/08
01/09/08
08/09/08
regards,
Peter
2008 Aug 20 10:42 AM
To get the data in an internal table use FM
ALSM_EXCEL_TO_INTERNAL_TABLE
The internal table will have each line of excel in each row of itab
Then Loop at this internal table
Use SPLIT command at each row to get individual elements.
Hope this helps!
Regards,
Prashant
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |