2005 Mar 23 8:19 AM
Is there a way to process tab delimited files if my program is to be run in background? Thanks
Is there a way to process tab delimited files if my program is to be run in background? Thanks
2005 Mar 23 8:47 AM
Hi,
Do a 'read dataset' to read one record in a string, and use 'SPLIT' verb to split it into individual fields of your itab before appending the itab (assuming you want it in an itab).
In SPLIT, you can say 'AT <CH>' where 'CH' shall have the char value of TAB.
cheers,
Ajay
2005 Mar 23 9:38 AM
Hi,
-> here's an example to split file by tab:
DATA: BEGIN OF tabulator,
x(1) TYPE x VALUE '09',
END OF tabulator.
data tabilator_c.
...
CALL FUNCTION 'SYSTEM_CODEPAGE'
IMPORTING
codepage = c_to.
tabulator_c = tabulator.
TRANSLATE tabulator_c FROM CODE PAGE c_from TO CODE PAGE c_to.
open dataset file for input in text mode.
do.
read dataset file into wa.
if sy-subrc <> 0.
exit.
endif.
split wa at tabulator_c into table itab.
....
enddo.
regards <a href="https://www.sdn.sap.com:443/irj/servlet/prt/porta
l/prtroot/com.sap.sdn.businesscard.SDNBusinessCard?u=i
Wo3ssHlIihvCrADIEGqaw%3D%3D">Andreas</a>
Message was edited by: Andreas Mann
2005 Mar 23 10:18 AM
Hi,
To process file in background, you have to go for processing on application server i.e. use dataset. Because presentation server does not allow background processing of files,.
cheers,
-Tejal
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |