Error record

Hi,
Consider that i have 1000 records in flat file. In that the 501th record is error record.
Then how will the updation happens in session method and call transaction method? What happens to the record from 502 - 1000. And what will happen to the 501 th record?
What will happen in the case of LSMW?
Thanks.

501 is not updated and 502 onward updated.
in short except error everything is updated.
Now if u have choosen the keep batch , then find the error records and correct them and run the same batch with corrected records,
it shows in log now.
for posted .. already posted and those which are error are now posted.
if you dont press the keep batch option before uploading
then  do this,
take only error records in ur flat file.
create a new session and run this batch.
The case is not differ in case of LSMW and BDC session method are same.
reward if useful
Amit Singla

Similar Messages

  • 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

  • Issue regarding bdc for capturing error records

    Hi All,
            My requirement is to capture the error record and download the error record to a flat file .
    I have done recording for MM01 transaction .
    I am getting a problem like no error records are downloaded into the flat file .It is downloading only the empty records.
    Pls see the below code which i developed & modify it for any changes .Its an urgent .Pls provide me the solution ASAP.
    My Flat file
    M     FERT     X     MATL105     KG     
    X     FERT     X     MATL106     KG
    In the above flat file 'X' is an Industry sector which doesnot exists which is an error record that has to be captured and download it into the flat file .
    Source code :
    report Z_MM01_MSG_F MESSAGE-ID MSG1
           no standard page heading line-size 255.
    include bdcrecx1.
    parameters: dataset(132) lower case.
    ***    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: MBRSH
            MBRSH_001(001),
    * data element: MTART
            MTART_002(004),
    * data element: XFELD
            KZSEL_01_003(001),
    * data element: MAKTX
            MAKTX_004(040),
    * data element: MEINS
            MEINS_005(003),
    * data element: MTPOS_MARA
            MTPOS_MARA_006(004),
          end of record.
    *DECLARATION OF BDCDATA STRUCTURE
    DATA: IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE .
    *declaration to store the message
    DATA: IT_MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE .
    *DECLARATION TO STORE THE MESSAGE
    DATA: BEGIN OF IT_STORE_MSG OCCURS 0,
          STORE(1000),
          END OF IT_STORE_MSG.
    *declaration SUCCESS MESG
    DATA: BEGIN OF IT_SUCCESS OCCURS 0,
          SUCCESS_REC(10),
          MBRSH(10),
          TABIX LIKE SY-TABIX,
          END OF IT_SUCCESS.
    *declaration ERROR MESSAGE
    DATA: BEGIN OF IT_ERROR  OCCURS  0,
          ERROR_REC(10),
          MBRSH(10),
             TABIX LIKE SY-TABIX,
          END OF IT_ERROR.
    DATA:TABIX LIKE SY-TABIX.
    *validating Material type(mtart) field data with table T134
    data : v_type like T134-mtart.
    DATA: V_INDSECT LIKE MARA-MBRSH.
    *** End generated data section ***
    start-of-selection.
    CALL FUNCTION 'UPLOAD'
    * EXPORTING
    *   CODEPAGE                      = ' '
    *   FILENAME                      = ' '
    *   FILETYPE                      = ' '
    *   ITEM                          = ' '
    *   FILEMASK_MASK                 = ' '
    *   FILEMASK_TEXT                 = ' '
    *   FILETYPE_NO_CHANGE            = ' '
    *   FILEMASK_ALL                  = ' '
    *   FILETYPE_NO_SHOW              = ' '
    *   LINE_EXIT                     = ' '
    *   USER_FORM                     = ' '
    *   USER_PROG                     = ' '
    *   SILENT                        = 'S'
    * IMPORTING
    *   FILESIZE                      =
    *   CANCEL                        =
    *   ACT_FILENAME                  =
    *   ACT_FILETYPE                  =
      TABLES
        data_tab                      = record
    * EXCEPTIONS
    *   CONVERSION_ERROR              = 1
    *   INVALID_TABLE_WIDTH           = 2
    *   INVALID_TYPE                  = 3
    *   NO_BATCH                      = 4
    *   UNKNOWN_ERROR                 = 5
    *   GUI_REFUSE_FILETRANSFER       = 6
    *   OTHERS                        = 7
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *perform open_dataset using dataset.
    perform open_group.
    LOOP AT RECORD.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    *- Validating industry sector(MBRSH) from the master table(MARA)
    select single MBRSH from T137  into V_INDSECT where MBRSH eq
    record-MBRSH_001.
    IF SY-SUBRC EQ 0.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  record-MBRSH_001.
    *endif.
    perform bdc_field       using 'RMMG1-MTART'
                                  record-MTART_002.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  record-KZSEL_01_003.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-MAKTX_004.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-MEINS_005.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                  record-MTPOS_MARA_006.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_transaction using 'MM01'.
    *ELSE.
    *message  E000 WITH 'Industry sector does not Exist' .
    *endif.
    LOOP AT MESSTAB.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
       ID              = MESSTAB-MSGID
       LANG            = MESSTAB-MSGSPRA
       NO              = MESSTAB-MSGNR
       V1              = MESSTAB-MSGV1
       V2              = MESSTAB-MSGV2
    *   V3              = SY-MSGV3
    *   V4              = SY-MSGV4
    IMPORTING
       MSG             = IT_STORE_MSG-STORE
       EXCEPTIONS
    *   NOT_FOUND       = 1
       OTHERS          = 0.
    IF MESSTAB-MSGTYP = 'S'.
       IT_SUCCESS-SUCCESS_REC = IT_STORE_MSG-STORE.
       IT_SUCCESS-MBRSH = record-MBRSH_001.
       IT_SUCCESS-TABIX = TABIX.
       APPEND IT_SUCCESS.
       ELSEIF  MESSTAB-MSGTYP = 'E'.
       IT_ERROR-ERROR_REC = IT_STORE_MSG-STORE.
       IT_ERROR-MBRSH = record-MBRSH_001.
       IT_ERROR-TABIX = TABIX.
      APPEND IT_ERROR.
    ENDIF.
    endloop.
    endif.
    ENDLOOP.
    CALL FUNCTION 'DOWNLOAD'
      TABLES
        DATA_TAB                      = IT_error
    *   FIELDNAMES                    =
    * EXCEPTIONS
    *   INVALID_FILESIZE              = 1
    *   INVALID_TABLE_WIDTH           = 2
    *   INVALID_TYPE                  = 3
    *   NO_BATCH                      = 4
    *   UNKNOWN_ERROR                 = 5
    *   GUI_REFUSE_FILETRANSFER       = 6
    *   OTHERS                        = 7
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    perform close_group.
    *perform close_dataset using dataset.
    Code Formatted by: Alvaro Tejada Galindo on Apr 9, 2008 5:05 PM

    Hi,
    DATA: IT_MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE .
    CALL FUNCTION 'DOWNLOAD'
    TABLES
    DATA_TAB = IT_error
    FIELDNAMES =
    EXCEPTIONS
    INVALID_FILESIZE = 1
    INVALID_TABLE_WIDTH = 2
    INVALID_TYPE = 3
    NO_BATCH = 4
    UNKNOWN_ERROR = 5
    GUI_REFUSE_FILETRANSFER = 6
    OTHERS = 7.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    instead of using IT_error ion tables use IT_MESSTAB.
    <REMOVED BY MODERATOR>
    Code Formatted by: Alvaro Tejada Galindo on Apr 9, 2008 5:07 PM

  • Hi All,Issue regarding bdc for capturing error records,its urgent

    Hi All,
            My requirement is to capture the error record and download the error record to a flat file .
    I have done recording for MM01 transaction .
    I am getting a problem like no error records are downloaded into the flat file .It is downloading only the empty records.
    Pls see the below code which i developed & modify it for any changes .Its an urgent .Pls provide me the solution ASAP.
    My Flat file
    M     FERT     X     MATL105     KG     
    X     FERT     X     MATL106     KG
    In the above flat file 'X' is an Industry sector which doesnot exists which is an error record that has to be captured and download it into the flat file .
    Source code :
    report Z_MM01_MSG_F MESSAGE-ID MSG1
           no standard page heading line-size 255.
    include bdcrecx1.
    parameters: dataset(132) lower case.
       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: MBRSH
            MBRSH_001(001),
    data element: MTART
            MTART_002(004),
    data element: XFELD
            KZSEL_01_003(001),
    data element: MAKTX
            MAKTX_004(040),
    data element: MEINS
            MEINS_005(003),
    data element: MTPOS_MARA
            MTPOS_MARA_006(004),
          end of record.
    *DECLARATION OF BDCDATA STRUCTURE
    DATA: IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE .
    *declaration to store the message
    DATA: IT_MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE .
    *DECLARATION TO STORE THE MESSAGE
    DATA: BEGIN OF IT_STORE_MSG OCCURS 0,
          STORE(1000),
          END OF IT_STORE_MSG.
    *declaration SUCCESS MESG
    DATA: BEGIN OF IT_SUCCESS OCCURS 0,
          SUCCESS_REC(10),
          MBRSH(10),
          TABIX LIKE SY-TABIX,
          END OF IT_SUCCESS.
    *declaration ERROR MESSAGE
    DATA: BEGIN OF IT_ERROR  OCCURS  0,
          ERROR_REC(10),
          MBRSH(10),
             TABIX LIKE SY-TABIX,
          END OF IT_ERROR.
    DATA:TABIX LIKE SY-TABIX.
    *validating Material type(mtart) field data with table T134
    data : v_type like T134-mtart.
    DATA: V_INDSECT LIKE MARA-MBRSH.
    End generated data section ***
    start-of-selection.
    CALL FUNCTION 'UPLOAD'
    EXPORTING
      CODEPAGE                      = ' '
      FILENAME                      = ' '
      FILETYPE                      = ' '
      ITEM                          = ' '
      FILEMASK_MASK                 = ' '
      FILEMASK_TEXT                 = ' '
      FILETYPE_NO_CHANGE            = ' '
      FILEMASK_ALL                  = ' '
      FILETYPE_NO_SHOW              = ' '
      LINE_EXIT                     = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      SILENT                        = 'S'
    IMPORTING
      FILESIZE                      =
      CANCEL                        =
      ACT_FILENAME                  =
      ACT_FILETYPE                  =
      TABLES
        data_tab                      = record
    EXCEPTIONS
      CONVERSION_ERROR              = 1
      INVALID_TABLE_WIDTH           = 2
      INVALID_TYPE                  = 3
      NO_BATCH                      = 4
      UNKNOWN_ERROR                 = 5
      GUI_REFUSE_FILETRANSFER       = 6
      OTHERS                        = 7
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *perform open_dataset using dataset.
    perform open_group.
    LOOP AT RECORD.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    *- Validating industry sector(MBRSH) from the master table(MARA)
    select single MBRSH from T137  into V_INDSECT where MBRSH eq
    record-MBRSH_001.
    IF SY-SUBRC EQ 0.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  record-MBRSH_001.
    *endif.
    perform bdc_field       using 'RMMG1-MTART'
                                  record-MTART_002.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  record-KZSEL_01_003.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-MAKTX_004.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-MEINS_005.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                  record-MTPOS_MARA_006.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_transaction using 'MM01'.
    *ELSE.
    *message  E000 WITH 'Industry sector does not Exist' .
    *endif.
    LOOP AT MESSTAB.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
       ID              = MESSTAB-MSGID
       LANG            = MESSTAB-MSGSPRA
       NO              = MESSTAB-MSGNR
       V1              = MESSTAB-MSGV1
       V2              = MESSTAB-MSGV2
      V3              = SY-MSGV3
      V4              = SY-MSGV4
    IMPORTING
       MSG             = IT_STORE_MSG-STORE
       EXCEPTIONS
      NOT_FOUND       = 1
       OTHERS          = 0.
    IF MESSTAB-MSGTYP = 'S'.
       IT_SUCCESS-SUCCESS_REC = IT_STORE_MSG-STORE.
       IT_SUCCESS-MBRSH = record-MBRSH_001.
       IT_SUCCESS-TABIX = TABIX.
       APPEND IT_SUCCESS.
       ELSEIF  MESSTAB-MSGTYP = 'E'.
       IT_ERROR-ERROR_REC = IT_STORE_MSG-STORE.
       IT_ERROR-MBRSH = record-MBRSH_001.
       IT_ERROR-TABIX = TABIX.
      APPEND IT_ERROR.
    ENDIF.
    endloop.
    endif.
    ENDLOOP.
    CALL FUNCTION 'DOWNLOAD'
      TABLES
        DATA_TAB                      = IT_error
      FIELDNAMES                    =
    EXCEPTIONS
      INVALID_FILESIZE              = 1
      INVALID_TABLE_WIDTH           = 2
      INVALID_TYPE                  = 3
      NO_BATCH                      = 4
      UNKNOWN_ERROR                 = 5
      GUI_REFUSE_FILETRANSFER       = 6
      OTHERS                        = 7
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    perform close_group.
    *perform close_dataset using dataset.

    Hi,
    DATA: IT_MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE .
    CALL FUNCTION 'DOWNLOAD'
    TABLES
    DATA_TAB = IT_error
    FIELDNAMES =
    EXCEPTIONS
    INVALID_FILESIZE = 1
    INVALID_TABLE_WIDTH = 2
    INVALID_TYPE = 3
    NO_BATCH = 4
    UNKNOWN_ERROR = 5
    GUI_REFUSE_FILETRANSFER = 6
    OTHERS = 7.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    instead of using IT_error ion tables use IT_MESSTAB.
    <REMOVED BY MODERATOR>
    Code Formatted by: Alvaro Tejada Galindo on Apr 9, 2008 5:07 PM

  • 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

  • Editing error records in PSA

    Hi All,
    While loading data from R/3 datasource to PSA in BI side, the data load got failed due to invalid character present in the data.
    When i tried to edit that error record in PSA i found that the entire datapackage containing the error record is skipped from updating into PSA. So i'm unable to edit that error record in PSA.
    Is there any setting that needs to be done so that error records gets updated in PSA, so that we can edit it at PSA level and load further to datatargets.
    Thanks in advance.

    Hi,
    If PSA contain data records and if the records present in PSA contain invalid characters then the error would pop out.
    But in your case you say that the error records are not visible in the PSA but you face the error!!!!
    Check in the status and detail tabs in the infopackage maintenance screen to confirm the exact error that you face.
    Please check the data present in your PSA via table. The table name of PSA starts with /BIC/B000*.
    There is a possibility of the data present in the PSA could have got archived too.
    Regards,
    Lakshminarasimhan.N

  • 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.

  • Workflow condition to check error records in a multi line container element

    Hi All,
    My requirement is to change a standard workflow in which below condtion is checked and subsequent action is taken.
    The condtion checks a return internal table contains a row or not. Now the problem is for success and Information messages
    also the return table contains entries and the condition is becoming true. Subsequently workflow follows error recovery steps when there is no error.
    SAP suggests a note with manual corrections and mentions to change the condition to check whether error records are there. So can we enhance the condition &return& NX to something that it checks error records. I dont want to create a new step and go to business object method to delete non error records.
    Please let me know if this condition can be enhanced.
    Thanks in Advance.
    Aleem Mohiuddin.

    Dear Aleem,
    As this is sap standard workflow, should report this error and wait for feed back. Or add a loop step before of this check any E messages inside, if yes put a errflg as x other wise keep as blank.
    Best of luck.
    Regards,
    Ranjith

  • In call transaction how can we handle error records.

    hai..tellme how can we handle error records in call transaction..we can get error records into one flatfile ok...then we have to execute the same bdc program with dat flat file (error records) once again...is it wright ..

    Hi,
    check this program u will get idea
    seee this prog. its will help u .
    copy and run this prog.
    TYPES : BEGIN OF t_disp ,
    vendorno(9),
    compcc(13),
    purchorg(14),
    accgroup(15),
    title(7),
    name(5),
    country(8),
    ordcurr(14),
    END OF t_disp.
    TYPES : BEGIN OF t_err,
    msgtyp LIKE bdcmsgcoll-msgtyp,
    l_mstring(250),
    END OF t_err.
    DATA: i_disp TYPE STANDARD TABLE OF t_disp,
    wa_disp TYPE t_disp,
    i_err TYPE STANDARD TABLE OF t_err,
    wa_err TYPE t_err.
    data definition
    Batchinputdata of single transaction
    DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    messages of call transaction
    DATA: messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    error session opened (' ' or 'X')
    DATA: e_group_opened.
    message texts
    TABLES: t100.
    PARAMETER : p_file1 LIKE ibipparms-path,
    p_cmode LIKE ctu_params-dismode DEFAULT 'N'.
    "A: show all dynpros
    "E: show dynpro on error only
    "N: do not display dynpro
    *selction screen.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    program_name = syst-cprog
    dynpro_number = syst-dynnr
    IMPORTING
    file_name = p_file1.
    AT SELECTION-SCREEN ON p_file1.
    IF p_file1 IS INITIAL.
    MESSAGE 'FILE IS NOT FOUND' TYPE 'E'.
    ENDIF.
    START-OF-SELECTION.
    PERFORM f_disp_file1.
    END-OF-SELECTION.
    PERFORM f_disp_errs.
    *& Form F_DISP_FILE1
    text
    --> p1 text
    <-- p2 text
    FORM f_disp_file1 .
    DATA: l_filename1 TYPE string.
    MOVE p_file1 TO l_filename1.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = l_filename1
    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 = i_disp
    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.
    *? prepare BDC data
    DELETE i_disp INDEX 1.
    LOOP AT i_disp INTO wa_disp .
    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'
    wa_disp-vendorno.
    'ztest_1'.
    PERFORM bdc_field USING 'RF02K-BUKRS'
    wa_disp-compcc.
    '0001'.
    PERFORM bdc_field USING 'RF02K-EKORG'
    wa_disp-purchorg.
    '0001'.
    PERFORM bdc_field USING 'RF02K-KTOKK'
    wa_disp-accgroup.
    '0001'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFA1-SPRAS'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=VW'.
    PERFORM bdc_field USING 'LFA1-ANRED'
    wa_disp-title.
    'Mr.'.
    PERFORM bdc_field USING 'LFA1-NAME1'
    wa_disp-name.
    'test name'.
    PERFORM bdc_field USING 'LFA1-SORTL'
    'TEST NAME'.
    PERFORM bdc_field USING 'LFA1-LAND1'
    wa_disp-country.
    'in'.
    PERFORM bdc_field USING 'LFA1-SPRAS'
    'en'.
    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-BANKS(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=VW'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0210'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB1-AKONT'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=VW'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0215'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB1-ZTERM'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=VW'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0220'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB5-MAHNA'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=VW'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0310'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFM1-WAERS'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=UPDA'.
    PERFORM bdc_field USING 'LFM1-WAERS'
    wa_disp-ordcurr.
    'inr'.
    PERFORM bdc_transaction USING 'XK01'.
    WRITE:/ WA_DISP-VendorNo,
    WA_DISP-COMPCC,
    WA_DISP-PURCHORG,
    WA_DISP-ACCGROUP,
    WA_DISP-title,
    WA_DISP-name,
    WA_DISP-country,
    WA_DISP-ORDCURR.
    CLEAR: wa_disp.
    REFRESH bdcdata.
    ENDLOOP.
    ENDFORM. " F_DISP_FILE1
    Start new screen *
    FORM bdc_dynpro USING program dynpro.
    CLEAR bdcdata.
    bdcdata-program = program.
    bdcdata-dynpro = dynpro.
    bdcdata-dynbegin = 'X'.
    APPEND bdcdata.
    ENDFORM. "BDC_DYNPRO
    Insert field *
    FORM bdc_field USING fnam fval.
    IF FVAL NODATA.
    CLEAR bdcdata.
    bdcdata-fnam = fnam.
    bdcdata-fval = fval.
    APPEND bdcdata.
    ENDIF.
    ENDFORM. "BDC_FIELD
    *& Form bdc_transaction
    text
    -->P_0322 text
    FORM bdc_transaction USING tcode.
    DATA: l_mstring(480),
    l_subrc LIKE sy-subrc.
    REFRESH messtab.
    CALL TRANSACTION tcode USING bdcdata
    MODE p_cmode
    UPDATE 'L'
    MESSAGES INTO messtab.
    l_subrc = sy-subrc.
    IF SMALLLOG 'X'.
    WRITE: / 'CALL_TRANSACTION',
    TCODE,
    'returncode:'(I05),
    L_SUBRC,
    'RECORD:',
    SY-INDEX.
    LOOP AT messtab.
    SELECT SINGLE * FROM t100 WHERE sprsl = messtab-msgspra
    AND arbgb = messtab-msgid
    AND msgnr = messtab-msgnr.
    IF sy-subrc = 0.
    l_mstring = t100-text.
    IF l_mstring CS '&1'.
    REPLACE '&1' WITH messtab-msgv1 INTO l_mstring.
    REPLACE '&2' WITH messtab-msgv2 INTO l_mstring.
    REPLACE '&3' WITH messtab-msgv3 INTO l_mstring.
    REPLACE '&4' WITH messtab-msgv4 INTO l_mstring.
    ELSE.
    REPLACE '&' WITH messtab-msgv1 INTO l_mstring.
    REPLACE '&' WITH messtab-msgv2 INTO l_mstring.
    REPLACE '&' WITH messtab-msgv3 INTO l_mstring.
    REPLACE '&' WITH messtab-msgv4 INTO l_mstring.
    ENDIF.
    CONDENSE l_mstring.
    WRITE: / messtab-msgtyp, l_mstring(250).
    *? Send this errors to err internal table
    wa_err-msgtyp = messtab-msgtyp.
    wa_err-l_mstring = l_mstring.
    APPEND wa_err TO i_err.
    ELSE.
    WRITE: / messtab.
    ENDIF.
    CLEAR: messtab, wa_err.
    ENDLOOP.
    SKIP.
    ENDIF.
    ENDFORM. " bdc_transaction
    *& Form f_disp_errs
    text
    --> p1 text
    <-- p2 text
    FORM f_disp_errs .
    SORT i_err BY msgtyp.
    LOOP AT i_err INTO wa_err.
    AT FIRST.
    WRITE : / text-002.
    ULINE.
    ENDAT.
    AT NEW msgtyp.
    IF wa_err-msgtyp = 'S'.
    WRITE : / text-003.
    ULINE.
    ELSEIF wa_err-msgtyp = 'E'.
    WRITE : / text-001.
    ULINE.
    ENDIF.
    ENDAT.
    WRITE : / wa_err-msgtyp, wa_err-l_mstring.
    CLEAR wa_err.
    ENDLOOP.
    ENDFORM. " f_disp_errs
    Regards

  • How to show Session Error Records to End Users

    Hi all,
    I had to populate data using SESSION Method...
    I have 1000 records, out of which 750 records where updated correctly but i got 250 error records in it.
    i know that error records are stored in Error log/ INCORRECT SESSION in SM35.
    Now i want to modify these errounous records and repopulate them.
    Questions.
    1) We click on ANALYSE in SM35 to determine which sreen and value produced the error. if we have small data we can correct them interactively there only. But for 250 records how we have to correct them and upload 250 errors records.
    2) Can we download those error records into a flatfile.
    3) Is there any other method to handle such situation.
    Regards
    Surendar

    Vijay,
    I got your piece of code.... Its looking really good.
    Here my point is once that first validation is done i am doing exit. That means total  process stopped and cotrol comes out of the program. so how can this
    IF W_FLAG_ERROR = X. DISPLAY THE ERROR MESSAGE to the user
    will be executed ...............
    and
    bu writing it on the report list or just do LEAVE-LIST PROCESSING and come back to the selection screen. ESLE. CONTINUE PROCESSING ENDIF.
    I didn't fallow what u said here can u explain bit clearly plzzzzzz
    Nisha....

  • 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.

  • Ignoring Error Records

    Hi all,
    I have a scenario like this
    If i have 100 records in the file then in the idoc there will be 100 data segments to be created.
    if say 5 records were error then i need to create an idoc with 95 data segments. and ignore the 5 error  records.
    how can we do this?
    Actually,
    As soon as the file is picked by XI, it does a lookup in the XI itself
    I have a lookup table with the fields
    CodeDomain Group
    Code DomainID
    ORIGID
    DESTID
    CURRVALUE
    MAPPED VALUE
    if the file doesnot contain a CURRVALUE then those records needs to be ignored and proceed processing the other subsequent records.
    Please advice.
    Thanks in advance..
    Regards,
    Kumar

    Hey Kumar,
    It is very simple. you can do it very easly.
    In you mapping, just validate the parent node of surce before mapping to the parent node of target (i.e.<b>IDOC</b>).
    Say your source parent name is <b>ROOT</b> or <b>Records</b>, now as per your requirement do like this.
    Use <b>IF without Else</b> function
    <b>CURRVALUE -
    > EQUALS ---> SPACE ---> NOT -
    > IF, THEN ---> ROOT ---> IDOC</b>
    By doing this, it will create the IDOC only for those records which will be having a value in CURRVALUE field.
    Regards,
    Sarvesh

  • 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

  • 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

  • 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

  • Non error records in error stack

    Hi,
    I have some error records collected in errorstack I know how to correct and update these error records.
    But the problem is there are several other records collected in error stack giving the message filtered in advance as the key is same as error records.
    Now my question is why is this happening?
    regards,
    preethi.

    Hi Preethi,
    This is happening because of the semantic key. The semantic key will be defined in the DTP.
    If any records are having the same semantic key as the error records, these records will also be collected in the error stack with out actually checking data.
    Regards,
    Srinath.

Maybe you are looking for

  • "Can't read or write to disk" error message

    hi... got my husband a 16g nano and i'm trying to sync his songs. i have the newest version of itunes installed. it put almost half of the songs on the nano and all of a sudden itunes has an error that says something about "can't write to nano. disk

  • Error when calling BAPI from web dynpro

    Hi, I have a program that calls a BAPI to retrieve data. The problem is that i have the following error message: com.sap.dictionary.runtime.DdException: 'WD_RFC_LOADBL_META' not properly defined! Unable to create Metadata connection for Dictionary Pr

  • Data import

    I am trying to import a set of data from Sql server to my ODB and I'm getting this error could anyone help or maybe direct me to the right path. Because i know I have data in the the fold I'm importing to my ODB Validation Error Examine and correct t

  • What's the difference between K7N2s . . .

    What's the difference between the delta series K7N2-L and "regular" K7N2-L (both are model 6570). Is it fsb support? And then there is the K7N2G and K7N2GM-L. And then there is the ILSR extension. Curious as to what the differences between all the K7

  • /usr/openwin/lib/libp missing

    Hi - Used to compile a program which uses /usr/openwin//lib/libp/xxxx.a successfully under Solaris 8 with Forte Dev 6. Now when I tried the same under Solaris with Sun Studio 10, error is generated as there is no libp directory. I checked and there i