LKM MSSQL to MSSQL (BCP)  field separator and row terminator

I'm having trouble loading data from a SQL Server 2005 source to 2008 staging area using the mssql to mssql (bcp) KM. The source column contains TEXT data types. I've added the -t and -r parameters into the LKM step 191 without any success. It simply loads an empty bcp file. Using the default /t and /n I get a portion of the bcp file loaded before it runs into issues.
I've attempted the following
<%=snpRef.getUserExit("CMD_SHELL")%> "<%=snpRef.getUserExit("BCP_DIRECTORY")%>/bcp" <%=snpRef.getInfo("SRC_WORK_CATALOG")%>.<%=snpRef.getInfo("SRC_WORK_SCHEMA")%>.<%=snpRef.getInfo("COLL_NAME")%>V out <%=snpRef.getUserExit("DEFAULTDIRECTORY")%>/X<%=snpRef.getSession("SESS_NO")%>.bcp <%
if (odiRef.getUserExit("UNICODE_SUPPORT").equals("1"))
out.print(" -w ");
else
out.print(" -c ");
%> *-t^& -r!!$#* -S<%=snpRef.getInfo("SRC_DSERV_NAME")%> -U<%=snpRef.getInfo("SRC_USER_NAME")%> -P<%=odiRef.getInfo("SRC_PASS")%> > <%=snpRef.getUserExit("DEFAULT_DIRECTORY")%>/X<%=snpRef.getSession("SESS_NO")%><%=odiRef.getStep( "NNO" )%>.out.log
Any ideas or help would be appreciated.

Hi,
Have you found a resolution to your issue? I have the same problem. Any help would be much appreciated!
Enjoy!
Michael R.

Similar Messages

  • 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,
    Archana

    Hi,
    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,
    Satya

    Hi,
    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

  • WPF: How to make the Column and Row separator more wide and different color in datagrid?

    Our application uses WPF.
    One of request is make the DataGrid column separator and row separator more wide and use different color and remove original black separator of rows and columns.
    Which template we need to modify to make it? Thx!
    JaneC

    Hi Magnus,
    Thanks for replying our question and provide your suggestions!
    Now we know modify both HorizontalGridLinesBrush and VerticalGridLinesBrush we can change the DataGrid cell separator color.
    Following your suggested, we modify the DataGridCell as following:
    <Style x:Key="Body_Content_DataGrid_Centering"
    TargetType="{x:Type DataGridCell}">
    <Setter Property="Padding" Value="2,0" />
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type DataGridCell}">
    <Border BorderThickness="2" BorderBrush="{StaticResource PageBorderBackground}" Margin="-1">
    <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center" Height="42">
    <ContentPresenter VerticalAlignment="Center"/>
    </Grid>
    </Border>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    <Style x:Key="DataGridStyle1" TargetType="{x:Type DataGrid}">
    <Setter Property="HorizontalGridLinesBrush" Value="{x:Null}"/>
    <Setter Property="VerticalGridLinesBrush" Value="{x:Null}"/>
    </Style
    JaneC

  • Export data with definided fields terminated and rows terminate as bcp

    hi to every one
    i am dummy oracle and i need to test some database.
    So i need to export some data in txt file and use @@@@@ as fields terminateed and ##### as rows terminated.
    In mssql and in sybase there is a bcp command that by the client and cmd command u can estract the dataset like u want,
    THERE IS SOMETHING LIKE THIS IN ORACLE
    With the jdevelop u can export but not define all the rules.
    thank a lot

    Basically oracle exports are binairy but you could query the table and spool the output to a textfile with sqlplus.
    sqlplys user/pw
    spool c:\outputfile.txt
    select '######' || col1 || '@@@@@' || col2
    from table
    spool off
    exit

  • XML and binary with field separator stock quote

    Hi All,
    I'm doing a comparison of data transmission between XML and binary with field separator.
    Example of XML
    <nasdaq>
    <high>100.00</high>
    <low>90.00</low>
    </nasdaq>
    Example of binary with field separator
    100.00|90.00
    Of course, using XML will consume of much resources and processing power but with easier maintenance and development.
    I'm doing some data feed with high transaction like Nasdaq, NYSE, etc. How you think about it...?
    Any web site does the comparison of the above? I have googled but not much information found.
    Cheers,
    Wikey

    XML is, of course, more flexible. For B2B transactions you should >>consider using gzip compression (avaiable in java.util.zip) if there's a >>fair bit of data in the message. That will reduced the effect of all the >>repetative XML furniture.yah, agreed but still not to a comfort level to proceed this technology. File size still big if compared to compressed non-XML data.
    Btw, I'm seeking for some efficient data feed product able to handle XML effectively and did some comparison with all other standard data formating mechanism of data transmission. Therefore, i can see the whole picture of it. Still trying my R&D luck on google...
    Cheers,

  • 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 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,
    Divyanshu

    Hi 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 use Space as field Separator?

    I have a flat file with space (multiple spaces between different fields) as a delimiter. Whenever I try to upload the file it doesn't allow me to perform. In the external tab when i chose CSV file and do not give any value in the file separator, it just pops up an information box '00H not allowed as a separator' and when I try to use ASCII /hex value '0040' still get the same message. The problem is, file is coming from 3rd party and they don't want to change the separator as comma or tab delimited CSV file.
    1) Is there any program which I can use in TR to convert space as coma or tab delimited and then feed the value to different fields? OR
    2) How to read the one line as one field and then feed to multiple fields?
    3) Any other solution/idea?
    please help me out.
    Thanks,

    Hi Mau,
         Goto you Flatfile Datasource -> Extraction Tab -> Data Format (CSV) -> Data Seperator -> ' ' ( ie. space ).
         It will consider the space as the seperator.
         Hope it helps you.
         Assign points if it helps you.
    Regards,
    Yokesh.

  • 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,
    Christina

    No, 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
    regards

    IT IS not possible to have 2 fieldseparator to identify the fields of a record.

Maybe you are looking for

  • Why fix what ain't broken?

    This is not just with Firefox but with software in general and heavily includes browsers. One can't help but notice that upgrading often causes immediate problems with both the program being upgraded and other, many times, unrelated, programs, alread

  • Galleries with links to YouTube

    I'm relatively new to DW and need to make a change to my site. What I want is a "gallery" for my links to my YouTube postings. I'd like it similar to what ESPN has with a large image with five thumbnails below. When one clicks the thumbnail it replac

  • What files can be safely deleted?

    I love my 400 MHz TiBook but its 10 GB hard drive is filling up. I have approx. 1.5 GB of free space left. What files that can be safely deleted? Can I delete extraneous printer files, modem files, packages, etc? I use MacJanitor to clean out caches

  • WRT54GX2 Dropping Wireless Connections

    I've got the WRT54GX2 with updated firmware and my built in intel adapter in my laptop with updated drivers.  I keep losing my wireless connection and I have no idea why.  I know it's not my laptop because I have another computer with a linksys wirel

  • I have released one PO with tcode ME28 but the PO is still be blocked

    I have released my PO with tcode ME28, and the PO is in released status in header data of the PO. But when I go to MIGO to post a GR, I still get the information that the PO not yet released. Can anyone tell why and how I can proceed? Thanks, Eda