2015 Sep 24 9:17 AM
Hi Experts,
I have download a text file with header and data. But it was not coming proper format like excel sheet where the data comes with corresponding column header. Could you please let me know how can i achieve it?
In the below screen, the headers are not in proper position.
Best regards,
Narasimha.
Hi Experts,
I have download a text file with header and data. But it was not coming proper format like excel sheet where the data comes with corresponding column header. Could you please let me know how can i achieve it?
In the below screen, the headers are not in proper position.
Best regards,
Narasimha.
2015 Sep 24 9:35 AM
2015 Sep 24 12:43 PM
Hi Eitan,
I have a requirement for text file with proper alignment same like how we get in excel sheet . Could you please tell me how we can do it?
Best regards,
Narasimha>
2015 Sep 24 1:05 PM
2015 Sep 24 1:48 PM
2015 Sep 24 2:01 PM
Hi,
Have a look at the "WRITE" or "WRITE TO" commands additions.
[pos][(len)]
[LEFT-JUSTIFIED|CENTERED|RIGHT-JUSTIFIED]
You can use those to write to data set or a character variable .
Regards .
2015 Sep 24 2:21 PM
Hi narasimha,
This is purely aligned.
what I mean is, all the fields in the header and data are separated with a single tab.
But if you want them to be aligned like given below
PERNR BEGDA ENDDA
012003 01.01.2008 31.01.2015
Then please use same length for all the data fields.
That means, the header label 'PERNR', 'BEGDA' and 'ENDDA' should be saved in the internal table with the same data type so that the labels and the data all have same length.
2015 Sep 24 4:39 PM
hi,
fm GUI_DOWNLOAD itself align the headers and the data.
please refer the following code..
w_header-text = 'Sales Document'.
APPEND w_header TO it_header .
CLEAR w_header.
w_header-text = 'Message Type'.
APPEND w_header TO it_header .
CLEAR w_header.
w_header-text = 'Message'.
APPEND w_header TO it_header .
CLEAR w_header.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = lv_file
filetype = 'ASC'
write_field_separator = 'X'
show_transfer_status = 'X'
TABLES
data_tab = it_data
fieldnames = it_header
hope this will help..
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |