FCC field separator
Hi All,
Is there any solution for the field separator parameter if the flat file is having single space(not the TAB) as a field separator. I tried copy paste of that space. But it is taking all the filed values in one element.
Use this parameter for your content conversion in the sender file adapter.
structure.fieldSeparator = '0x20'
this is the hexadecimal conversion for space.
don't forget to rate.
Similar Messages
-
Hi Gurus,
I am working on a File-to-File Scenario using FCC at sender side. My requirement is to convert source text file into xml file.
Source and target structure:
DT_Customer_SRC
Header
CompanyName
CompanyCode
Body
CName
CCode
FCC Configuration:
Recordset Structure = Header,1,Body,1
Header.fieldNames = CompanyName,CompanyCode
Header.fieldSeparator = #
Header.endSeparator = $
Body.fieldNames = CName,CCode
Body.fieldSeparator = #
Body.endSeparator = 'nl'
Source File:
ABC#100$PQR#10
I am getting the error saying File contains more values than the fields specified.
But when I set the Header.endSeperator = 'nl', i get the desired output.
Is this the case that we cannot use more than one separator?
Is it mandatory to use Key?
Any help in this regard is highly appreciated
Thanks,
Jitesh TalrejaHi,
Thanks for your time
I tried the options posted by you guys but none of the option has worked.
Are there any limitations on the number of seperators to be used? Is my requirement correct and achievable?
Regards,
Jitesh Talreja -
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 -
Problem with PIPE as a field separator
Hi Gurus,
I am facing a problem in XI .The incoming file is PIPE as a field separator and a carriage return as end of each record.
The problem is that in trailer record if the last field has no value in the file then it is unable to identify it is a field.So all mapping which is there to check the empty filed is not working.
File format processed with status ok.
01|HEADER|F1
02|F1|F2|F3
03|COUNT1|F4
if the same file in the last record if the filed XX is blank then it is not able to trap in mapping.
01|HEADER|F1
02|F1|F2|F3
03|COUNT1|XX
If i am giving a extra PIPE at end of each record then it is working ok and the mapping can able to check if a field is blank.
But without putting a PIPE at the end is it possible to trap error if any last field is contains blank.
it is little URGENT.Please reply.
Thanks,
SatyaHi,
Suppose you called 03|COUNT1|F4 row as "trailer" in recordset structure.
Then you can use the following parameters:
trailer.missingLastfields = ignore - to get converted to XML only fileds that have been filled in
trailer.missingLastfields = add - to have last fileds filled with empty values
trailer.missingLastfields = error - to terminate FCC since file has not complete structure
Regards,
Jakub -
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 -
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® -
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 -
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. -
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 - 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
-
Can i get a free os lion if i have bought my mac book pro 2 weeks after the launch of the os lion
hi . i bought a mac book pro from the US . it came witht the older os . offcourse assuming that this would have been packed in china before the launch of os lion . would i have to buy the os lion or is there any way of getting an upgrade without pay
-
Newbie: Toolbar Button QuickPrint works not in Browser
Hi all, does anybody know a solution for this: - wrote a javascript that adds a toolbar button with the following lines: app.addToolButton({ cName: "atbToolButton1", // oIcon: oIcon, cExec: "this.print({bUI
-
HT1657 Can i get a refund for a rental i didn't view before the expiration date?
Can i get a refund for a rental i didn't view before the expiration date? I wasn't able to tranfer the movie to the ipad, and couldn't view it on my pc.
-
Transport via CMS into two diferent XI landscapes
Hello, we have one XI development system and have to transport the design and configuration objects to two different sets of consolidation and productive sets. we set up two tracks in the landscape configurator, but the exported objects only appear i
-
Desktop vs. Start Screen
Why no tiles front and center on the desktop instead of (or in addition to) having them on the Start Screen? Also, why two separate areas for settings: "PC Settings" and Control Panel?