Auditing the Error Records

How can I audit the bad records that are getting rejected from the target table. ie) i want to store the bad records rejected out to a separate table.
i tried checking it out in the wb_rt_error_sources table in runtime repository, but it holds only the error column name and its value. i want to hold the entire record.
Thanking in Anticipation,
Amudha

Amudha,
There are two main methods of dealing with the error records:
1. If the error records are violating key constraints, you can configure the target object (right-click on the the mapping, select configure and expand the sources and targets configuration, constraints section). You must put the constraints to false, so that OWB will disable the constraints during the load (and you will have better performance) and re-enable them after the load. The records violating the target table constraints will appear in the runtime audit error table as well as in the exceptions table, if you specify one.
2. If you can detect the error condition with a filter, a lookup table etc., you can channel them through a splitter operator to a target table that will contain the erroneous rows.
Regards:
Igor

Similar Messages

  • How to get the index of the error record when uploaded using standard LSMW

    Hi Experts,
    When uploading data using lsmw standard batch input method which creates an error session if any errors,how can we able to find the index of the error record
    eg: If 3rd record in input file is incorrect then error session is getting created with the error and index as 1.But I want to know that 3rd record in my input file is incorrect.
    Please help me out.

    Srinivas,
    In global data, i've written like this.
    TYPES: BEGIN OF TYPE_ERROR,
                 INDEX TYPE I,
                 END OF TYPE_ERROR.
    DATA: GT_ERROR TYPE TABLE OF TYPE_ERROR,
               GS_ERROR TYPE TYPE_ERROR,
               GV_TOTAL_COUNT TYPE I, GV_INDEX TYPE I,
               GV_STRING TYPE STRING,
              GV_FILE TYPE STRING VALUE '/usr/sap/interfaces/LSMW/Asseterror
    In Begin of transaction,
    GV_TOTAL_COUNT = GV_TOTAL_COUNT + 1.
    In End of processing,
    OPEN DATASET GV_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    IF SY-SUBRC = 0.
    CLEAR GS_ERROR.
    LOOP AT GT_ERROR INTO GS_ERROR.
    CONCATENATE 'INDEX OF THE ERROR RECORD IS:' GS_ERROR INTO GV_STRING.
    TRANSFER GV_STRING TO GV_FILE.
    CLEAR: GV_STRING, GS_ERROR.
    ENDLOOP.
    ENDIF.
    How and where will I be assigning error count and append it to the internal table.
    Please help me out.

  • Logic to capture the Error records

    Hi All ,
               I have one scenario like this ,one report program runs in R/3 system to fetch some data from BW system .
    It uses Remote FM to do this .
    The problem is the FM has got error table with error msgs , if there is any problem in fetching the data in R/3 system.
    But when program is excuted it fails after returning to R/3 system with  error msg in WHEN OTHERS and stops there itself
    Instead it should proceed with other program codes and then
    finally output the error records .There is already subroutine in the program to display the erros records in last.  How do i do it programatically
    CALL FUNCTION 'ZC_BW_FIREFIGHT' DESTINATION p_r3rfc
          EXPORTING
            mrp_planning_scenario       = p_mrppln
            error_indicator             = p_info
          IMPORTING
            r3client                    = w_r3client
            r3instance                  = w_r3instance
          TABLES
            materials                   = t_bwmat
            plants                      = s_plant
            firefighting                = t_firefight1
            error_msgs                  = t_r3_errors
          EXCEPTIONS
            no_material_data_found      = 1
            no_storage_loc_data         = 2
            proc_complete_no_rcds_found = 3
            OTHERS                      = 4.
        CASE sy-subrc.
          WHEN 0.
            PERFORM f4020_confirm_fm_executed.
          WHEN 1.
            MESSAGE e999 WITH
                  'R3: No material data found for materials/plants.'(049).
          WHEN 2.
            MESSAGE e999 WITH
                  'R3: No storage location data for materials/plants.'(050).
          WHEN 3.
            MESSAGE e999 WITH
                  'R3: ZC_BWFIREFIGHT processed, but no data found.'(051).
          WHEN OTHERS.
            MESSAGE e999 WITH
                  'R3: ZC_BWFIREFIGHT FM call to R3 failed'(052).
        ENDCASE.
      ENDIF .
    ENDFORM.                    " f4010_call_zc_bwfirefight
    <REMOVED BY MODERATOR>
    Kumaran.C
    Edited by: Alvaro Tejada Galindo on Feb 25, 2008 2:46 PM

    Try with the following method
    DATA : bapireturn TYPE TABLE OF bapireturn WITH HEADER LINE.
    CASE sy-subrc.
      WHEN 0.
        PERFORM f4020_confirm_fm_executed.
      WHEN 1.
        CALL FUNCTION 'BALW_BAPIRETURN_GET'
          EXPORTING
            type                       = 'E'
            cl                         = <msgclass>
            number                     = '049'
            par1                       = 'R3: No material data found for materials/plants.'
          IMPORTING
            bapireturn                 = bapireturn
          EXCEPTIONS
            only_2_char_for_message_id = 1
            OTHERS                     = 2.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ELSE.
          APPEND bapireturn.
          CLEAR bapireturn.
        ENDIF.
      WHEN 2.
        " Do Simillarly
      WHEN 3.
        " Do Simillarly
      WHEN OTHERS.
        " Do Simillarly
    ENDCASE.

  • Any option is there to find the error record in loop for huge amount of rec

    Hi Guru's,
    In our production system we got a error. While debugging we found one of our loop getting 1 lakh records. One of the record from the internal table having some wrong values because of that its giving a error message. But we are not getting any proper message.
    Now our problem is its very difficult to debug all the records one by one. Even its not possible to give Watchpoint. bze in what situations its giving this error that also not predictable. So how to find the error record?
    Kindly suggest.
    Ananadhan

    Need a lot more info.
    To start with is this CR Designer or some other product?
    I suspect it's classic SAP products like Business One etc., if so please mark as answered and post your question int the correct forum.
    Thank you
    Don

  • Copying the error records in a custom table

    Hi,
    I  have a report program which is fetching Invoice header and line items . I need to copy the error records (records having a custom field ZZKUNNR as blank) in a custom table . I am executing this report in background daily .
    The records in the custom table can be corrected by functional guys
    Daily the report should fetch the data from SAP and also it should check whether there are correct records in the custom table .
    If the records are found from custom table then those records also must be fetched.
    Finally the output is stored in an application server .
    Kindly help how to write the code for error records.

    Hang on a moment here... I am sure we deleted your user ID a few months ago for ponits gaming!
    Did it "pay off" somehow and now you have a "real job" but don't have a clue what you are doing?
    Doesn't that make you feel just a little bit unconfident about life, the universe and ABAP?
    Cheers,
    Julius

  • Edit the error records in error stack

    Hi,
    I want to edit the error records in error stack. There are around 300 records in error stack . I want to replace the value in one field with blank to correct the records. Can you please help me how to replace the value with blank.
    Thanks,
    Priya

    Hi,
    Open the original DTP and click on change.
    1) In Update you will find "create error DTP", just click on it system automatically create error DTP for you original DTP.
    2) Do not change any thing, just come back to your original DTP and activate your DTP again.
    Now come back and refresh the info provider tree.
    now execute your DTP, request will be green in target and you will error records in error stack.
    How to edit the error records in error DTP
    please find the doc.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0406328-29c7-2e10-5db5-afe9b5695eeb?overridelayout=t…
    Thanks,
    Phani.

  • About "the hospital for the error records"...

    Hi folks,
    I am new to ODI, and I am not buying the idea of "the hospital for the error records". In my personal opinion it introduces many complications. If some dimension records are "dirty" and we put them in the error table, then we are splitting the natural relation of the data, aren't we. The DWH data won't correspond to the source anymore, the dimension's data will be artificially split (the error records could apear on the next day), and we will need an additional process which should update the corresponding fact records on the next day (late arriving changes for the existing facts). Sounds much more complicated, than just to allow the ETL process to fail, fix the issue and start it again.
    Experts, please, help with an opinion.
    Thanks in advance!

    @DecaXD, thanks for your comment.
    "after that under my opinion "something is better than none"" This is exactly what I am worried about. The whole "hospital" idea, is something, which makes the whole process more complicated, without clear benefits. I like the idea to have E$ tables, but just for debugging purposes, just to be able to identify quickly, what were the error rows, so I can do a investigation based on failed data. What, I don't like is the idea that we can EASILY reuse the error data to recover the DWH state later.
    "Are you sure that you want to stop ALL your datawarehouse because the Address field is null?"Well, if during the analysis phase (especially, the data profiling step), we missed the fact that the address table could be null, then yes, I would like to stop the whole ETL, because this is situation, which has not been addressed correctly during the design of the ETL process.
    A rithorical question: Are you going to keep recovering the null records after each run (even a "successfull" one), or you would fix the interface/mapping to allow nulls, which would be updated on subsequent runs naturally ?
    What about more complicated error rows, like missing dimension key, which relates to many fact records ? Should we put the related fact records in their E$ table either. What if we have a snowflake design with many references to/from the error dimension records. Sounds too complicated for me.
    I would just store the error rows, and stop the ETL. Note, that I allow for dellay, but don't publish any not consistent data in the DWH.
    Bellow is a quote from the book you mentioned:
    "Don’t overuse the reject file! Reject files are notorious for being dumping
    grounds for data we’ll deal with later. When records wind up in the reject file,
    unless they are processed before the next major load step is allowed to run to
    completion, the data warehouse and the production system are out of sync."
    I am looking for more arguments, I do understand that it is not a simple issue, but I would like to see your real life experience here..
    Thanks!
    Edited by: hayrabedian on 2013-4-29 14:01
    Edited by: hayrabedian on 2013-4-29 14:02

  • Trapping the error records in a custom Table

    Hi,
    I am executing a report program. It is extracting different types of files - Invoice Header, Invoice line items, Customers, Master data attributes, Sales representative, Branch location data. Each file from different tables. In the selection screen we will be having check boxes for each file. The output is stored either on desktop or on application server in a file format.
    Here there are some mandatory fields for each file which should not be blank.
    For example there is one custom field for Sales Invoice header BUILDER which is mandatory. If it is blank then it will be an error record.
    We need to create a custom table with all these mandatory fields.
    Kindly pls help.

    Hi Abdul,
    this is a consulting issue, not an allowed question.
    Regards,
    Clemens

  • How to print the error records and success records in bdc

    how to print the number of error records and success records in bdc

    hai,
    plz refer this program,
    Z_130399130271_A
    REPORT Z_130399130271_A
           NO STANDARD PAGE HEADING LINE-SIZE 325.
    *INCLUDE YVALIDATE.
    *include bdcrecx1.
    INCLUDE YINCLUDE399.
    DATA ITAB LIKE TABLE OF FILE_TABLE WITH HEADER LINE.
    PARAMETERS: DATASET(132) LOWER CASE.
    DATA : RC TYPE I,
    ERR(40) TYPE C,
    SUCCESSCNT TYPE I VALUE 0,
    FAILCOUNT TYPE I VALUE 0.
       DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
      If it is nessesary to change the data section use the rules:
      1.) Each definition of a field exists of two lines
      2.) The first line shows exactly the comment
          '* data element: ' followed with the data element
          which describes the field.
          If you don't have a data element use the
          comment without a data element name
      3.) The second line shows the fieldname of the
          structure, the fieldname must consist of
          a fieldname and optional the character '_' and
          three numbers and the field length in brackets
      4.) Each field must be type C.
    Generated data section with specific formatting - DO NOT CHANGE  ***
    DATA: BEGIN OF RECORD OCCURS 0,
    data element: LIF16
            LIFNR_001(016),
    data element: KTOKK
            KTOKK_002(004),
    data element: ANRED
            ANRED_003(015),
    data element: NAME1_GP
            NAME1_004(035),
    data element: SORTL
            SORTL_005(010),
    data element: STRAS_GP
            STRAS_006(035),
    data element: PFACH
            PFACH_007(010),
    data element: ORT01_GP
            ORT01_008(035),
    data element: ORT02_GP
            ORT02_009(035),
    data element: LAND1_GP
            LAND1_010(003),
    data element: REGIO
            REGIO_011(003),
    data element: SPRAS
            SPRAS_012(002),
    data element: TELF1
            TELF1_013(016),
    data element: TELF2
            TELF2_014(016),
    data element: BANKS
            BANKS_01_015(003),
    data element: BANKK
            BANKL_01_016(015),
    data element: BANKN
            BANKN_01_017(018),
          END OF RECORD.
    DATA:   BEGIN OF ERRORITAB OCCURS 0,
            LIFNR_001 LIKE LFA1-LIFNR,
            KTOKK_002 LIKE LFA1-KTOKK,
            ANRED_003 LIKE LFA1-ANRED,
            NAME1_004 LIKE LFA1-NAME1,
            SORTL_005 LIKE LFA1-SORTL,
            STRAS_006 LIKE LFA1-STRAS,
            PFACH_007 LIKE LFA1-PFACH,
            ORT01_008 LIKE LFA1-ORT01,
            ORT02_009 LIKE LFA1-ORT02,
            LAND1_010 LIKE LFA1-LAND1,
            REGIO_011 LIKE LFA1-REGIO,
            SPRAS_012 LIKE LFA1-SPRAS,
            TELF1_013 LIKE LFA1-TELF1,
            TELF2_014 LIKE LFA1-TELF2,
            BANKS_01_015 LIKE LFBK-BANKS,
            BANKL_01_016 LIKE LFBK-BANKL,
            BANKN_01_017 LIKE LFBK-BANKN,
            ERRORMSG(60) TYPE C,
            SERIAL TYPE I VALUE '1',
        END OF ERRORITAB.
    End generated data section ***
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR DATASET.
      CALL FUNCTION 'TMP_GUI_FILE_OPEN_DIALOG'
    EXPORTING
        WINDOW_TITLE            = 'select a file '
        DEFAULT_EXTENSION       = 'TXT'
        DEFAULT_FILENAME        = 'ASSIGN5.TXT'
      FILE_FILTER             =
      INIT_DIRECTORY          =
      MULTISELECTION          =
    IMPORTING
      RC                      =
        TABLES
          FILE_TABLE              = ITAB
    EXCEPTIONS
       CNTL_ERROR              = 1
       OTHERS                  = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE ITAB INDEX 1.
      DATASET = ITAB-FILENAME.
      WRITE DATASET.
    START-OF-SELECTION.
    *perform open_dataset using dataset.
    *perform open_group.
      DATA T TYPE STRING.
      T = DATASET.
      IF T EQ ' '.
        MESSAGE E110(ZX).
      ENDIF.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      = T
      FILETYPE                      = 'ASC'
          HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
        TABLES
          DATA_TAB                      = RECORD
    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.
      LOOP AT RECORD.
        CLEAR RC.
        CLEAR ERR.
    *read dataset dataset into record.
        IF SY-SUBRC <> 0. EXIT. ENDIF.
        RECORD-KTOKK_002 = '0001'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0100'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RF02K-KTOKK'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_FIELD       USING 'RF02K-LIFNR'
                                      RECORD-LIFNR_001.
        PERFORM BDC_FIELD       USING 'RF02K-KTOKK'
                                      RECORD-KTOKK_002.
        PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0110'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'LFA1-TELX1'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_FIELD       USING 'LFA1-ANRED'
                                      RECORD-ANRED_003.
        PERFORM BDC_FIELD       USING 'LFA1-NAME1'
                                      RECORD-NAME1_004.
        PERFORM BDC_FIELD       USING 'LFA1-SORTL'
                                      RECORD-SORTL_005.
        PERFORM BDC_FIELD       USING 'LFA1-STRAS'
                                      RECORD-STRAS_006.
        PERFORM BDC_FIELD       USING 'LFA1-PFACH'
                                      RECORD-PFACH_007.
        PERFORM BDC_FIELD       USING 'LFA1-ORT01'
                                      RECORD-ORT01_008.
        PERFORM BDC_FIELD       USING 'LFA1-ORT02'
                                      RECORD-ORT02_009.
        PERFORM BDC_FIELD       USING 'LFA1-LAND1'
                                      RECORD-LAND1_010.
        PERFORM BDC_FIELD       USING 'LFA1-REGIO'
                                      RECORD-REGIO_011.
        PERFORM BDC_FIELD       USING 'LFA1-SPRAS'
                                      RECORD-SPRAS_012.
        PERFORM BDC_FIELD       USING 'LFA1-TELF1'
                                      RECORD-TELF1_013.
        PERFORM BDC_FIELD       USING 'LFA1-TELF2'
                                      RECORD-TELF2_014.
        PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0120'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'LFA1-KUNNR'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=VW'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0130'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'LFBK-BANKN(01)'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM BDC_FIELD       USING 'LFBK-BANKS(01)'
                                      RECORD-BANKS_01_015.
        PERFORM BDC_FIELD       USING 'LFBK-BANKL(01)'
                                      RECORD-BANKL_01_016.
        PERFORM BDC_FIELD       USING 'LFBK-BANKN(01)'
                                      RECORD-BANKN_01_017.
        PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0130'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'LFBK-BANKS(01)'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=UPDA'.
        PERFORM BDC_TRANSACTION USING 'XK01' CHANGING ERR RC.
        DATA: SERIAL TYPE I VALUE 1.
        IF RC <> 0.
          FAILCOUNT = FAILCOUNT + 1.
          CLEAR ERRORITAB.
          ERRORITAB-SERIAL = SERIAL.
          ERRORITAB-LIFNR_001 = RECORD-LIFNR_001.
          ERRORITAB-KTOKK_002 = RECORD-KTOKK_002.
          ERRORITAB-ANRED_003 = RECORD-ANRED_003.
          ERRORITAB-NAME1_004 = RECORD-NAME1_004.
          ERRORITAB-SORTL_005 = RECORD-SORTL_005.
          ERRORITAB-STRAS_006 = RECORD-STRAS_006.
          ERRORITAB-PFACH_007 = RECORD-PFACH_007.
          ERRORITAB-ORT01_008 = RECORD-ORT01_008.
          ERRORITAB-ORT02_009 = RECORD-ORT02_009.
          ERRORITAB-LAND1_010 = RECORD-LAND1_010.
          ERRORITAB-REGIO_011 = RECORD-REGIO_011.
          ERRORITAB-SPRAS_012 = RECORD-SPRAS_012.
          ERRORITAB-TELF1_013 = RECORD-TELF1_013.
          ERRORITAB-TELF2_014 = RECORD-TELF2_014.
          ERRORITAB-BANKS_01_015 = RECORD-BANKS_01_015.
          ERRORITAB-BANKL_01_016 = RECORD-BANKL_01_016.
          ERRORITAB-BANKN_01_017 = RECORD-BANKN_01_017.
          ERRORITAB-ERRORMSG = ERR.
          SERIAL = SERIAL + 1.
          APPEND ERRORITAB.
          MODIFY RECORD TRANSPORTING KTOKK_002.
          DELETE RECORD WHERE KTOKK_002 = '0001'.
        ELSE.
          SUCCESSCNT = SUCCESSCNT + 1.
        ENDIF.
      ENDLOOP.
    display output********************************************************
      SKIP.
      FORMAT COLOR 5 INTENSIFIED OFF.
      WRITE:/ 'No. of records successfully uploaded: '.
      FORMAT COLOR 4 INTENSIFIED OFF.
      WRITE: SUCCESSCNT.
    Displaying the success table******************************************
      IF SUCCESSCNT <> 0.
        SKIP.
        FORMAT COLOR 4 INTENSIFIED OFF.
        WRITE:/ 'Successful Records'.
        FORMAT COLOR 7 INTENSIFIED ON.
        WRITE:/(261) SY-ULINE,
              / SY-VLINE,
                'S.NO',                               007 SY-VLINE,
                'VENDOR ACC.NUM',                     023 SY-VLINE,
                'VENDOR ACC GROUP',                   041 SY-VLINE,
                'TITLE',                              048 SY-VLINE,
                'VENDOR NAME',                        064 SY-VLINE,
                'SORT FIELD',                         076 SY-VLINE,
                'HOUSE NO.& STREET',                  101 SY-VLINE,
                'PO.BOX NO',                          116 SY-VLINE,
                'CITY',                               129 SY-VLINE,
                'DISTRICT',                           141 SY-VLINE,
                'COUNTRY KEY',                        156 SY-VLINE,
                'REGION',                             166 SY-VLINE,
                'LANGUAGE KEY',                       180 SY-VLINE,
                'TELEPHONE NO 1',                     196 SY-VLINE,
                'TELEPHONE NO 2',                     213 SY-VLINE,
                'BANK COUNTRY KEY',                   231 SY-VLINE,
                'BANK KEY',                           241 SY-VLINE,
                'BANK ACC.NO',                        261 SY-VLINE,
                /1(261) SY-ULINE.
        FORMAT COLOR 4 INTENSIFIED ON.
        SERIAL = 1.
       SORT RECORD BY LIFNR_001.
        LOOP AT RECORD.
          WRITE:/ SY-VLINE,
          SERIAL LEFT-JUSTIFIED,          007 SY-VLINE,
          RECORD-LIFNR_001(016),          023 SY-VLINE,
          RECORD-KTOKK_002(004),          041 SY-VLINE,
          RECORD-ANRED_003(015),          048 SY-VLINE,
          RECORD-NAME1_004(035),          064 SY-VLINE,
          RECORD-SORTL_005(010),          076 SY-VLINE,
          RECORD-STRAS_006(035),          101 SY-VLINE,
          RECORD-PFACH_007(010),          116 SY-VLINE,
          RECORD-ORT01_008(035),          129 SY-VLINE,
          RECORD-ORT02_009(035),          141 SY-VLINE,
          RECORD-LAND1_010(003),          156 SY-VLINE,
          RECORD-REGIO_011(003),          166 SY-VLINE,
          RECORD-SPRAS_012(002),          180 SY-VLINE,
          RECORD-TELF1_013(016),          196 SY-VLINE,
          RECORD-TELF2_014(016),          213 SY-VLINE,
          RECORD-BANKS_01_015(003),       231 SY-VLINE,
          RECORD-BANKL_01_016(015),       241 SY-VLINE,
          RECORD-BANKN_01_017(018),       261 SY-VLINE.
          WRITE:/(261) SY-ULINE.
          SERIAL = SERIAL + 1.
        ENDLOOP.
        WRITE:/1(261) SY-ULINE.
      ENDIF.
      SKIP.
      FORMAT COLOR 5 INTENSIFIED OFF.
      WRITE:/ 'No. of records not uploaded: '.
      FORMAT COLOR 4 INTENSIFIED OFF.
      WRITE: FAILCOUNT.
    *Displaying the error table
      IF FAILCOUNT <> 0.
        SKIP.
        FORMAT COLOR 4 INTENSIFIED OFF.
        WRITE:/(320) SY-ULINE,
                'Error Records'.
        FORMAT COLOR 7 INTENSIFIED ON.
        WRITE:/ SY-ULINE, SY-VLINE,
                'S.NO',                               007 SY-VLINE,
                'VENDOR ACC.NUM',                     023 SY-VLINE,
                'VENDOR ACC GROUP',                   041 SY-VLINE,
                'TITLE',                              048 SY-VLINE,
                'VENDOR NAME',                        064 SY-VLINE,
                'SORT FIELD',                         076 SY-VLINE,
                'HOUSE NO.& STREET',                  101 SY-VLINE,
                'PO.BOX NO',                          116 SY-VLINE,
                'CITY',                               129 SY-VLINE,
                'DISTRICT',                           141 SY-VLINE,
                'COUNTRY KEY',                        156 SY-VLINE,
                'REGION',                             166 SY-VLINE,
                'LANGUAGE KEY',                       180 SY-VLINE,
                'TELEPHONE NO 1',                     196 SY-VLINE,
                'TELEPHONE NO 2',                     213 SY-VLINE,
                'BANK COUNTRY KEY',                   231 SY-VLINE,
                'BANK KEY',                           241 SY-VLINE,
                'BANK ACC.NO',                        261 SY-VLINE,
                'ERROR MESSAGE',                      320 SY-VLINE.
        WRITE:/(320) SY-ULINE.
        FORMAT COLOR 4 INTENSIFIED ON.
       SORT ERRORITAB BY LIFNR_001.
        LOOP AT ERRORITAB.
          WRITE:/ SY-VLINE,
                ERRORITAB-SERIAL LEFT-JUSTIFIED,          007 SY-VLINE,
                ERRORITAB-LIFNR_001 ,       023 SY-VLINE,
                ERRORITAB-KTOKK_002,       041 SY-VLINE,
                ERRORITAB-ANRED_003,       048 SY-VLINE,
                ERRORITAB-NAME1_004,       064 SY-VLINE,
                ERRORITAB-SORTL_005,       076 SY-VLINE,
                ERRORITAB-STRAS_006,       101 SY-VLINE,
                ERRORITAB-PFACH_007,       116 SY-VLINE,
                ERRORITAB-ORT01_008,       129 SY-VLINE,
                ERRORITAB-ORT02_009,       141 SY-VLINE,
                ERRORITAB-LAND1_010,       156 SY-VLINE,
                ERRORITAB-REGIO_011,       166 SY-VLINE,
                ERRORITAB-SPRAS_012,       180 SY-VLINE,
                ERRORITAB-TELF1_013,       196 SY-VLINE,
                ERRORITAB-TELF2_014,       213 SY-VLINE,
                ERRORITAB-BANKS_01_015,    231 SY-VLINE,
                ERRORITAB-BANKL_01_016,    241 SY-VLINE,
                ERRORITAB-BANKN_01_017,    261 SY-VLINE,
                ERRORITAB-ERRORMSG,        320 SY-VLINE.
          WRITE:/(320) SY-ULINE.
        ENDLOOP.
        WRITE:/ SY-ULINE.
      ENDIF.
    hope this ll help you..
    regards,
    prema.A

  • How to Create a Function module z_create and to track the error records?

    I want to create a function module z_create which will insert the data from the internal tables gt_model_master and gt_model  into the corresponding database custom tables y_model_master.
    Secondly if any error is encountered during the above updation, then how to track those error records ?

    HI,
    check the sy-subrc ,if it is zero the insertion is success,otherwise use 
    message class.
    if sy-subrc ne 0.
    message e052(zmessage).
    endif.
    Edited by: rakesh dhudipala on Feb 12, 2008 2:33 PM
    Edited by: rakesh dhudipala on Feb 12, 2008 2:33 PM

  • HI All Capturing the error records in an internal table

    Hi All,
             I am retrieving the data from application server .
            My requirement is to :
         Check if the Measurement Point Id provided in the file is a valid one or not. Query the table EUITRANS by passing the Measurement point Id in the EXT_UI field. If the query is successful, then proceed to next step. If not, log it in the error log with error message DM-001 and proceed with the next Measurement point id.
    so i nee the code for capturing the error log with error message.
    pls provide me ASAP.
    Thanks&Regards,
    Bharat

    Hi,
    if you like do display all messages online have a look at FM:
    'MESSAGES_INITIALIZE'
    'MESSAGE_STORE'
    'MESSAGES_SHOW'
    If you want to write application log look at function group SBAL modules BAL_LOG*. There is also a good documentation in SAPDOCU..
    Kind regards,
    HP

  • Capturing the error records

    The SDM interface runs in batch. A pop up message will not be useful.
    If errors occur, they can NOT be re-sent manually the next day after the data issue is corrected. The extract needs to be changed to automatically try to resend those that are captured in the ERROR table and include them in the next day. The sales for those items will fall in the current day, but that is okay.

    If you are going to post your spec, then you might as well post all of it...

  • Creating session for the Error records

    Hi Guys,
      Iam posting some data using the Custom FM. If i get any errors out of that i need to create a BDC session for those errors.Can anyone throw some light on how to acheive this.
    Regards,
    Kittu.

    HI,
    check this code
    report  zsh_recording_fk01                      .
    tables : lfa1  .  " Vendor Master.
      I N T E R N A L T A B L E - D E C L A R A T I O N                  *
    data : begin of it_tab occurs 0,
               lifnr(16),        "account number of vendor
               ktokk(4),         "Vendor Number
               anred(15),        "Account Group
               name1(35),        "Name
               sortl(10),        "Sort field
               land1(3) ,        "Land
               spras(1),         "Language Key
               kunnr(10),        "customer number
               banks(3),         "Bank country key
               bankl(15),        "Bank Key
               bankn(18),        "Bank Account Number
               koinh(60),        "Account Holder Name
               banka(60),        "Name of bank
               provz(3),         "region
    end of it_tab.
    data : begin of it_tab1 occurs 0,
               banks(3),         "Bank country key
               bankl(15),        "Bank Key
               bankn(18),        "Bank Account Number
               koinh(60),        "Account Holder Name
               banka(60),        "Name of bank
               provz(3),         "region
    end of it_tab1.
    DATA:it_BDCtab LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    ERROR MESSAGE TABLE
    DATA:it_MSGtab LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    data: program type BDCDATA-PROGRAM,
          dynpro  type BDCDATA-dynpro,
          fnam    type BDCDATA-fnam,
          fval    type BDCDATA-fval.
                  S E L E C T I O N  -  S C R E E N                      *
    selection-screen : begin of block bl1 with frame.
    parameter        : p_file type rlgrap-filename default
    'C:\Vendor.txt.txt' obligatory,
                       p_file1 type rlgrap-filename default
    'C:\Vendor1.txt.txt' obligatory.
    selection-screen : end of block bl1.
               A T  S E L E C T I O N  -  S C R E E N                    *
    at selection-screen on value-request for p_file.
    to get F4 help for p_file
      perform f4_get_help using p_file.
    to get F4 help for p_file
       perform f4_get_help1 using p_file1.
                S T A R T   O F   S E L E C T I O N                      *
    start-of-selection.
    Uploading data from flat file into it_tab
      perform bdc_upload.
      perform bdc_upload1.
      perform populate_bdc.
                 E N D    O F   S E L E C T I O N                        *
    end-of-selection.
    displaying fields which r uploaded from flat file.
      perform display_report.
                 T O P  _  O F _  P A G E                                *
    top-of-page.
    to display header in the report
      perform header.
    *&      Form  f4_get_help
          text
         -->P_P_FILE  text
    form f4_get_help  using    p_p_file.
      call function 'F4_FILENAME'
       exporting
         program_name        = syst-cprog
         dynpro_number       = syst-dynnr
      FIELD_NAME          = ' '
       importing
         file_name           =  p_p_file.
    endform.                    " f4_get_help
    *&      Form  bdc_upload
          text
    -->  p1        text
    <--  p2        text
    form bdc_upload .
      data: v_file type string.
      v_file = p_file.
      call function 'GUI_UPLOAD'
        exporting
          filename                      = v_file
          filetype                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    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.
    endform.                    " bdc_upload
    *&      Form  display_report
          text
    -->  p1        text
    <--  p2        text
    form display_report .
      uline 1(86).
      loop at it_tab .
        format color 2.
        write :/1   sy-vline,
                2   it_tab-lifnr,
                12  it_tab-ktokk ,
                18  it_tab-anred ,
                30  it_tab-name1 ,
                55  it_tab-sortl ,
                58  it_tab-land1 ,
                72  it_tab-spras ,
                76  it_tab-kunnr ,
                88  it_tab-banks ,
                94  it_tab-bankl ,
                112 it_tab-bankn ,
                132 it_tab-koinh ,
                194 it_tab-banka ,
                256 it_tab-provz ,
                260 sy-vline.
      endloop.
      uline 1(86).
    endform.                    " display_report
    *&      Form  header
          text
    -->  p1        text
    <--  p2        text
    form header .
      uline 1(86).
      format color col_heading.
      write :/1   sy-vline,
              2   'VEN.NO',
              12  'ACC' ,
              18  'TITLE' ,
              30  'NAME' ,
              55  'ST',
              58  'LAND' ,
              72  'L' ,
              76  'CUSTNO',
              88  'CKI',
              94  'BANKKEY',
              112 'B.NO',
              132 'ACC HOLDER NAME',
              194 'BANK NAME',
              256 'reg',
              260 sy-vline.
    endform.                    " header
    *&      Form  populate_bdc
          text
    form populate_bdc .
    loop at it_tab.
      perform build_screen_details using 'SAPMF02K' '0105'.
      perform build_fields using: 'BDC_OKCODE' '/00',
                                  'RF02K-LIFNR' it_tab-lifnr,
                                  'RF02K-KTOKK' it_tab-ktokk.
      perform build_screen_details using 'SAPMF02K'     '0110'.
      perform build_fields using:    'BDC_OKCODE' '/00',
                                   'LFA1-ANRED'  it_tab-anred,
                                   'LFA1-NAME1'  it_tab-name1,
                                   'LFA1-SORTL'  it_tab-sortl,
                                   'LFA1-LAND1'  it_tab-land1,
                                   'LFA1-SPRAS'  it_tab-spras.
      perform build_screen_details using 'SAPMF02K'     '0120'.
      perform build_fields using:    'BDC_OKCODE' '/00'.
      perform build_screen_details using 'SAPMF02K'     '0130'.
      perform build_fields using:    'BDC_OKCODE' '=BANK',
                                     'LFBK-BANKS(01)' it_tab-banks,
                                     'LFBK-BANKL(01)' it_tab-bankl,
                                     'LFBK-BANKN(01)' it_tab-bankn,
                                     'LFBK-KOINH(01)' it_tab-koinh.
      perform build_screen_details using 'SAPLBANK'     '0100'.
      perform build_fields using:    'BDC_OKCODE' '=ENTR',
                                     'BNKA-BANKA'     it_tab-banka,
                                     'BNKA-PROVZ'       it_tab-provz.
      perform build_screen_details using 'SAPMF02K'     '0130'.
      perform build_fields using:    'BDC_OKCODE' '=UPDA'.
    endloop.
      call transaction 'FK01' using it_bdctab mode 'A' update
      'S' messages into it_msgtab.
    clear it_bdctab.
    refresh it_bdctab.
    loop at it_msgtab.
    perform format_message.
    endloop.
    endform.                    " populate_bdc
    *&      Form  build_screen_details
          text
    form build_screen_details  using    p_program type BDCDATA-PROGRAM
                                        p_dynpro  type BDCDATA-dynpro.
      it_BDCtab-PROGRAM  = p_program.    " Program Name
      it_BDCtab-DYNPRO   = p_dynpro.     " Screen Number
      it_BDCtab-DYNBEGIN = 'X'.          " New screen
      Append it_bdctab.
      clear it_bdctab.
    endform.                    " build_screen_details
    *&      Form  build_fields
          text
    form build_fields  using    p_fnam
                                p_fval.
      it_BDCtab-FNAM     = p_fnam.
      it_BDCtab-FVAL     = p_fval.
      Append it_bdctab.
      clear  it_bdctab.
    endform.                    " build_fields
    *&      Form  format_message
          text
    -->  p1        text
    <--  p2        text
    form format_message .
    call function 'FORMAT_MESSAGE'
    EXPORTING
       ID              = SY-MSGID
       LANG            = sy-langu
       NO              = SY-MSGNO
       V1              = SY-MSGV1
       V2              = SY-MSGV2
       V3              = SY-MSGV3
       V4              = SY-MSGV4
    IMPORTING
       MSG             = it_msgtab
    EXCEPTIONS
       NOT_FOUND       = 1
       OTHERS          = 2
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    endform.                    " format_message
    *&      Form  bdc_upload1
          text
    -->  p1        text
    <--  p2        text
    form bdc_upload1 .
    data : v_file1 type string.
    v_file1 = p_file1.
    call function 'GUI_UPLOAD'
      exporting
        filename                      = v_file1
       FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      = it_tab1
    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.
    endform.                    " bdc_upload1
    *&      Form  f4_get_help1
          text
         -->P_P_FILE1  text
    form f4_get_help1  using    p_p_file1.
    call function 'F4_FILENAME'
    EXPORTING
       PROGRAM_NAME        = SYST-CPROG
       DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
    IMPORTING
       FILE_NAME           = p_p_file1
    endform.                    " f4_get_help1
    Regards,
    Laxmi

  • How to populate the Error stack during error records in field level routine

    hi,
    I am capturing the error records in Field level routine in transformation. now i want these records to reflect in error stack.
    i am using 'Append monitor-rec to MONITOR' at the moment but i cant see any records in error stack.
    but when i am using the same statement in start routine i am getting records in error stack.
    can anyone please help as to how can i populate error stack through field level routine?

    Hi,
    Try to do it in the end routine instead of the field routine.
    It should work.
    Regards,
    Joe

  • Error Record in report

    Hello ,
    I have a issue on Report that is Developed on a Multiprovider .
    Problem : There is a report on multiprovider . Multiprovider consist of DSO and Infocube .
    Before Changes : There is a error record in the CRM tables which is fetched by Infopackage . record was like "Number"
                                  The quotes needs to be removed . Through DTP (FULL) data supplied to DSO .
    After Changes : The Error records get corrected .Now till PSA record is fine .DTP is FULL to DSO .
    But when i am reporting on that Multiprovider that error record is still there in the report and corrected record is also there .
    Please help.
    Thanks ,
    Rahul

    Hi Rahul,
    Did you delete your earlier request (the one containing the error record) from the PSA before executing the DTP?
    You can follow the below steps now to correct your data ->
    1. Delete all data from DSO.
    2. Check the PSA, delete all other requests except the latest one.
    3. Load data from PSA to DSO by DTP.
    Hope this helps!
    Regards,
    Saurabh

Maybe you are looking for

  • TS5419 Unable to make FaceTime calls.

    I have Iphone 5 and am unable to connect to FaceTime calls whether on wifi or not.. I have friends try to call me and it just says connecting.... for two minutes and then the call drops..

  • RMAN Active database

    Hi, Suppose i took the full database RMAN backup on same host and i invoked rman "active database" command. So will it make use of existing backup pieces?

  • Country chart of account to comp code

    hi experts pls tell me wher we can assign country chart of account to comp code..pl thanks Hima

  • Which printer profile do I use?

    I have a Epson Stylus Photo R360 printer connected to a Intel Mac running OSX 10.6 Snow Leopard.  I am currently using Adobe Lightroom 3 as my main image browser and would like to know what the correct profile is to use to gain desirable prints when

  • Unable to update blackberry id account information while offline

    I have BB 9900. I have registered for a Blackberry ID. I have registered on Blackberry World. I can download apps to my phone when my phone is connected to the computer. When I try to enter by Blackberry ID on my phone I get the message : Unable to u