Capture error records

Hi All,
I have requirement like ,after executing any package/procedure/function if the status is Invalid/inprogress that data should be stored in some other table.
so I have created a table called Status table
create table Stat
( sno number,status varchar2(20))have written the following procedure
create or replace procedure check_status
as
cursor c1 is
  select * from emp;
  rec c1%rowtype;
Begin
Open C1;
   Loop
     fetch c1 into rec;
      if rec.status='INVALID' or rec.status='Inprogress' then
       insert into stat(sno,status) values(stat_seq.nextval,rec.status);  -- created a sequence for this as well
       end if;
    end loop;
  close C1;
End check_status;Emp table is having 3 "Invalid" and 7 "Inprogress" records. so the STAT table should contain only the records having Invalid and In progress records.
but here am facing the problem like Procedure compiled successfully. if am giving the query select * from STAT; it's containing "0" records. it's not showing Invalid and Inprogress records. so could you please look into the code and let me know where do I need to make the changes to retrieve the Invalid and Inprogress records.
Thanks.

As you suggested I mentioned the given Insert statement then compiled the query. It compiled successfully.
but it is giving the o/p as
all rows having status as "INVALID" because in the EMP table I have 10 records with "INVALID" status. total table is having 1000 records. after executing the procedure the whole STAT table is giving the O/P as 1000 records are in "INVALID" status instead of 10 records.
Briefly:
1. Table is having 1000 records in EMP table
2. in this 10 records are having status "INVALID"
3.Created temporary table called STAT having columns SNO,STATUS
4. Now my requirement is once compiled the procedure the STAT table should contain 10 records which are having "INVALID" status.
5. but here my concern is whole 1000 records are updating with INVALID after executing the Procedure.
Please have a look and let me know where can I do the modifications.
Thanks.

Similar Messages

  • How to capture errors records in flat file in BDC

    hi ,
        i would like to know how to capture error records while  uploading a flat file to screen through BDC .
    appreciatable solutions are rewarded.
    thanks,
    shan

    Hi shan,
    write this code, it will solve your problem.
    DATA : BDCTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    DATA : I_MSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF I_ERR OCCURS 0,
              MATNR(18),
              FLAG(1),
              MSG(100),
           END OF I_ERR.
    DATA :V_LINES TYPE I.
    LOOP AT ITAB.
    REFRESH BDCTAB.
    PERFORM SCREEN USING: 'SAPLMGMM' '0060'.
    PERFORM FIELD USING: 'RMMG1-MATNR'  ITAB-MATNR,
                          'RMMG1-MBRSH' ITAB-MBRSH ,
                          'RMMG1-MTART' ITAB-MTART,
                          'BDC_OKCODE' '/00'.
    PERFORM SCREEN USING: 'SAPLMGMM' '0070'.
    PERFORM FIELD USING: 'MSICHTAUSW-KZSEL(01)' 'X' ,
                         'MSICHTAUSW-KZSEL(02)' 'X' ,
                         'MSICHTAUSW-KZSEL(09)' 'X' ,
                         'BDC_OKCODE' '=ENTR'.
    PERFORM SCREEN USING: 'SAPLMGMM' '0080'.
    PERFORM FIELD USING: 'RMMG1-WERKS' ITAB-WERKS,
                         'BDC_OKCODE' '=ENTR'.
    PERFORM SCREEN USING: 'SAPLMGMM' '4004'.
    PERFORM FIELD USING:  'MAKT-MAKTX' ITAB-MAKTX,
                          'MARA-MEINS' 'EA' ,
                          'MARA-MATKL' '001',
                          'BDC_OKCODE' '/00'.
    PERFORM SCREEN USING: 'SAPLMGMM' '4004'.
    PERFORM FIELD USING:  'BDC_OKCODE' '/00'.
    PERFORM SCREEN USING: 'SAPLMGMM' '4000'.
    PERFORM FIELD USING:  'MAKT-MAKTX' ITAB-MAKTX,
                          'MARA-MEINS' 'EA',
                          'MARC-EKGRP' '001',
                          'MARA-MATKL' '001',
                          'BDC_OKCODE' '=BU'.
    CALL TRANSACTION 'MM01' USING BDCTAB
                            MODE 'A'
                            MESSAGES INTO I_MSG.
    FINDING LAST MESSAGE IN THE I_MSG TABLE*****
    DESCRIBE TABLE I_MSG LINES V_LINES.
    ACCORDING TO THE V_LINES NUMBER TABLE WILL BE READ****
    READ TABLE I_MSG INDEX V_LINES.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
       ID              = I_MSG-MSGID
       LANG            = '-D'
       NO              = I_MSG-MSGNR
       V1              = I_MSG-MSGV1
       V2              = I_MSG-MSGV2
       V3              = I_MSG-MSGV3
       V4              = I_MSG-MSGV4
    IMPORTING
       MSG             = I_ERR-MSG
    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.
    IF I_MSG-MSGID EQ 'M3' AND I_MSG-MSGNR EQ '800'.
    I_ERR-FLAG = 'S'.
    ELSE.
    I_ERR-FLAG = 'E'.
    ENDIF.
    I_ERR-MATNR = ITAB-MATNR.
    APPEND I_ERR.
    CLEAR I_ERR.
    ENDLOOP.
    WRITE:/ 'SUCCESS RECORDS' COLOR COL_POSITIVE.
    SKIP.
    WRITE:/ 'MATERIAL' COLOR COL_HEADING, 20 'MESSAGE' COLOR COL_HEADING.
    LOOP AT I_ERR WHERE FLAG EQ 'S'.
    WRITE:/ I_ERR-MATNR, 20 I_ERR-MSG.
    ENDLOOP.
    SKIP 2.
    WRITE:/ 'ERROR RECORDS' COLOR COL_NEGATIVE.
    SKIP.
    WRITE:/ 'MATERIAL' COLOR COL_HEADING, 20 'MESSAGE' COLOR COL_HEADING.
    LOOP AT I_ERR WHERE FLAG EQ 'E'.
    WRITE:/ I_ERR-MATNR, 20 I_ERR-MSG.
    ENDLOOP.
    *&      Form  SCREEN
         SCREEN
    form SCREEN  using P_PROG P_SCREEN.
    BDCTAB-PROGRAM = P_PROG.
    BDCTAB-DYNPRO = P_SCREEN.
    BDCTAB-DYNBEGIN = 'X'.
    APPEND BDCTAB.
    CLEAR  BDCTAB.
    endform.                    " SCREEN
    *&      Form  FIELD
       FIELD
    form FIELD  using  FNAME FVAL .
    BDCTAB-FNAM = FNAME.
    BDCTAB-FVAL = FVAL.
    APPEND BDCTAB.
    CLEAR BDCTAB.
    endform.                    " FIELD
    Thanks,
    Murali

  • Capturing error records and messages in BDC ?

    Hi Experts,
    I am recording a infotype using BDC recording and I got successfull updation in recording.But I  dont want the output message generated by BDC recording which is obtained by perform bdc_transaction using 'pa30' generated by recording.
    I want to capture the success pernr values and its correponding messages in a seperate internal table.Then want to capture error pernr values and its messages in a seperate internal table.
    Give me sample coding to fetch those values. Think that my internal table which contains pernr values for recording is int_0007.from this internal table I am recording values.Give me coding to collect success anf error pernr values and its messges in seperate internal table.
    Thanks,
    Sakthi.C
    *Assure points for valuable answers*
    Message was edited by:
            Sakthi Saravanan C

    DATA : BEGIN OF T_UPLOAD OCCURS 0,
             MATNR LIKE MARA-MATNR,
             MAKTX LIKE MAKT-MAKTX,
             PLANT LIKE RMMG1-WERKS,
           END OF T_UPLOAD.
    DATA : BEGIN OF T_DOWNLOAD OCCURS 0,
             MATNR LIKE MARA-MATNR,
             MAKTX LIKE MAKT-MAKTX,
             PLANT LIKE RMMG1-WERKS,
             MSG(200),
           END OF T_DOWNLOAD.
    DATA :  T_BDCMSGCOLL TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE.
    DATA :  WA_BDCMSGCOLL TYPE BDCMSGCOLL.
    DATA : ERR_LOG TYPE MESSAGE.
    Set the parameters for Call Transaction
      CLEAR WA_CTU_PARAMS.
      WA_CTU_PARAMS-DISMODE = 'N'.
      WA_CTU_PARAMS-UPDMODE = 'S'.
      WA_CTU_PARAMS-NOBINPT = 'X'.
      WA_CTU_PARAMS-NOBIEND = 'X'.
      WA_CTU_PARAMS-DEFSIZE = 'X'.
    Call Transaction MM01
      IF W_FLAG NE 'X'.
        <b>CALL TRANSACTION 'MM01' USING T_BDCDATA OPTIONS FROM WA_CTU_PARAMS
                                                 MESSAGES INTO T_BDCMSGCOLL.
        COMMIT WORK AND WAIT.</b>
        DESCRIBE TABLE T_BDCMSGCOLL LINES N.
        IF N <> 0.
          LOOP AT T_BDCMSGCOLL INTO WA_BDCMSGCOLL.
            CLEAR ERR_LOG.
            W_MSGNO = WA_BDCMSGCOLL-MSGNR.
            CALL FUNCTION <b>'WRITE_MESSAGE'</b>          EXPORTING
                MSGID = WA_BDCMSGCOLL-MSGID
                MSGNO = W_MSGNO
                MSGTY = WA_BDCMSGCOLL-MSGTYP
              IMPORTING
                MESSG = ERR_LOG.
    Error that occurs during transactoon
            IF ERR_LOG-MSGTY = 'E'.
              MOVE-CORRESPONDING T_UPLOAD TO  T_DOWNLOAD.
              MOVE ERR_LOG-MSGTX TO  T_DOWNLOAD-MSG.
              APPEND T_DOWNLOAD.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    regards
    vinod

  • 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

  • "Recording Error: Recorder Captured No Frames"

    Hi all,
    I'm very frustrated right now because I'm not sure what I'm doing wrong. :(
    I have a Canon HV20.
    I have it connected to my PC (Running Windows XP) via Firewire.
    PE4 DOES recognize my camera because when I hit "Get video" on the capture panel. my camera does start playing the video and I see the timer on the capture panel.
    However, if I get "Stop Capture", I get the error mentioned above:
    "Recording Error: Recorder Captured No Frames."
    The capture panel is also BLACK when it's supposedly capturing the movie.
    Is there a setting on my camera or PE4 that I don't have correctly set?
    I'm really not sure what I'm doing wrong...
    I could use any help you're willing to offer.
    Thanks very much!
    Ted

    When you start a new project, click on the Settings button and choose the presets that fit the workflow for your project. If you're just working with standard definition DV, select that.
    If you are working with standard DV, you'll get the best results if you downsample the video to standard DV as you capture it, as described in our FAQs.
    http://www.adobeforums.com/webx/.3bc434fa
    You'll also find lots of great tutorials and lots of my helpful "Steve's Tips" articles at our "sister" site http://www.muvipix.com.
    Muvipix is a site set up by several of this forum's regular, with some help from Adobe, to support amateur and semi-professional videomakers. Registration is free, and that gets you access to the forum and lots of ad-free display space. On the products page, you'll find dozens of free tips, tutorials, motion backgrounds, DVD templates, sound effects, royalty-free music and stock video clips. Hundreds more are available for individual purchase or, for a small annual subscription fee that we use to keep the site running, you can have unlimited downloads from the ever-growing library of support materials and media.

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

  • 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

  • Capture error premiere pro cs3

    I've got an ongoing capture error in premiere pro cs3 (on Mac OSX).
    At around the 9 minute mark of capturing, it stops and says 'Unknown recorder error'. The footage is still captured if I stop it straight away but lost if I leave it for a while. I'm using canon hv30 camera to capture dv footage (not hdv) and can't seem to solve it. Any suggestions?

    Try a different capture utility.  VideoHelp.com will list plenty of free alternatives.  If they stumble as well, there ie likely something wrong with the tape at that spot.

  • Back ground scheduling and capturing error log

    hi friends,
    i have to write a report and call a function module for passing one by one those conversion progs which fm is suitable what it is
    one more boubt like i can maintain those conversions in structure and i can loop those one by one passing into fm
    i have to capture those error records
    i have to check whether the coversions runs properly or not.

    Hi,
    create one error table store messages in that.
    using sy-subrc you can identify status.
    for capturing put some condition to identify error records.
    Write subroutine for updating table with error messages.

  • Handling error records in LSMW

    Hi All,
    How to handle error records in LSMW.
    Out 20 records had, I had 4 record and 10 record captured in error log.
    How to process them?
    Thanks
    Sonali

    Hi Sonali,
    You have to re-run LSMW for those records which were recorded in error log. Make sure that the new flat file is error free.
    There is no other alternative to this.
    Hope this solves your problem.
    Regards,
    Brajvir

  • Capture errors in owb . version 10gR2

    Hi Expert,
    I am pavan, new to this technology. i had one question. i just want to capture errors during the run of etl process.
    means when i run the etl process,if any errors occur during the run those error records should be captured in a separate table. how do i do this.

    Hi,
    If you're talking about capturing the error records during the execution of a mapping as part of the ETL, you could do it by defining business rules and making use of the error/shadow table option. Those records violating the business rule(s) wil be redirected into the error table you've previously assigned to the target table.
    Check Oracle's Oracle Warehouse Builder Weblog "Error handling using Data Rules".
    cheers,
    Chico

  • General Capture error,capturing straight to MacBook via Firewire 400 to 800

    Hi guys,
    I'm on a shoot now and whilst I'm capturing straight from my Z7 into the Macbook (going from Firewire 400 to 800), occasionally after the capture I get a 'General capture error' and I lose the footage! Obviously it's backed up on tape so it's okay but this is kinda frustrating, do you think it's an issue with the fact that I'm going from 400 to 800?
    I've tried altering the Easy Setup a few times, still having the error.
    Thanks,
    Alex

    In the System Settings/Scratch Disk tab, try activating the "Limit Capture Now To" function. Type in whatever is the longest session you expect to record.
    If you don't activate this feature, FCP has no idea how much material to expect and assumes you will need to fill up your harddrive.
    Let us know if that helps.
    K
    BTW...why don't you tell us exactly what format the Z7 is recording and what your capture settings are. Might also include exact versions of OS/FCP/QT.
    You may just be choking the macbook, by attempting to capture directly to your internal hd.
    Message was edited by: Kevan D. Holdsworth

  • SUBMIT rfebbu01 AND RETURN - not capturing errors

    Hi All,
    We are using following code  SUBMIT rfebbu01 AND RETURN
          USER sy-uname
          WITH anwnd    =  gstr_febvw-anwnd
          WITH s_kukey  IN gr_kukey
          WITH jobname  =  ''
          WITH buber    =  'A'
          WITH valut_on =  gstr_febsca-buch_val
          WITH mregel   =  '1'
          WITH bnkgroup =  ''
          WITH nebgroup =  ''
          WITH function =  'C'
          WITH mode     =  gstr_febsca-jmode
          WITH p_statik =  cc_x.
    CLEAR gc_message.
        CONCATENATE 'Routing No : ' gstr_paymentlot-bankrouting ' Bank Account : ' gstr_paymentlot-bankaccount
          ' Amount : ' gstr_paymentlot-amount ' Posted to Loan system. Group Id : ' gc_group INTO gc_message.
    log the payment record to application log
        CALL FUNCTION 'ZUT_LOG_EMMA'
          EXPORTING
            object    = 'FICA'
            subobject = 'MAPAYP'
            header    = gc_external_id
            info      = gc_message
            msgty     = 'I'.
    this is to post payment to Loans.
    We have a custom program that calls the above program.
    We are trying to capture errors and put it into log but errors are not passing back to custom program.
    So users assum all is ok but it was found that sometiems posting was not successful but we still did not receive any errors.
    Please suggest what aer we missing?
    thanks in advance,
    Heena

    Try SUBMIT ... EXPORTING LIST TO MEMORY and then analyze the list returned by the first program. You'll find examples for such code on SDN.

  • Capture invlaid records

    Hi all,
    Suppose I have only priviledge on OPERATOR. During the execution of interface some invalid records would be captured in E$ table.
    Is there any i would get notification about this invalid records. I don't want to drill down the operator process and open the number of error records from execution tab.
    because i have to run the mutiple process and It is not good to drilll down the all the process through the operator window.
    Thanks
    Neeraj Singh

    Build into your package the use of the odiGetPrevStepLog() method. This will allow you to automatically detect if any errors were moved to the E$ table, and then you could send email or whatever other action you want.

Maybe you are looking for

  • How to recover data from failed drive that's part of mirrored raid

    Hi Guys, hope to get help from someone knowledgeable out there. I have a macpro and recently experienced a failed drive. I set up that failed drive as part of a mirrored raid, this set is not my primary drive and so my computer is stilling up and run

  • Creative Zen Micro won't turn

    Creative Zen Micro - When I plug the usb into a computer, it has the charge icon in the top right corner of the screen. If I attemp to turn it on, while plugged in, the creative sceen come on, and then dissapears. When it is not plugged into the comp

  • How do I know if my iPod Touch is still under warranty?

    I recently cracked my iPod Touch's screen and I need to know if it is still under warranty, as I bought it from Wal-Mart. It's a very minor crack, and the iPod still works perfectly, but any assistance will be taken with gratitude.

  • Problems reducing quote level when forwarding.

    In Mail, under the Format menu, there is a selection "Quote Level". Under that there are selections for "Increase" and "Decrease". Early on with OS-X, decrease quote level worked sporadically (sometimes). Now it doesn't seem to work at all. I have my

  • Internet Explorer & Mac

    I am a business owner & I use my Mac book pro for it. One of my contracts requires that I submit reports through their online system In order to get paid.  This system is of course Internet Explorer based & I am unable to access the system on my Mac.