Field separator in gui_download
Hi,
How to get '|' (pipeline) separator in FM gui_download?
We tried passing '|' in the parameter write_separator.
Still the downloaded file doesn't have this separator.
Thanks for your time.
Hi,
Try this, ihope it may work.
WRITE_FIELD_SEPARATOR = ' | '
regards,
ravi shankar reddy
Similar Messages
-
How to get some character as a field separator while in GUI_DOWNLOAD ?
Hi Friends,
I have to download data from an internal table to a text file. The field separator
between the fields should be comms (,). So, after getting the data into internal table i'm calling the Function Module GUI_DOWNLOAD. Now using this function module can i insert a comma spearator between the fields, if not what is the other way to do it?Hi,
Its not possible to give the field separator as ',' directly with gui_download from you internal table.
Below is the example through which you can achieve the following,
this is a tested program and is working fine on the system....
so you can use the logic to achieve the following result.... hope this logic helps you to achieve your functionality....
DATA:
BEGIN OF fs,
col1(6) TYPE c,
col2(4) TYPE c,
col3 TYPE c,
END OF fs.
DATA :
BEGIN OF line,
line(255) TYPE c,
END OF line.
DATA: itab LIKE TABLE OF fs,
itab2 LIKE TABLE OF line.
DEFINE m_tab.
clear fs.
fs-col1 = &1.
fs-col2 = &2.
fs-col3 = &3.
append fs to itab.
END-OF-DEFINITION.
m_tab '006000' '0010' 'J'.
m_tab '006000' '0010' 'J'.
m_tab '006000' '0010' 'M'.
m_tab '006000' '0010' 'M'.
m_tab '006000' '0010' 'O'.
m_tab '006000' '0010' 'O'.
m_tab '006000' '0010' 'T'.
m_tab '006000' '0010' 'T'.
LOOP AT itab INTO fs.
CONCATENATE fs-col1
fs-col2
fs-col3
INTO line
SEPARATED BY ','.
APPEND line TO itab2.
ENDLOOP.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = 'C:\filename.txt'
* FILETYPE = 'ASC'
* APPEND = ' '
* WRITE_FIELD_SEPARATOR = ' '
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
* SHOW_TRANSFER_STATUS = ABAP_TRUE
* IMPORTING
* FILELENGTH =
TABLES
data_tab = itab2
* FIELDNAMES =
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22
IF sy-subrc <> 0.
WRITE sy-subrc.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Siddarth -
How to get field separator in flat file using GUI_DOWNLOAD function
hi,
how to get field separator in flat file using GUI_DOWNLOAD function.
thanking you.Hi,
Use WRITE_FIELD_SEPARATOR = 'X'.
Check this sample code
REPORT z_file_download.
DATA: w_name(90) TYPE c.
DATA:
BEGIN OF fs_flight,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
price LIKE sflight-price,
currency LIKE sflight-currency,
END OF fs_flight.
DATA:
BEGIN OF fs_head,
carrid(10) TYPE c,
connid(10) TYPE c,
fldate(10) TYPE c,
price(10) TYPE c,
curr(10) TYPE c,
END OF fs_head.
DATA:
t_head LIKE
TABLE OF
fs_head.
DATA:
t_flight LIKE
TABLE OF
fs_flight.
fs_head-carrid = 'CARRID'.
fs_head-connid = 'CONNID'.
fs_head-fldate = 'FLDATE'.
fs_head-price = 'PRICE'.
fs_head-curr = 'CURRENCY'.
APPEND fs_head TO t_head.
SELECT-OPTIONS:
s_carrid FOR fs_flight-carrid.
START-OF-SELECTION.
SELECT carrid
connid
fldate
price
currency
FROM sflight
INTO TABLE t_flight
WHERE carrid IN s_carrid.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = 'D:\flight.xls'
FILETYPE = 'ASC'
* APPEND = ' '
WRITE_FIELD_SEPARATOR = 'X'
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* IMPORTING
* FILELENGTH =
tables
data_tab = t_head
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'D:\flight.xls'
filetype = 'ASC'
append = 'X'
write_field_separator = 'X'
TABLES
data_tab = t_flight
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc EQ 0.
MESSAGE 'Download successful' TYPE 'I'.
ENDIF.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
Field Separator in GUI_UPLOAD
Hi,
I need to upload a tab delimited excel file . I am using FM GUI_DOWNLOAD.What are Filetype and Field Separator.
Regards,
DivyanshuHi Divyanshu,
It may be better to use the class method to future proof your development (which incidentally calls GUI_UPLOAD anyway). Consider the following code:
data: i_file type standard table of t_file.
call method cl_gui_frontend_services=>gui_upload
exporting
filename = w_file
has_field_separator = 'X' "Tab-delimited ASCII upload.
changing
data_tab = i_file
exceptions
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
not_supported_by_gui = 17
error_no_gui = 18
others = 19.
if sy-subrc <> 0.
* Error handling
endif.
Hope this helps.
JB -
The Flat file(.txt) has 5 fields separated by vertical bars(|). this fils has to be uploaded using the FM 'UPLOAD'.
Here the problem is, the internal table is not taking the individual field values, but it is taking the values of 2 or 3 fields into one field.
Kindly guide me on this.
I have also tried with 'ws_upload' and 'gui_upload'
eg. of flat file, given below,
500076|1003|01012005|31012005|8552000.00|8952000.00|22200|002|I
500076|1004|01012005|31012005|2690000.00|2748000.00|88900|003|IHi girish,
1. Exactly for this purpose,
i have developed an independent FORM
where we give inputs
a) file name (eg. abcd.txt)
b) separator (eg | in your case)
c) internal table (eg. t001)
2. It will provide the data
in proper format
(no matter what the separator)
(it can work with any kind of separator)
3. just copy paste in new program.
REPORT abc.
change your table declaration and file name
DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
PERFORM myupload TABLES t001 USING 'd:\t001.txt' '|'.
BREAK-POINT.
in debug see t001
INDEPENDENT FORM
FORM myupload TABLES orgtab
USING filename separator.
Data
DATA : BEGIN OF itab OCCURS 0,
myline(1000) TYPE c,
END OF itab.
DATA : extension(5) TYPE c.
DATA : name(100) TYPE c.
DATA : newfilename TYPE string.
Step 1
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = filename
TABLES
data_tab = itab.
Step 2
LOOP AT itab.
REPLACE ALL OCCURRENCES OF separator IN itab-myline WITH
cl_abap_char_utilities=>horizontal_tab.
MODIFY itab.
ENDLOOP.
Step 3
DATA : path LIKE pcfile-path.
path = filename.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
CHECK_DOS_FORMAT =
IMPORTING
DRIVE =
extension = extension
name = name
NAME_WITH_EXT =
PATH =
EXCEPTIONS
invalid_drive = 1
invalid_extension = 2
invalid_name = 3
invalid_path = 4
OTHERS = 5
Step 4
newfilename = filename.
REPLACE name IN newfilename WITH 'temp'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = newfilename
TABLES
data_tab = itab
FIELDNAMES =
Step 5
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = newfilename
has_field_separator = 'X'
TABLES
data_tab = orgtab.
ENDFORM. "myupload
3.
regards,
amit m. -
Include Field Labels in GUI_Download
How do I include field labels in GUI_DOWNLOAD (I am using it to download an Excel file from an internal table)? I see a table called fieldnames but when I add fields to that table they system only shows the first field. How can I show a label for each row, in Excel?
See the code below:
wa_fade_fields-posid = 'Project#'.
wa_fade_fields-poski = 'Phase Code'.
wa_fade_fields-usr02 = 'WBS Element'.
wa_fade_fields-txt04 = 'Status'.
wa_fade_fields-sakto = 'Cost Elem'.
wa_fade_fields-vrsen = 'Vsn'.
wa_fade_fields-wrttp = 'VT'.
wa_fade_fields-planned_hours = 'Planned Hours'.
wa_fade_fields-arbei = 'Current Hours'.
wa_fade_fields-ismnw = 'JTD Hours'.
wa_fade_fields-etc = 'Estimate to Complete'.
wa_fade_fields-variance = 'Variance'.
wa_fade_fields-percent = 'Percent'.
INSERT wa_fade_fields INTO TABLE it_fade_fields.
*Fade table
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = d_fullpath
* FILETYPE = 'ASC'
* APPEND = ' '
write_field_separator = 'X'
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
dat_mode = 'X'
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
* SHOW_TRANSFER_STATUS = ABAP_TRUE
* IMPORTING
* FILELENGTH =
TABLES
data_tab = it_fade
fieldnames = it_fade_fields
* EXCEPTIONS
* FILE_WRITE_ERROR = 1
* NO_BATCH = 2
* GUI_REFUSE_FILETRANSFER = 3
* INVALID_TYPE = 4
* NO_AUTHORITY = 5
* UNKNOWN_ERROR = 6
* HEADER_NOT_ALLOWED = 7
* SEPARATOR_NOT_ALLOWED = 8
* FILESIZE_NOT_ALLOWED = 9
* HEADER_TOO_LONG = 10
* DP_ERROR_CREATE = 11
* DP_ERROR_SEND = 12
* DP_ERROR_WRITE = 13
* UNKNOWN_DP_ERROR = 14
* ACCESS_DENIED = 15
* DP_OUT_OF_MEMORY = 16
* DISK_FULL = 17
* DP_TIMEOUT = 18
* FILE_NOT_FOUND = 19
* DATAPROVIDER_EXCEPTION = 20
* CONTROL_FLUSH_ERROR = 21
* OTHERS = 22
Regards,
DavisI think the problem might be with the WORK AREA structure, the work area which contains the description should be atleast 50 characters long so that it can accomodate all the characters...
Declare it something like this
DATA: BEGIN OF excel_schedule OCCURS 0,
refno(50),
ebelp(50),
etenr(50),
eindt(50),
menge(50),
ameng(50),
END OF excel_schedule.
Ok there is another simple way of doing this
Use GUI_DOWNLOAD twice and the second time you just append it to the existing first file...
SAmple code
DATA: BEGIN OF excel_schedule OCCURS 0,
refno(50),
ebelp(50),
etenr(50),
eindt(50),
menge(50),
ameng(50),
END OF excel_schedule.
* Download to Workstation the Description Fields of error schedule file
CALL FUNCTION 'GUI_DOWNLOAD'"
EXPORTING
filename = w_lstring
filetype = 'ASC'
write_field_separator = 'X'
TABLES
data_tab = excel_schedule
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Download to Workstation the error schedule file
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = w_lstring
filetype = 'ASC'
append = 'X'
write_field_separator = 'X'
TABLES
data_tab = t1_eschedule
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
use the append property of GUI_DOWNLOAD the second time -
Issue with field separator in GUI_UPLOAD
Hello Gurus
I am facing issue with gui_upload. I have a text file in which the fields are eparated by single Pipe i.e |. Now when I try to read the data from file in internal table even with using field separator it does not insert data in proper fields.
DATA: BEGIN OF IT_TAB OCCURS 0,
OBJECT_ID type string,
VERSION_SERIES_ID TYPE string,
VERSION_NUMBER TYPE string,
REVISION TYPE string,
DOC_NUMBER TYPE string,
DOCTITLE TYPE string,
FILESIZE TYPE string,
MIME_TYPE TYPE string,
PLANTUNIT TYPE string,
END OF IT_TAB.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = w_mpath
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = '|'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = it_tab[]
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
I want the data to get appended in internal table based on | separator.
Please help.
Regards,
Rajesh.Hi,
I believe the field separator parameter will work for Excel files..You have to get the internal table in a string format..and then use split statement..
check this example..
DATA: BEGIN OF it_tab OCCURS 0,
object_id TYPE string,
version_series_id TYPE string,
version_number TYPE string,
revision TYPE string,
doc_number TYPE string,
doctitle TYPE string,
filesize TYPE string,
mime_type TYPE string,
plantunit TYPE string,
END OF it_tab.
DATA: t_tab TYPE TABLE OF string,
v_string TYPE string.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'C:\TEST.TXT'
* has_field_separator = '|' "Actually not required.
TABLES
data_tab = t_tab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
ENDIF.
LOOP AT t_tab INTO v_string.
SPLIT v_string AT ','
INTO
it_tab-object_id
it_tab-version_series_id
it_tab-version_number
it_tab-revision
it_tab-doc_number
it_tab-doctitle
it_tab-filesize
it_tab-mime_type
it_tab-plantunit.
APPEND it_tab.
CLEAR: it_tab.
ENDLOOP.
Thanks
Naren
Edited by: Narendran Muthukumaran on Oct 15, 2008 4:58 PM -
Field separator in TEXT_CONVERT_TO_XLS_SAP
Hi all
what is the purpose of field separator in FM TEXT_CONVERT_TO_XLS_SAP.what are the possible values to be given for that field separator???????
what values do i have to give for tab limited
points will be rewardedHi,
please check this
data : lt_raw type truxs_t_text_data.
call function 'TEXT_CONVERT_XLS_TO_SAP'
exporting
* i_line_header = 'X'
i_tab_raw_data = it_raw " WORK TABLE
i_filename = p_lname
tables
i_tab_converted_data = i_tab "ACTUAL DATA
exceptions
conversion_failed = 1
others = 2.
aRs
Message was edited by:
a® -
Place a carriage return in the field separator of an iChart
In the Data Mapping of an iChart, the Field Separator is a good tool to obviously separate data. The problem I see is the two fields and the separator are on one line. How can I place a carriage return to place the two fields on separator lines?
Hi,
This is not possible to do; however, perhaps it could be entered as a feature request for a later version.
Diana Hoppe -
Sender File Adapter - FCC - No incoming field separator - How to do FCC?
Hi,
I have a sender File adapter and I need to do the File Content Conversion but there apparently no incoming field separator and the file ocntains just running text - no data records but just information.
For example the incoming file is something like:
The Hongkong and Shanghai Banking Corporation Limited 27JAN2009 PAGE 1
Incorporated in Hong Kong with limited liability
ABC IAL LIMITED ABU DHABI, UAE
ABC MIDDLE EAST Account No. 001-8888888
ABU DHABI Payment Set AAA
BBB MAIL BOX NO.99 Contact Person ABC LIMITED
7777777777 Telephone
AUTOPAY LIST - PROCESSED
(AUTOPAY-OUT SALARY)
Payment Date 27JAN2009
First Party Narrative . 66666666
Second Party Narrative .
The Message type that I am mapping to contains:
MT_XXXX
WA
Item
Item2
Item3
This is so that the information can be mapped to different field areas and send across to the Receiver Mail Adapter. In the mail i receive, i get the running text. I tried giving the field separator as '0x09' but it is not working.
I have also tried WA..fieldContentFormatting to nothing but again no luck.
I have tried with Recordset Sequence with Ascending and variable and have also tried Recordsets per Message with * and blank - but it did not help.
Please advice.
Regards,
ArchanaHi,
I assumed that it was tab but when I made the change in FCC, it did not work.
I would still like to have a output where it looks like below if more than 2 types of information in 1 line as below:
ABC IAL LIMITED ABU DHABI, UAE
ABC MIDDLE EAST Account No. 001-9999999999999
and not something like:
ABC IAL LIMITED ABU DHABI, UAE
ABC MIDDLE EAST Account No. 001-999999999999
I am not sure what to do here.
Help please.
Regards,
Archana -
Sender File Adapter - Problem with field separator
Hi,
I want to upload a CSV file into XI.
The file contains a text part which uses from time to time quotation marks like this:
SD,575757,383838,N/A,XYZ,"This is a text part",7676
But besides there are lines like this:
SD,575757,777722,N/A,XDE,FREETEXT,7575
Has anyone any idea how to configure the file adapter to get it recognize the quotation marks not as field separator?
I've already tried the enclosureSign parameters but that leads to an total unconverted line.
Is it maybe possible to customize two field separators like this:
Structure.fieldSeparator - ,"
Thanks for any answer,
ChristinaNo, it doesn't work.
I've specified now:
Structure.fieldSeparator ,
Structure.enclosureSign "
Structure.enclosureSignEscape ""
Every line without quotation marks is converted fine. Lines with quotation marks stay like in the original CSV file and the whole line is put into one XML tag (still comma separated).
Also the parameter fieldContentFormatting - nothing doesn't make a difference.
Other ideas? -
Variable message length without field separator to file receiver adapter
Hi,
I have a XML document as below
<MT_O_FF>
<ROW>
<HEADER> </HEADER>
<QMGR> </QMGR>
<MESSAGE> TEST MESSAGE </MESSAGE>
</ROW>
</MT_O_FF>
I know the field lengths of <HEADER> and QMGR but MESSAGE has variable length data. We don't want field separator between HEADER, QMGR and MESSAGE. The file should be created as below (text file)
TEST MESSAGE
The above blanks in front of TEST MESSAGE data needs to be there in the file. The problem I am facing is as <MESSAGE> is variable length and the file should not have field separator, is there any way we can create text file using file adapter?
If I use xml.fieldFixedLengths as below, as long as data in MESSAGE is less then 40000 then the file is created with data. If the length is more then 40000 then the file is getting created but the data in MESSAGE is getting truncated. The maximum length adapter allows me to use 40000.
xml.fieldFixedLengths=10,20,40000
xml.fieldNames=HEADER,QMGR,MESSAGE
xml.fieldTooShortHandling=ignore
Thanks in advance for your help.HI,
the parameter fieldTooShortHandling = ignore should solve your purpose.
Ignore means that the system applies the value completely, regardless of it being too long. Subsequent columns are moved correspondingly.
Thanks
Swarup -
Mail / Merge in WORD with DOI. Error in WORD 'field separator'
I have a program that creates WORD DOcuments for merging with data.
I use WORD documents created with BDS.
I used program SAPRDEMO_MAILMERGE_INTERFACE as an example for creating my own program.
When I call METHOD VIEW ,after creating data source and MERGE, I get following error in WORD
'field separator?. WORD asks which is the separator for field.
whatever separator I indicate, WORD issues an error saying no record found.
If I execute program SAPRDEMO_MAILMERGE_INTERFACE, it works.
I don't understand what happens.I found solution.
In my data source , I have only 1 record.
When calling method merge_range I must indicate 0 in record number and not 1 ( with 1 it worked on our system but not on the customer system : cause in SAP or EXCEL I don't know. )
Fusion données source
CALL METHOD HANDLE->MERGE_RANGE
EXPORTING
FIRST = 0
LAST = 0
IMPORTING
ERROR = error
RETCODE = retcode.
clear l_sy.
CALL METHOD ERROR->GET_MESSAGE
IMPORTING
MESSAGE_ID = l_SY-MSGID
MESSAGE_NUMBER = l_SY-MSGNO
PARAM1 = l_SY-MSGV1
PARAM2 = l_SY-MSGV2
PARAM3 = l_SY-MSGV3
PARAM4 = l_SY-MSGV4. -
How to use two "field separator" in the same Comunication Channel
Hi experts,
I upload flat files with XI, and my Comunication Channel is configured to use the field separator "~".
FILA.fieldSeparator ~
Is posible to configure that Comunication Channel to accept two field separator. I want that upload flat files that has as separator "~" and flat files that has "|" .
thanks
regardsIT IS not possible to have 2 fieldseparator to identify the fields of a record.
-
How to separate a field separated by semi colons
Hi - thought I would give this a try - any help is appreciated.
I have a field separated by semi colons - for example - prod1;prod2;prod3
In a cross tab I'm trying to show which products have a date in them and put an X there. My problem is if the field is like my example - it only shows once and instead of listing each single product as a product - it shows it as one like the example.
I would like to have a column for each product with and X under each.
I hope this is enough information.
Any help is much appreciated.
Thanks.
BillMarlene,
It all just depends on what you are trying to do. If you have a set number values in the string and you want each of them in their own column then it fairly easy...
SPLIT ({Command.jce_cest}, ";") [1]
SPLIT ({Command.jce_cest}, ";") [2]
SPLIT ({Command.jce_cest}, ";") [3]
SPLIT ({Command.jce_cest}, ";") [4]
HTH,
Jason
Maybe you are looking for
-
Problem with Displayport and HDMI on 15pro Late2013
I just got a new 15pro few days ago(the one with 750M video card) When I trying to connect it to my external monitor(DELL U2913WM 2560 x 1080) by miniDisplayport(to miniDP port), everything shown on my external monitor looks like I'm using a VGA cabl
-
Error creating OIM schema with RCU 11.1.1.3.3 (RCU-6135)
Hello! I'm trying to install Oracle Access & Identity Management 11g on Windows Server 2003 32bit machine As main guide I use the article from onlineappsdba.com ( [this one|http://onlineappsdba.com/index.php/2010/08/05/oracleidm-11g-step-by-installat
-
Importing from iPod to iTunes and artwork problems
I have lots of albums on my iPod with artwork that display in iTunes, but it doesn't display on the iPod. Is there a minimum resolution for being able to display artwork on the iPod? I like to have the artwork in the MP3 file itself at a low resoluti
-
PreparedStatement and 'Order by'
How can a PreparedStatement be made in this situation? String query = " Select * from myTable where id=? Order by ? ? "; PreparedStatement ps = con.prepareStatement( query); ps.setInt(1,userID); ps.setString (2, columnName ); ps.setString (3, ascOrD
-
When I edit in full screen, I lose the ability to open up the bottom "toolbar" by dragging the cursor to the bottom of the screen. When this happens I have to hit the escape button to get back to the iPhoto library. When I go back to editing the phot