Flat file destination error

hi
i am adding new field to my existing package which is char(10).
getting this error:
[Flat File Destination [139]] Error: Data conversion failed. The data conversion for column "MEMBER_ID" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
i right click flat file destination->i only see external and input column over there,
there is no output column.
in flat file connection mamanger ->outputcolumn->its char(10)
what needs to be change here?

Hi coool_sweet,
According to your description, you are trying to add a new source column to a flat file in an existing package.
Based on the error message, the issue should be caused by text was truncated when load new column to column "Column1" in Flat File Destination. Because the length of new column data should be more than 10 (with some junk values) in the Source,
while you are trying to convert the column to 10 as the character length.
To fix this issue, we can increase the length of column "Column1" in Flat File Connection Manager. Alternatively, if you still want to convert the new column to a column with length 10, we can right-click the Source component to select “Show Advanced
Editor”, then go to tab 'input and output properties' to expand the output column corresponds to the column "Column1", change TrancationRowDiposition property to RD_IgnoreFailure.
Besides, the issue can also be caused by using some special characters in the new column. We can check the Unicode checkbox on the right hand side of Locale property in Flat File Connection Manager to fix this issue. For more details, please see the following
thread:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/d3605656-4a13-47b6-b96e-45379e2b2a9f/export-to-flat-file-with-unicode-chinese-characters?forum=sqlintegrationservices
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support

Similar Messages

  • [Flat File Destination [220]] Error: Failed to write out column name for column "Column 2"

    I am using SSIS to extract fixed width data into a flat file destination and I keep getting below error. I have tried almost everything in this forum but still no solution. can anyone help me out to solve this problem.
    [Flat File Destination [220]] Error: Failed to write out column name for column "Column 2".
    [SSIS.Pipeline] Error: component "Flat File Destination" (220) failed the pre-execute phase and returned error code 0xC0202095
    Thanks

    Hi Giss68,
    Could you check the Advanced tab of the Flat File Connection Manager to see whether the InputColumnWidth and the OutputColumnWidth properties of the Column2 has the same value? Please refer to the following link about the same topic:
    http://stackoverflow.com/questions/10292091/how-do-i-fix-failed-to-write-error-while-exporting-data-to-ragged-right-flat-fil 
    If it doesn’t work, please post the sample data and the advanced settings of Column2 for further analysis.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Dynamic Column Names in Flat File Destination

    Hello,
    Inside a Data Flow Task, I have an ADO.Net data source which executes a stored procedure that provides results in 5 columns.
    The requirement is to have it connect to a flat file destination, such that the column names is dependent on what data was pulled by the data source. There is a variable indicator which identifies the data that was pulled. For example:
    If the indicator is 0, then the columns names will be A,B,C,D,E. Otherwise, if the indicator is 1, then column names will be V,W,X,Y,Z.
    Any suggestions will be of great help.
    AJ

    If you only have two variations then use a branched execution (based on precedence constraints) and direct it to one DFT or another based on the result returned by the stored procedure.
    Otherwise use .net
    code to create one package or another dynamically.
    PS: I suggest not to bother using SSIS for such a simplistic scenario.
    Arthur My Blog

  • Flat File Destination Multiple Delimiters

    Hi Guys,
    This might been an easy one for you. I need to find out if the data from a table can be loaded into a text file with multiple delimiters or not using SSIS? For example, if I have 2 columns of data from a table,
    ID Name
    100 Mark
    I need to load this into a flat file and the output should be like this
    100,@Mark
    So basically, I need to have 2 delimiters in the flat file destination namely "," and "@". How can this be done.
    Thanks in advance.

    Can't you just fill in two delimiters in the Column Delimiter field of the Flat File Connection Manager (never tried it)?
    Alternatives:
    -In the source query add a @ to the second column: select column1,
    '@' + column2 as column2 from yourTable
    -Add a Derived Column with an expression that adds a @ in front of column2: "@" + [column2]
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • Flat file Destination VS Raw file Destination ??

    Team ,
    Can some help me understand few differences and similarities  between Flat File Destination and Raw File Destination ? Thanks in advance .
    Rajkumar Yelugu

    Hi,
    Please check these differences :-
    Flat File Destination: The Flat File Destination component writes data out to a text file in one of the standard flat-file formats: delimited, fixed width, fixed width with row delimiter.
    Raw File Destination: The Raw File Destination is all about raw speed. It is an entirely native format and can be exported and imported more rapidly than any other connection type, in part because the data doesn’t need to pass through a connection
    manager.
    durgesh sharma

  • Reorder columns in Flat File Destination

    Hi Friend's
    Although, I did some google in order to find the solution for reording the columns before exporting to a text file using FLAT FILE DESTINATION, one of the work around which i found is editing the final package xml file and moving the DTS:FlatFileColumn
    fields as required.
    Is there any other solution in order to avoid this approach as I have some 40 fields to be displayed in text file and manually reordring these fields in xml would be cumbersome.
    I need to create  text file using FLAT FILE DESTINATION.

    SSIS Data flow doesn't support dynamic metadata, and any changes in metadata like re-arrange mappings should be done manually. if you want to have columns in a re-arrange design which could be re-mapped dynamically and simply it is better to looks for
    another way than data flow task, dynamic t-sql queries can be good alternative.
    http://www.rad.pasfu.com
    My Submitted sessions at sqlbits.com

  • Header in flat file destination (ssis)

    Hi
    I am creating a header in the flat file destination which has some hard coded values and record count which will get its value from a variable assisgned to a row count transformation in the package.
    There is no problem in hard coded value but when i try to get the value of record count, i always get zero.
    This is how i am doing it.
    In the flat file destination, when we open flat file destination editor, i hard code the values which i want in the HEADER itself right there in the editor.
    For the record count, i go properties of the flat file and select expression. In the expression editor, in property, i am selecting 'HeaderRowDelimiter' and drag that variable in the expression box.
    Let me know if there is any suggestion.
    Thanks

    The value of the rowcount is only known AFTER the Data Flow Task is completely finished... and there header is writen before that.
    Here are some examples:
    http://agilebi.com/jwelch/2008/02/08/adding-headers-and-footers-to-flat-files/
    http://social.msdn.microsoft.com/Search/en-US/sqlserver?query=add%20header%20and%20footer%20ssis&rq=meta:Search.MSForums.ForumID(00e50af7-5f43-43ad-af05-d98b73c1f760)+site:microsoft.com&rn=SQL+Server+Integration+Services+Forum
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com

  • Dynamic Header Values in Flat File Destination

    Hi,
    I have to put 'T' or 'P' as part of a header in a flat file destination. The header is sourced via a work table which defines what the header looks like. One of the columns should contain 'T' for test or 'P' for production. When the package is executed in
    the test environment, 'T' should appear as part of the header. When the package is executed in the production environment, 'P' should appear as part of the header.
    Any ideas on how to achieve this is very much welcome.
    Thanks,
    AJ

    Package parameter indicating the environment and a DerivedColumn transform that generates a column with T or P depending on the parameter value.

  • Not able to display flat file's error line in output

    The below Source Code is BDC for XD01 (update Customer Master Record) in CALL TRANSACTION method. This program is written in call transaction method cause as per user’s requirement, user wants error log to be printed as soon as the BDC process finished in the background mode.
    When you execute this below program it will show a selection screen from where you can select your flat file from system.
    After executing this code show output like below as soon as it finished processing the FLAT file.
    1. Customer Update Summary
    2. Successful record with customer number and name.
    3. Error Records with 'record number' and 'reason for error'
    (For testing you just have to copy-paste-save-active  the source code)
    And I have encountered an issue over here in 3rd section-“Record Number” of “Error Records”.
    The “Record Number” is for display the line number of that flat file line which in which error has occurred.
    The “Record Number”  Entries showing only ‘0’ instead of showing line number of error entry .
    I have used Function Module FORMAT_MESSAGE to capture the errors. But not able to display line number of that flat file which is containing error.
    So please suggest me what changes I should make in below source code to get proper output.
    Flat file for your R&D
    1000     1000     10     10     0001     Company     Chobey & Group1N     Choubey     Amit Choubey     New Alipore Road     Habijabi Apartment     Rastar Dhra      777777     kolkata     777777     kolikata     howrah     777777     IN     WB     1111111111     2222222222     3333333333     4444444444     5555555555     6666666666     0700     EAST     02     01     1060003     A1     Z1     ZZ13     CALS     1     A     10     1
    1000     1000     10     10     0001     Company     Chobey & Group2N     Choubey     Amit Choubey     New Alipore Road     Habijabi Apartment     Rastar Dhra      777777     kolkata     777777     kolikata     howrah     777777     IN     WB     1111111111     2222222222     3333333333     4444444444     5555555555     6666666666     0700     EAST     02     01     1060003     A1     Z1     ZZ13     CALS     1     A     10     1
    1000     1000     10     10     0001     Company     Chobey & Group3N     Choubey     Amit Choubey     New Alipore Road     Habijabi Apartment     Rastar Dhra      777777     kolkata     777777     kolikata     howrah     777777     IN     WB     1111111111     2222222222     3333333333     4444444444     5555555555     6666666666     0700     EAST     02     01     1060003     A1     Z1     ZZ13     CALS     .     A     10     1
    1000     1000     10     10     0001     Company     Chobey & Group4N     Choubey     Amit Choubey     New Alipore Road     Habijabi Apartment     Rastar Dhra      777777     kolkata     777777     kolikata     howrah     777777     IN     WB     1111111111     2222222222     3333333333     4444444444     5555555555     6666666666     0700     EAST     02     01     1060003     A1     Z1     ZZ13     CALS     1     A     ..     1
    1000     1000     10     10     0001     Company     Chobey & Group5N     Choubey     Amit Choubey     New Alipore Road     Habijabi Apartment     Rastar Dhra      777777     kolkata     777777     kolikata     howrah     777777     IN     WB     1111111111     2222222222     3333333333     4444444444     5555555555     6666666666     0700     EAST     02     01     1060003     A1     Z1     ZZ13     CALS     1     A     10     1
    And Source Code
    *& Report  Z_TEST_SAI                                                  *
    REPORT  Z_TEST_SAI no standard page heading line-size 255.
    TYPES: BEGIN OF t_cust,
            bukrs like rf02d-bukrs,
            vkorg like rf02d-vkorg,
            vtweg like rf02d-vtweg,
            spart like rf02d-spart,
            ktokd like rf02d-ktokd,
            anred like kna1-anred,
            name1 like kna1-name1,
            sortl like kna1-sortl,
            name2 like kna1-name2,
            name3 like kna1-name3,
            name4 like kna1-name4,
            stras like kna1-stras,
            pfach like kna1-pfach,
            ort01 like kna1-ort01,
            pstlz like kna1-pstlz,
            ort02 like kna1-ort02,
            pfort like kna1-pfort,
            pstl2 like kna1-pstl2,
            land1 like kna1-land1,
            regio like kna1-regio,
            telx1 like kna1-telx1,
            telf1 like kna1-telf1,
            telfx like kna1-telfx,
            telf2 like kna1-telf2,
            teltx like kna1-teltx,
            stceg like kna1-stceg,
            cityc like kna1-cityc,
            lzone like kna1-lzone,
            niels like kna1-niels,
            kukla like kna1-kukla,
            akont like knb1-akont,
            fdgrv like knb1-fdgrv,
            vzskz like knb1-vzskz,
            zterm like knb1-zterm,
            vkbur like knvv-vkbur,
            versg like knvv-versg,
            vsbed like knvv-vsbed,
            ktgrd like knvv-ktgrd,
            taxkd like knvi-taxkd,
    END OF t_cust.
    TYPES: BEGIN OF t_sucrec,
              cnum TYPE kna1-kunnr,                          "Customer Number
              cnam TYPE kna1-name1,                          "Customer Name
    END OF t_sucrec.
    TYPES: BEGIN OF t_errrec,
    *        lineno TYPE i,                                  "Line Number
             lineno TYPE string,
           message TYPE string,                              "Error Message
    END OF t_errrec.
    DATA: v_file TYPE string,                                "Variable for storing flat file
    it_cust TYPE STANDARD TABLE OF t_cust,                   "Internal table of Customer
    wa_cust LIKE LINE OF it_cust,                            "Workarea of Internal table it_cust
    it_sucrec TYPE STANDARD TABLE OF t_sucrec,               "Internal table of Success records
    wa_sucrec LIKE LINE OF it_sucrec,                        "Workarea of Internal table it_sucrec
    it_errrec TYPE STANDARD TABLE OF t_errrec,
    wa_errrec LIKE LINE OF it_errrec,
    it_bdctab LIKE bdcdata OCCURS 0 WITH HEADER LINE,        "Internal table structure of BDCDATA
    it_messagetab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE, "Tracing Error Messages
    v_date LIKE sy-datum,                                    "Controlling of session date
    v_index LIKE sy-index,                                   "Index Number
    v_totrec TYPE i,                                         "Total Records
    v_errrec TYPE i,                                         "Error Records
    v_sucrec TYPE i,                                         "Success Records
    v_sesschk TYPE c.                                        "Session maintenance
    *& SELECTION-SCREEN
    SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001 NO INTERVALS.
    PARAMETERS: p_file    TYPE rlgrap-filename.              "rlgrap-filename is a predefined structure
    SELECTION-SCREEN: END OF BLOCK blk1.
    SELECTION-SCREEN: BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002 NO INTERVALS.
    PARAMETERS: p_mode    LIKE ctu_params-dismode DEFAULT 'N',
                p_update  LIKE ctu_params-updmode DEFAULT 'A'.
    SELECTION-SCREEN END OF BLOCK blk2.
    *& INITIALIZATION
    INITIALIZATION.
    v_date = sy-datum - 1.
    *& AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    program_name = syst-cprog
    dynpro_number = syst-dynnr
    FIELD_NAME = ' '
    IMPORTING
    file_name = p_file.
    *& START-OF-SELECTION
    START-OF-SELECTION.
    v_file = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = v_file
    filetype = 'ASC'
    has_field_separator = 'X'
    TABLES
    data_tab = it_cust
    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.
    *& END-OF-SELECTION
    END-OF-SELECTION.
    v_index = sy-index.
    LOOP AT it_cust INTO wa_cust.
      perform bdc_dynpro      using 'SAPMF02D' '0100'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'RF02D-KTOKD'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '/00'.
        perform bdc_field       using 'RF02D-BUKRS'
                                      wa_cust-bukrs.
        perform bdc_field       using 'RF02D-VKORG'
                                      wa_cust-vkorg.
        perform bdc_field       using 'RF02D-VTWEG'
                                      wa_cust-vtweg.
        perform bdc_field       using 'RF02D-SPART'
                                      wa_cust-spart.
        perform bdc_field       using 'RF02D-KTOKD'
                                      wa_cust-ktokd.
        perform bdc_dynpro      using 'SAPMF02D' '0110'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNA1-TELTX'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNA1-ANRED'
                                      wa_cust-anred.
        perform bdc_field       using 'KNA1-NAME1'
                                      wa_cust-name1.
        perform bdc_field       using 'KNA1-SORTL'
                                      wa_cust-sortl.
        perform bdc_field       using 'KNA1-NAME2'
                                      wa_cust-name2.
        perform bdc_field       using 'KNA1-NAME3'
                                      wa_cust-name3.
        perform bdc_field       using 'KNA1-NAME4'
                                      wa_cust-name4.
        perform bdc_field       using 'KNA1-STRAS'
                                      wa_cust-stras.
        perform bdc_field       using 'KNA1-PFACH'
                                      wa_cust-pfach.
        perform bdc_field       using 'KNA1-ORT01'
                                      wa_cust-ort01.
        perform bdc_field       using 'KNA1-PSTLZ'
                                      wa_cust-pstlz.
        perform bdc_field       using 'KNA1-ORT02'
                                      wa_cust-ort02.
        perform bdc_field       using 'KNA1-PFORT'
                                      wa_cust-pfort.
        perform bdc_field       using 'KNA1-PSTL2'
                                      wa_cust-pstl2.
        perform bdc_field       using 'KNA1-LAND1'
                                      wa_cust-land1.
        perform bdc_field       using 'KNA1-REGIO'
                                      wa_cust-regio.
        perform bdc_field       using 'KNA1-SPRAS'
                                      'EN'.
        perform bdc_field       using 'KNA1-TELX1'
                                      wa_cust-telx1.
        perform bdc_field       using 'KNA1-TELF1'
                                      wa_cust-telf1.
        perform bdc_field       using 'KNA1-TELFX'
                                      wa_cust-telfx.
        perform bdc_field       using 'KNA1-TELF2'
                                      wa_cust-telf2.
        perform bdc_field       using 'KNA1-TELTX'
                                      wa_cust-teltx.
        perform bdc_dynpro      using 'SAPMF02D' '0120'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNA1-CITYC'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNA1-STCEG'
                                      wa_cust-stceg.
        perform bdc_field       using 'KNA1-CITYC'
                                      wa_cust-cityc.
        perform bdc_field       using 'KNA1-LZONE'
                                      wa_cust-lzone.
        perform bdc_dynpro      using 'SAPMF02D' '0125'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNA1-KUKLA'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNA1-NIELS'
                                      wa_cust-niels.
        perform bdc_field       using 'KNA1-KUKLA'
                                      wa_cust-kukla.
        perform bdc_dynpro      using 'SAPMF02D' '0130'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNBK-BANKS(01)'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_dynpro      using 'SAPMF02D' '0340'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'RF02D-KUNNR'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_dynpro      using 'SAPMF02D' '0360'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNVK-NAMEV(01)'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_dynpro      using 'SAPMF02D' '0210'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNB1-VZSKZ'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNB1-AKONT'
                                      wa_cust-akont.
        perform bdc_field       using 'KNB1-FDGRV'
                                      wa_cust-fdgrv.
        perform bdc_field       using 'KNB1-VZSKZ'
                                      wa_cust-vzskz.
        perform bdc_dynpro      using 'SAPMF02D' '0215'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNB1-ZTERM'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNB1-ZTERM'
                                      wa_cust-zterm.
        perform bdc_dynpro      using 'SAPMF02D' '0220'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNB5-MAHNA'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_dynpro      using 'SAPMF02D' '0230'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNB1-VRSNR'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_dynpro      using 'SAPMF02D' '0610'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'RF02D-KUNNR'.
        perform bdc_dynpro      using 'SAPMF02D' '0310'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNVV-VERSG'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNVV-AWAHR'
                                      '100'.
        perform bdc_field       using 'KNVV-VKBUR'
                                      wa_cust-vkbur.
        perform bdc_field       using 'KNVV-WAERS'
                                      'INR'.
        perform bdc_field       using 'KNVV-KALKS'
                                      '1'.
        perform bdc_field       using 'KNVV-VERSG'
                                      wa_cust-versg.
        perform bdc_dynpro      using 'SAPMF02D' '0315'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNVV-VSBED'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNVV-LPRIO'
        perform bdc_field       using 'KNVV-KZAZU'
                                      'X'.
        perform bdc_field       using 'KNVV-VSBED'
                                      wa_cust-vsbed.
        perform bdc_field       using 'KNVV-ANTLF'
                                      '9'.
        perform bdc_dynpro      using 'SAPMF02D' '0320'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNVV-KTGRD'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNVV-BOKRE'
                                      'X'.
        perform bdc_field       using 'KNVV-KTGRD'
                                      wa_cust-ktgrd.
        perform bdc_dynpro      using 'SAPMF02D' '1350'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNVI-TAXKD(01)'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=VW'.
        perform bdc_field       using 'KNVI-TAXKD(01)'
                                      wa_cust-taxkd.
        perform bdc_dynpro      using 'SAPMF02D' '0324'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'KNVP-PARVW(01)'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=UPDA'.
    CALL TRANSACTION 'XD01' USING it_bdctab
    MODE p_mode
    UPDATE p_update
    MESSAGES INTO it_messagetab.
    IF sy-subrc = 0.
    *& reading success records to corresponding internal table
    READ TABLE it_messagetab WITH KEY msgtyp = 'S'.
    IF sy-subrc = 0.
    wa_sucrec-cnum = it_messagetab-msgv1.
    wa_sucrec-cnam = wa_cust-name1.
    APPEND wa_sucrec TO it_sucrec.
    CLEAR wa_sucrec.
    ENDIF.
    ELSE.
    *& reading error records to corresponding internal table
    READ TABLE it_messagetab WITH KEY msgtyp = 'E'.
    IF sy-subrc = 0.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
    id = sy-msgid
    no = it_messagetab-msgnr
    v1 = it_messagetab-msgv1
    v2 = it_messagetab-msgv2
    v3 = it_messagetab-msgv3
    v4 = it_messagetab-msgv4
    IMPORTING
    msg = wa_errrec-message.
    wa_errrec-lineno = v_index.
    *******wa_errrec-lineno  = v_index.
    *******wa_errrec-message = it_messagetab-msgv1.
    APPEND wa_errrec TO it_errrec.
    CLEAR wa_errrec.
    ENDIF.
    ENDIF.
    CLEAR : it_bdctab, it_messagetab.
    REFRESH: it_bdctab, it_messagetab.
    ENDLOOP.
    DESCRIBE TABLE it_cust LINES v_totrec.
    DESCRIBE TABLE it_errrec LINES v_errrec.
    DESCRIBE TABLE it_sucrec LINES v_sucrec.
    PERFORM disp_data.
    SKIP 2.
    IF v_sucrec > 0.
    PERFORM disp_success_data.
    ENDIF.
    SKIP 2.
    IF v_errrec > 0.
    PERFORM disp_error_data.
    ENDIF.
    *& Form bdc_dynpro
    *#  text
    *#  -->P_0104 text
    *#  -->P_0105 text
    FORM bdc_dynpro USING program
    dynpro.
    CLEAR it_bdctab.
    it_bdctab-program = program.
    it_bdctab-dynpro = dynpro.
    it_bdctab-dynbegin = 'X'.
    APPEND it_bdctab.
    ENDFORM. " bdc_dynpro
    *& Form bdc_field
    *#  text
    *#  -->P_0109 text
    *#  -->P_IT_cust_LIFNR text
    FORM bdc_field USING fnam
    fval.
    CLEAR it_bdctab.
    it_bdctab-fnam = fnam.
    it_bdctab-fval = fval.
    APPEND it_bdctab.
    ENDFORM. " bdc_field
    *& Form disp_data
    *#  text
    *#  --> p1 text
    *#  <-- p2 text
    FORM disp_data .
    ULINE (45).
    WRITE : / sy-vline,
    12 'FAMD CUSTOMER UPDATE SUMMARY'(004) COLOR 1,
    45 sy-vline.
    ULINE /(45).
    WRITE : / sy-vline,
    'Total Records Processed'(007),
    28 '=',
    30 v_totrec,
    45 sy-vline,
    / sy-vline,
    'Error Records'(005),
    28 '=',
    30 v_errrec,
    45 sy-vline,
    / sy-vline,
    'Successful Records'(006),
    28 '=',
    30 v_sucrec,
    45 sy-vline.
    ULINE /(45).
    ENDFORM. " disp_data
    *& Form disp_success_data
    *#  text
    *#  --> p1 text
    *#  <-- p2 text
    FORM disp_success_data .
    ULINE (45).
    WRITE : / sy-vline,
    14 'Successful Records'(012) COLOR 1,
    45 sy-vline.
    ULINE /(45).
    WRITE : / sy-vline ,
    'Customer Number'(010) COLOR 2,
    17 sy-vline,
    25 'Customer Name'(011) COLOR 2,
    45 sy-vline.
    ULINE /(45).
    LOOP AT it_sucrec INTO wa_sucrec.
    WRITE: / sy-vline ,
    wa_sucrec-cnum,
    17 sy-vline,
    19 wa_sucrec-cnam,
    45 sy-vline.
    ENDLOOP.
    ULINE /(45).
    ENDFORM. " disp_success_data
    *& Form disp_error_data
    *#  text
    *#  --> p1 text
    *#  <-- p2 text
    FORM disp_error_data .
    ULINE (85).
    WRITE : / sy-vline,
    35 'Error Records'(013) COLOR 1,
    85 sy-vline.
    ULINE /(85).
    WRITE : / sy-vline,
    'Record Number'(008) COLOR 2,
    sy-vline,
    37 'Reason for error'(009) COLOR 2,
    85 sy-vline.
    ULINE /(85).
    LOOP AT it_errrec INTO wa_errrec.
    WRITE : / sy-vline,
    wa_errrec-lineno,
    17 sy-vline,
    wa_errrec-message,
    85 sy-vline.
    ENDLOOP.
    ULINE /(85).
    ENDFORM. " disp_error_data

    Worked out n found the solution

  • How to create a dynamic SSIS package for multiple flat file destinations

    Hi,
    I have to create a ssis package which has single data flow task and inside that I have 23 source (sql- select * from - statements)- destination (flat files, 23 distinct) connection.
    Now for each product I have to create separate SSIS package (i.e. if prod=abc then these read select * from abc_tables and 23 abc_ txt files)
    I want to do it dynamically, means only single package and inside that variables will take select * values for each source-dest connection (so i believe 23 variables) and same for destination flat files.
    Let me know. :)
    ANK HIT - if reply helps, please mark it as ANSWER or helpful post

    Sorry It seems you're contradicting yourself. you say I know my source and dest structure and the you're
    asking all I want is to have a dynamic structure
    what does that mean?
    and reading your next sentence
    I want to run a package for 5 products, instead of creating 5 ssis packages with 23 source- dest connection, I would
    like to have one with only 23 source- dest connections 
    What I feel is what you're looking for is to  have a looping structure to loop through each of the 5
    products.
    In that case what you could do is this
    1. Create a object variable in SSIS 
    2. Use a Execute SQL Task to populate the variable with all available products (I think you'll have a master table for that). Set ResultSet property to Full ResultSet and then in ResultSet tab map Object variable to 0 th index
    3. use a ForEachLoop container with ADO .NET recordset enumerator and map to object variable. Create a variable of datatype same as that of Product identifier field to get individual values out
    4. Inside loop create your data flow task with 23 source destination connection. In the query part use a parameter for product field and map it to the variable containing product value to get only data for the product.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Flat File Destination: Broken Rows

    I am exporting data to a csv file. One of the columns has values with so mixed characters which end up confusing the system and breaking the rows before the real end of the row. What I mean is; on the flat file a resultant single row can be broken down into
    two or more rows as a result of the characters in the offending column. I work for the healthcare industry. Please see the example of what I’m talking about below. This is a real value from one of the rows in my table which I have and this value(amongst many
    more under tis column) is causing the affected row to be split into two rows. Where the letters
    OE: is coming up as a new row on my flat file. I want all this to be in the same row. My column delimiter is double dagger and my row delimiter is {CR}{LF}
    Example value:
    Column name: Comments
    Value:
    BIBA: blah blah,
    accidentally
    kicked
    brick
    wall
    to
    lateral
    aspect
    to
    R
    foot.
    reports
    hearing
    a
    crack.
    mobilised
    after
    injury.
    pain
    ++
    swelling
    +
    nil
    obvious
    deformity.
    minimal
    movement
    of
    the
    toes.
    LAS
    obs:
    entonox
    to
    good
    affect
    RR18 98%air
    P66reg 114/75
    5.3mmols
    T36.8
    pain 8-4/10
    PMH:
    Nil
    Allergies-
    nuts&prawns
    OE:
    swelling
    and
    pain
    to
    lateral
    and
    medial
    malleolus
    and 5th
    metatarsals.
    For
    xray
    Mpumelelo

    I think I have managed to get a solution to my problem.
    Instead of using csv file I have decided to use text file as my destination flat file format when exporting the data
    I have used Tab{t} as my column delimiter
    I have left the default system specified                {CR}{LF} for row delimiter
    On my flat file connection manager, I have gone to the properties and changed
    AlwaysCheckForRowDelimiters from True to False.
    After a good fight the above worked. No more broken or split rows :).
    If anyone has a better approach or suggestion it will be gladly welcome.
    Many thanks,
    Mpumelelo

  • Beginner - Flat file upload error Help Please

    Hi Everyone,
    I am trying to upload a flat file [.csv] for the first time.
    I created Info objects  Material Id, Material Name , Price as keyfigure.
    Material Id holds Material Name and Price as attributes and is With Text and With Master Data.
    For the Keyfigure, Price, I have selected Amount and defined as USD.
    In the flat file, i have Material id, Material Name, Price, Description for Text, its something like this
    Mid         M-Name   Price      DESCRIPTION
    10001     A              99.99     AA
    When I create an Application Component and thereafter create a data source for master data attributes for Material
    and select the flat file and upload it, then the data types for Keyfigure PRICE changes to FLTP Length 16, its no longer as DEC and i get some werid data for Price field, something like
    "99.990000000001E+02" instead of 99.99.   Why am I having this problem and how could this be resolved ?
    I thought i would start off with my best foot forward but it didnt work. Any kind of help would be highly appreciated. Thanks guys..Byee

    hi,
    these are the BI.7 steps
    BW 7.0
    Uploading of master data
    Log on to your SAP
    Transaction code RSA1u2014LEAD YOU TO MODELLING
    1. Creation of Info Objects
    u2022 In left panel select info object
    u2022 Create info area
    u2022 Create info object catalog ( characteristics & Key figures ) by right clicking the created info area
    u2022 Create new characteristics and key figures under respective catalogs according to the project requirement
    u2022 Create required info objects and Activate.
    2. Creation of Data Source
    u2022 In the left panel select data sources
    u2022 Create application component(AC)
    u2022 Right click AC and create datasource
    u2022 Specify data source name, source system, and data type ( master data attributes, text, hierarchies)
    u2022 In general tab give short, medium, and long description.
    u2022 In extraction tab specify file path, header rows to be ignored, data format(csv) and data separator( , )
    u2022 In proposal tab load example data and verify it.
    u2022 In field tab you can you can give the technical name of info objects in the template and you not have to map during the transformation the server will automatically map accordingly. If you are not mapping in this field tab you have to manually map during the transformation in Info providers.
    u2022 Activate data source and read preview data under preview tab.
    u2022 Create info package by right clicking data source and in schedule tab click star to load data to PSA.( make sure to close the flat file during loading )
    3. Creation of data targets
    u2022 In left panel select info provider
    u2022 Select created info area and right click to select Insert Characteristics as info provider
    u2022 Select required info object ( Ex : Employee ID)
    u2022 Under that info object select attributes
    u2022 Right click on attributes and select create transformation.
    u2022 In source of transformation , select object type( data source) and specify its name and source system Note: Source system will be a temporary folder or package into which data is getting stored
    u2022 Activate created transformation
    u2022 Create Data transfer process (DTP) by right clicking the master data attributes
    u2022 In extraction tab specify extraction mode ( full)
    u2022 In update tab specify error handling ( request green)
    u2022 Activate DTP and in execute tab click execute button to load data in data targets.
    4. Monitor
    Right Click data targets and select manage and in contents tab select contents to view the loaded data. Alternatively monitor icon can be used.
    BW 7.0
    Uploading of Transaction data
    Log on to your SAP
    Transaction code RSA1u2014LEAD YOU TO MODELLING
    5. Creation of Info Objects
    u2022 In left panel select info object
    u2022 Create info area
    u2022 Create info object catalog ( characteristics & Key figures ) by right clicking the created info area
    u2022 Create new characteristics and key figures under respective catalogs according to the project requirement
    u2022 Create required info objects and Activate.
    6. Creation of Data Source
    u2022 In the left panel select data sources
    u2022 Create application component(AC)
    u2022 Right click AC and create datasource
    u2022 Specify data source name, source system, and data type ( Transaction data )
    u2022 In general tab give short, medium, and long description.
    u2022 In extraction tab specify file path, header rows to be ignored, data format(csv) and data separator( , )
    u2022 In proposal tab load example data and verify it.
    u2022 In field tab you can you can give the technical name of info objects in the template and you not have to map during the transformation the server will automatically map accordingly. If you are not mapping in this field tab you have to manually map during the transformation in Info providers.
    u2022 Activate data source and read preview data under preview tab.
    u2022 Create info package by right clicking data source and in schedule tab click star to load data to PSA.( make sure to close the flat file during loading )
    7. Creation of data targets
    u2022 In left panel select info provider
    u2022 Select created info area and right click to create ODS( Data store object ) or Cube.
    u2022 Specify name fro the ODS or cube and click create
    u2022 From the template window select the required characteristics and key figures and drag and drop it into the DATA FIELD and KEY FIELDS
    u2022 Click Activate.
    u2022 Right click on ODS or Cube and select create transformation.
    u2022 In source of transformation , select object type( data source) and specify its name and source system Note: Source system will be a temporary folder or package into which data is getting stored
    u2022 Activate created transformation
    u2022 Create Data transfer process (DTP) by right clicking the master data attributes
    u2022 In extraction tab specify extraction mode ( full)
    u2022 In update tab specify error handling ( request green)
    u2022 Activate DTP and in execute tab click execute button to load data in data targets.
    8. Monitor
    Right Click data targets and select manage and in contents tab select contents to view the loaded data. There are two tables in ODS new table and active table to load data from new table to active table you have to activate after selecting the loaded data . Alternatively monitor icon can be used
    if it is helpful assign points
    cheers
    sivaRaju

  • BPS  Flat File Upload Error Messages

    Hi,
    I am using the BPS flat file upload and am getting error messages. These error messages are coming from the user exit in the characteristics relationships. Unfortunately the message does not indicate which line on the upload file the error is for. In the user exit it does not pass the line no of  the flat file that is being processed.
    Does anyone have any ideas how the message could be enhanced to indicate the line in error or if there is another exit I could perform the validation in?
    regards
    Paul Cairncross

    Hi Sai,
    The issue is not the particular message. The message is in fact my message in the user exit in the characteristic relationships. The issue is when using the flat file upload the message does not indicate which line in the file the message apply's to. Looking at the userexit no line number is passed. This is not a problem in the web as the specific line is highlighted when the user is keying in the data.
    Regards,
    Paul Cairncross

  • Flat File Upload Error

    Hi All,
    I am using BW version 3.5 SP 16.
    I am trying to load a flat file in to BW. I am loading it to an info object char with direct update. Everything is in capital letters char length and evrything is matched. But I am getting an error.
    In monitor it says
    Message no. RSM2704
    Diagnosis
    Data records in the PSA were marked for data package 1. Here there were                                                   8 errors. The systemwrote information or warnings for the remaining data records.
    and in ST22 it says:
    TYPELOAD_NEW_VERSION
    data type "/BIC/CCABZMATL_ATTR" was found in newer version than required.
    What does the error means?? Our BW System is new and there is noting in it. Are there any settings in SPRO that I am missing??
    Any help is appreciated.
    Regards

    Hi Ninad,
    Your transfer structure is not in the last version. That's why you need to delete a source system assignment to infosource. During this operation the PSA structure (which is responsible for a correct data transfer from the source system to BW) will be deleted.
    If you use a flat file datasource, then if you try to assign the source system again, the system will use the same, old transfer structure, because it keeps information about even deleted things during a session.
    That's why you need to log out the system.
    After the new log in, assigning the flat file datasource and activating the transfer rules will create the proper structure.
    Creating a new infoobject as data target, without deleting the source system first (as you did) won't work.
    Hope it's clear now.
    Best regards,
    Eugene

  • Flat file upload error message

    Hi Friends
    I have designed an infocube and when i try to load data after selecting the option of flat file upload, i get the following error message," You have no authorization for basic types(activity 03)". Please clarify what it means.
    regards
    kris

    hi Kris,
    it may due to lack of authorization, please run transaction su53 and capture the info to your basis team to add you the needeed authorization.
    hope this helps.

Maybe you are looking for

  • Javascript will not open in mozllia but it will open in internet explorer

    Java script is enabled in Mozilla options. When I try to open an item with script it will not open in Mozilla.but when I try to access the same item it will open Internet Explorer

  • Error when installing windows 8 onto my Macbook Pro

    I am trying to download Windows 8 onto my Macbook Pro, it is a 2011 Model and is running OS X Lion 10.7.5. I have created a bootable usb drive through bootcamp with a windows 64 bit iso. I then go through the Bootcamp wizard, when the computer tries

  • How to update routing labour hours by material origin group?

    Hi, I have a requirement to update the routing labour hours by material origin groups to save time of updating each and every material. Is there a way to do this? For example if 3 materials belong to origin group A then if all 3 materials use labour

  • Custom Fields in F-28

    Hi Gurus, Wish everyone a happy new year! We have a requirement where client want to add a new field 'Branch Account Name' on the 'Post Incoming Payments Process Open Items' screen (second screen on F-28). This new field would display the name of the

  • Iphoto won't send photo

    Using iPhoto to send photos and the status bar completes and gives a message that 1 photo has been sent.  The photo NEVER arrives.  I've been on support calls with Apple, but no resolution.  The email address I'm sending from works fine in my mac ema