Bdc error handling

hai all,
i want to capture the error data into an internal table and i want to display it in alv report along with other datas..
how to do this ...
please help  me...
thanks in advance..
regards,
selvi.

selvi,
After Call transaction Statement..
IF sy-subrc ne 0.
  Move the required data in to your internal table.
ENDIF.
After that pass taht internal table to FM.  See the example.
TYPE-POOLS: slis.
Data declaration.
DATA: BEGIN OF itab OCCURS 0,
vbeln TYPE vbeln,
erdat TYPE erdat,
auart TYPE auart,
netwr TYPE vbak-netwr,
END OF itab.
DATA: wa_kna1 TYPE kna1.
DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
Selection-screen.
PARAMETERS: p_kunnr TYPE kunnr OBLIGATORY.
AT SELECTION-SCREEN.
SELECT SINGLE * FROM kna1 INTO wa_kna1
WHERE kunnr = p_kunnr.
IF sy-subrc <> 0.
MESSAGE s208(00) WITH 'Invalid customer'.
LEAVE LIST-PROCESSING.
ENDIF.
START-OF-SELECTION.
Building the field catalog.
s_fieldcatalog-col_pos = '1'.
s_fieldcatalog-fieldname = 'VBELN'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'VBELN'.
s_fieldcatalog-outputlen = '12'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '2'.
s_fieldcatalog-fieldname = 'ERDAT'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'ERDAT'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '3'.
s_fieldcatalog-fieldname = 'AUART'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'AUART'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '4'.
s_fieldcatalog-fieldname = 'NETWR'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'NETWR_AK'.
s_fieldcatalog-do_sum = 'X'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
Get the sales orders.
SELECT vbeln erdat auart netwr
FROM
vbak
INTO TABLE itab
WHERE kunnr = p_kunnr.
IF sy-subrc <> 0.
MESSAGE s208(00) WITH 'No records found'.
LEAVE LIST-PROCESSING.
ENDIF.
DATA: v_repid TYPE syrepid.
v_repid = sy-repid.
Display the alv
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
it_fieldcat = t_fieldcatalog
TABLES
t_outtab = itab.
Don't forget to reward if useful

Similar Messages

  • How to perform Error Handling in this Bdc Code

    Hi,
    I had created this BDC for the tcode MB1B and i want to know how to perform the ERROR HANDLING in it ..
    Plzz provide me guidelines for doing it . here's d code:-
    report ZBDC_MB1B
           no standard page heading line-size 255.
    include bdcrecx1.
    data: begin of record OCCURS 0,
          WERKS_001(004),     "Plant
          MATNR_002(018),     "ItemId
          ERFMG_003(013),     "Quantity in Unit of Entry
          ERFME_004(003),     "Unit of Entry
          LGORT_005(004),     "Storage Location
          CHARG_006(010),     "BatchId
          KDAUF_007(010),     "Sales Order Number
          KDPOS_008(006),     "Item Number in Sales Order
          end of record.
    PARAMETERS : P_FILNAM LIKE RLGRAP-FILENAME.
      initialization.
      CTUMODE = 'A'.
      CUPDATE = 'A'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILNAM.
      CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
         MASK                   = ',. '
         MODE                   = 'O'
         IMPORTING
         FILENAME                 = P_FILNAM
       EXCEPTIONS
         INV_WINSYS             = 1
         NO_BATCH               = 2
         SELECTION_CANCEL       = 3
         SELECTION_ERROR        = 4
         OTHERS                 = 5
      IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    start-of-selection.
    CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
         FILENAME                      = P_FILNAM
         FILETYPE                      = 'DAT'
        TABLES
          DATA_TAB                     = RECORD
       EXCEPTIONS
         CONVERSION_ERROR              = 1
         FILE_OPEN_ERROR               = 2
         FILE_READ_ERROR               = 3
         INVALID_TYPE                  = 4
         NO_BATCH                      = 5
         UNKNOWN_ERROR                 = 6
         INVALID_TABLE_WIDTH           = 7
         GUI_REFUSE_FILETRANSFER       = 8
         CUSTOMER_ERROR                = 9
         NO_AUTHORITY                  = 10
         OTHERS                        = 11
    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.
      BEGIN OF SCREEN 1
    perform bdc_dynpro      using 'SAPMM07M' '0400'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RM07M-SOBKZ'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    *perform bdc_field       using 'MKPF-BLDAT'
                                 '22.12.2008'.
    *perform bdc_field       using 'MKPF-BUDAT'
                                 '22.12.2008'.
    perform bdc_field       using 'RM07M-BWARTWA'
                                  '411'.
    perform bdc_field       using 'RM07M-SOBKZ'
                                  'E'.
    perform bdc_field       using 'RM07M-WERKS'
                                  RECORD-WERKS_001.             "Plant
    perform bdc_field       using 'XFULL'
                                  'X'.
    perform bdc_field       using 'RM07M-WVERS2'
                                  'X'.
      BEGIN OF SCREEN 2
    perform bdc_dynpro      using 'SAPMM07M' '0421'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSEG-CHARG(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MSEG-MATNR(01)'
                                  RECORD-MATNR_002.             "ITEMID
    perform bdc_field       using 'MSEG-ERFMG(01)'
                                  RECORD-ERFMG_003.             "QTY.
    perform bdc_field       using 'MSEG-ERFME(01)'
                                  RECORD-ERFME_004.             "UOM
    perform bdc_field       using 'MSEG-LGORT(01)'
                                  RECORD-LGORT_005.             "ST.LOC
    perform bdc_field       using 'MSEG-CHARG(01)'
                                  RECORD-CHARG_006.             "BATCHID
    perform bdc_field       using 'MSEGK-MAT_KDAUF'
                                  RECORD-KDAUF_007.             "S.O.
    perform bdc_field       using 'MSEGK-MAT_KDPOS'
                                  RECORD-KDPOS_008.             "S.O.LINE ITEM
    perform bdc_field       using 'DKACB-FMORE'
                                  'X'.
      BEGIN OF SCREEN 3
    perform bdc_dynpro      using 'SAPLKACB' '0002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTE'.
    perform bdc_field       using 'DKACB-FMORE'
                                  'X'.
    perform bdc_dynpro      using 'SAPLKACB' '0002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTE'.
    perform bdc_dynpro      using 'SAPMM07M' '0421'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSEG-ERFMG(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'DKACB-FMORE'
                                  'X'.
      BEGIN OF SCREEN 4
    perform bdc_dynpro      using   'SAPLKACB' '0002'.
    perform bdc_field       using      'BDC_OKCODE'
                                                '=ENTE'.
    perform bdc_transaction using 'MB1B'.
    ENDLOOP.

    hi,
    check this code in bold letters.
    INCLUDE BDCRECX1.
    TABLES : MARC.
    TYPES : BEGIN OF TY_UPLOAD,
            MATNR TYPE MARA-MATNR,
            WERKS TYPE MARC-WERKS,
            STEUC TYPE MARC-STEUC,
            END OF TY_UPLOAD.
    TYPES : BEGIN OF TY_MARC,
            MATNR TYPE MARA-MATNR,
            WERKS TYPE MARC-WERKS,
            END OF TY_MARC.
    TYPES : BEGIN OF TY_MTART,
            MATNR TYPE MARA-MATNR,
            MTART TYPE MARA-MTART,
            END OF TY_MTART.
    DATA : T_MARC TYPE STANDARD TABLE OF TY_MARC,
         : T_UPLOAD TYPE STANDARD TABLE OF TY_UPLOAD,
         : T_BASIC TYPE STANDARD TABLE OF TY_UPLOAD,
         : T_SALES TYPE STANDARD TABLE OF TY_UPLOAD,
         : T_ERROR TYPE STANDARD TABLE OF TY_UPLOAD.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
           IT_BDCDATA_VIEW LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
           IT_DATA(3200) OCCURS 0 WITH HEADER LINE,
           IT_FIELD(3200) OCCURS 0 WITH HEADER LINE,
           IT_BDCMSG TYPE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA GI_MSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : CHAR1(500),
          CHAR2(500),
          CHAR3 TYPE STRING,
          V_SELECTION TYPE STRING.  " For View Selection
    DATA : W_MARC TYPE TY_MARC,
           WA_UPLOAD TYPE TY_UPLOAD,
           WA_BASIC TYPE TY_UPLOAD,
           WA_SALES TYPE TY_UPLOAD,
           WA_ERROR TYPE TY_UPLOAD,
           WA_MTART TYPE TY_MTART.
    DATA : VAR TYPE N,
           VAR1 TYPE STRING.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.   "SELECTION SCREEN
    PARAMETERS: P_FNAM LIKE RLGRAP-FILENAME.
    PARAMETERS: P_BAS LIKE RLGRAP-FILENAME.
    PARAMETERS: P_SAL LIKE RLGRAP-FILENAME.
    PARAMETERS: P_ERR LIKE RLGRAP-FILENAME.
    SELECTION-SCREEN : END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAM.
      PERFORM SEARCH USING P_FNAM.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BAS.
      PERFORM SEARCH USING P_BAS.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SAL.
      PERFORM SEARCH USING P_SAL.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_ERR.
      PERFORM SEARCH USING P_ERR.
    *&      Form  SEARCH
          text
         -->PFNAME     text
    FORM SEARCH USING PFNAME.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          STATIC    = 'X'
        CHANGING
          FILE_NAME = PFNAME.
    ENDFORM.                    "SEARCH
    START-OF-SELECTION.
      PERFORM UPLOAD_PROCESS USING P_FNAM.
      PERFORM OPEN_GROUP.
      PERFORM PROCESS.
      PERFORM CLOSE_GROUP.
      IF NOT T_BASIC[] IS INITIAL.
        PERFORM DOWNLOAD TABLES T_BASIC[] USING P_BAS .
      ENDIF.
      IF NOT T_SALES[] IS INITIAL.
        PERFORM DOWNLOAD TABLES T_SALES[] USING P_SAL .
      ENDIF.
      IF NOT T_ERROR[] IS INITIAL.
        PERFORM DOWNLOAD TABLES T_ERROR[] USING P_ERR.
      ENDIF.
    *&      Form  PROCESS
          text
    FORM PROCESS.
      LOOP AT T_UPLOAD INTO WA_UPLOAD.
        PERFORM CONV_ROUTINE  USING WA_UPLOAD-MATNR
                            CHANGING WA_UPLOAD-MATNR.
        SELECT COUNT(*) FROM MARA WHERE MATNR = WA_UPLOAD-MATNR.
        IF SY-SUBRC NE 0.
          MOVE-CORRESPONDING  WA_UPLOAD TO WA_BASIC.
          APPEND WA_BASIC TO T_BASIC.
          CLEAR WA_BASIC.
          CONTINUE.
        ENDIF.
        SELECT COUNT(*) FROM MARC WHERE MATNR = WA_UPLOAD-MATNR
                                        AND WERKS = WA_UPLOAD-WERKS
                                        AND PSTAT LIKE '%V%'.
        IF SY-SUBRC NE 0.
          MOVE-CORRESPONDING  WA_UPLOAD TO WA_SALES.
          APPEND WA_SALES TO T_SALES.
          CLEAR WA_SALES.
          CONTINUE.
        ENDIF.
        CLEAR : WA_MTART.
        SELECT SINGLE MATNR MTART FROM MARA INTO WA_MTART WHERE MATNR = WA_UPLOAD-MATNR.
        PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0060'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RMMG1-MATNR'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=AUSW'.
        PERFORM BDC_FIELD       USING 'RMMG1-MATNR'
                                      WA_UPLOAD-MATNR.
        CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW'     " Function module
        EXPORTING
          MATERIAL                  = WA_UPLOAD-MATNR  " Material number
          MATERIALART               = WA_MTART-MTART          " Material Type
          SELECTION                 = 'V'              "
          TCODE                     = 'MM02'           " Tcode where view's are called.
        TABLES
          BTCI_D0070                = IT_BDCDATA_VIEW
        EXCEPTIONS
          MATERIAL_NOT_FOUND        = 1
          MATERIAL_NUMBER_MISSING   = 2
          MATERIAL_TYPE_MISSING     = 3
          MATERIAL_TYPE_NOT_FOUND   = 4
          NO_ACTIVE_DYNPRO_SELECTED = 5
          NO_AUTHORITY              = 6
          OTHERS                    = 7.
        READ TABLE IT_BDCDATA_VIEW WITH KEY FVAL  = 'X'.
        IF SY-SUBRC = 0.
          V_SELECTION = IT_BDCDATA_VIEW-FNAM.
        ELSE.
          CONTINUE.
        ENDIF.
        VAR = IT_BDCDATA_VIEW-FNAM+17(2).
        VAR = VAR + 3.
        CONCATENATE 'MSICHTAUSW-KZSEL(' '0' VAR ')' INTO VAR1.
        PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0070'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'MSICHTAUSW-DYTXT(06)'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM BDC_FIELD       USING VAR1
                                       'X'.
        CLEAR VAR.
        CLEAR VAR1.
       PERFORM BDC_FIELD       USING 'MSICHTAUSW-KZSEL(06)'
                                     'X'.
        PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0080'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RMMG1-VKORG'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM BDC_FIELD       USING 'RMMG1-WERKS'
                                      WA_UPLOAD-WERKS.
        PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '4004'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=BU'.
       PERFORM BDC_FIELD       USING 'MAKT-MAKTX'
                                     'MTI_ESE_HALB_01'.
        PERFORM BDC_FIELD       USING 'MARC-STEUC'
                                      WA_UPLOAD-STEUC.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'MARC-HERKR'.
        PERFORM BDC_FIELD       USING 'MARC-HERKL'
                                      'IN'.
        PERFORM BDC_FIELD       USING 'MARC-HERKR'
                                      'MAH'.
        PERFORM BDC_TRANSACTION USING 'MM02'.
    move the error record into seperate internal table nad down load it ****
        IF MESSTAB-MSGTYP = 'E'.
          MOVE-CORRESPONDING WA_UPLOAD TO WA_ERROR.
          APPEND WA_ERROR TO T_ERROR.
          CLEAR WA_ERROR.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "PROCESS
    *&      Form  UPLOAD_PROCESS
          text
         -->PFNAME     text
    FORM UPLOAD_PROCESS USING PFNAME.
      DATA : PFNAME1 TYPE STRING.
      PFNAME1 = PFNAME.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME            = PFNAME1
          FILETYPE            = 'ASC'
          HAS_FIELD_SEPARATOR = 'X'
        TABLES
          DATA_TAB            = T_UPLOAD[].
      IF SY-SUBRC <> 0.
      ENDIF.
    ENDFORM.                    "UPLOAD_PROCESS
    *&      Form  CONV_ROUTINE
          text
         -->P_INPUT    text
         -->P_OUTPUT   text
    FORM CONV_ROUTINE   USING    P_INPUT
                     CHANGING P_OUTPUT.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = P_INPUT
        IMPORTING
          OUTPUT = P_OUTPUT.
    ENDFORM.                    "CONV_ROUTINE
    *&      Form  DOWNLOAD
          text
         -->GI_FINAL   text
         -->PFNAME     text
    FORM DOWNLOAD TABLES
                  GI_FINAL
                         USING  PFNAME .
      DATA : FNAME TYPE STRING.
      FNAME = PFNAME.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                        = FNAME
          FILETYPE                        = 'DAT'
         WRITE_FIELD_SEPARATOR           = 'x'
            HEADER                          = '00'
          IMPORTING
            FILELENGTH                      =
        TABLES
          DATA_TAB                        =  GI_FINAL[]
          FIELDNAMES                      = GI_FIELDNAMES[]
      IF SY-SUBRC = 0.
        MESSAGE 'FILE DOWNLOADED SUCCESSFULLY' TYPE 'I'.
      ENDIF.
    ENDFORM.                    " DOWNLOAD
    Regards
    Siva Prasad

  • Error handling in bdc Fb01along with erros in Idoc.

    Hi,
    Can any one send me the sample code for the error handling in bdc Fb01along with erros in Idoc. Actually, mail should be sent
    Thanks
    Avi.

    Hi,
    This may help you.
    <b>FORM send_mail USING   receiver.
      CLEAR: w_lines,tbl_packing_list,tbl_object_header,
                 tbl_contents_txt, tbl_receivers.
      REFRESH:tbl_packing_list, tbl_object_header,
               tbl_contents_txt,tbl_receivers.
      SORT tbl_err.
      DELETE ADJACENT DUPLICATES FROM tbl_err COMPARING ALL FIELDS.
      IF NOT tbl_err[] IS INITIAL.
    Preparing the email.
        PERFORM prepare_email.
      ELSE.
       If sy-subrc NE 0.
          MOVE sy-subrc TO w_code.
       ENDIF.
        EXIT.
      ENDIF.
    Get  the content of header e-mail document data
      PERFORM document_data.
    Get details of the error file attached (like type of file and format)
      PERFORM packing_list.
    Get receiver mail id's
      tbl_receivers-receiver = receiver.
      tbl_receivers-rec_type = 'C'.
      tbl_receivers-express  = c_flag.
      tbl_receivers-sap_body = c_flag.
      APPEND tbl_receivers.
    Call FM to send E-mails to receivers
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                document_data              = st_document_data
                put_in_outbox              = 'X'
           TABLES
                packing_list               = tbl_packing_list
                object_header              = tbl_object_header
                contents_txt               = tbl_contents_txt
                receivers                  = tbl_receivers[]
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    ENDFORM.                    " send_mail
    *&      Form  prepare_email
          text
    -->  p1        text
    <--  p2        text
    FORM prepare_email.
    E-Mail body content
      IF NOT w_lifnr IS INITIAL.
        CONCATENATE text-015 w_docnum text-016
               INTO tbl_contents_txt-line
          SEPARATED BY space.
      ENDIF.
      APPEND tbl_contents_txt.
      CLEAR tbl_contents_txt.
    E-mail error file attachment header
      CONCATENATE text-063 text-064
                   text-065 text-066 c_comma
             INTO tbl_contents_txt-line
        SEPARATED BY c_comma.
      APPEND tbl_contents_txt.
      CLEAR tbl_contents_txt.
    E-mail error file attachment content
      LOOP AT tbl_err.
        CONCATENATE w_docnum tbl_err-v_segnum
                    tbl_err-msg tbl_err-type
          INTO tbl_contents_txt-line
          SEPARATED BY c_comma.
        CONCATENATE c_linefeed tbl_contents_txt-line c_comma
               INTO tbl_contents_txt-line.
        APPEND tbl_contents_txt.
        CLEAR tbl_contents_txt.
      ENDLOOP.
    ENDFORM.                    " prepare_email
    *&      Form  document_data
          text
    -->  p1        text
    <--  p2        text
    FORM document_data.
      CLEAR w_line.
      IF NOT w_lifnr IS INITIAL.
        CONCATENATE text-075 text-027 sy-datum sy-uzeit INTO w_line
        SEPARATED BY c_uscore.
      ENDIF.
      st_document_data-obj_name  = w_line.
      st_document_data-obj_descr = w_line.
      st_document_data-priority  = 1.
      st_document_data-obj_prio  = 1.
    ENDFORM.                    " document_data
    *&      Form  packing_list
          text
    -->  p1        text
    <--  p2        text
    FORM packing_list.
      CLEAR w_lines.
      DESCRIBE TABLE tbl_err LINES w_lines.
      READ TABLE tbl_contents_txt INDEX w_lines.
      tbl_packing_list-head_start = 1.
      tbl_packing_list-head_num   = 1.
      tbl_packing_list-body_start = 1.
      tbl_packing_list-body_num   = 1.
      tbl_packing_list-doc_type   = 'RAW'.
      APPEND tbl_packing_list.
      tbl_packing_list-head_start = 1.
      tbl_packing_list-head_num   = 0.
      tbl_packing_list-body_start = 2.
      tbl_packing_list-body_num   = w_lines + 1.
      tbl_packing_list-doc_type   = 'CSV'.
      tbl_packing_list-obj_descr  = 'Error_Attachment'(060).
      IF NOT w_lifnr IS INITIAL.
        tbl_packing_list-obj_name   = 'Idoc Number is'(072).
      ENDIF.
      tbl_packing_list-doc_size   = 255 * ( w_lines + 1 ).
      APPEND tbl_packing_list.
    ENDFORM.                    " packing_list
    </b>
    Thanks
    Manju.

  • Error Handling in BDC...Review code..

    Hi Gurus,
    I have made a BDC program to do call transaction for FV50...i AM NOT SURE ON HOW TO DO ERROR HANDLING IN THAT...TRIED TO DO SOMETHING BUT IT NEEDS LOT OF IMPROVEMENT...
    CAN ONE YOU EXPERTS HELP ME IN THAT...I AM ATTACHING THE ENTIRE CODE..
    REPORT  zbdc_park_fv50.
    DATA:
    t_document_line_item_main LIKE bapiacgl09 OCCURS 100,
    t_document_line_item_enhn LIKE bapiacextc OCCURS 100,
    t_document_line_item_amnt LIKE bapiaccr09 OCCURS 100,
    wa_document_header LIKE  bapiache09,
    wa_document_line_item_main LIKE bapiacgl09,
    wa_document_line_item_enhn LIKE bapiacextc,
    wa_document_line_item_amnt LIKE bapiaccr09.
    DATA: BEGIN OF s_bdc_document_item_main,
          v_HKONT LIKE ACGL_ITEM-HKONT,
          v_SHKZG LIKE ACGL_ITEM-SHKZG,
          v_SGTXT LIKE ACGL_ITEM-SGTXT,
          v_WRBTR LIKE ACGL_ITEM-WRBTR,
          v_WAERS LIKE ACGL_HEAD-WAERS,
          v_PRCTR LIKE ACGL_ITEM-PRCTR,
          v_YYLOB LIKE ACGL_ITEM-YYLOB,
          v_YYCSG LIKE ACGL_ITEM-YYCSG,
          END OF s_bdc_document_item_main.
    DATA: t_bdc_document_item_main LIKE s_bdc_document_item_main OCCURS 0,
          wa_bdc_document_item_main LIKE s_bdc_document_item_main.
    DATA: t_bdcdata LIKE bdcdata OCCURS 0 with header line,
          t_messages LIKE bdcmsgcoll OCCURS 0 with header line.
    DATA:  idx TYPE i,
           ch3(2) TYPE n,
           fname(40) TYPE c,
           options TYPE ctu_params.
    DATA: indate TYPE d,
          intdate TYPE d,
          var_SHKZG LIKE BSEG-SHKZG,
          amount(13) type c.
    DATA: w_textout LIKE t100-text.
    *DATA: gd_update TYPE i,
         gd_lines TYPE i.
    CLEAR wa_document_header.
    ***FILL DOCUMENT HEADER***********
    wa_document_header-obj_type = space.                        "
    wa_document_header-obj_key = space.
    wa_document_header-obj_sys = space.
    wa_document_header-bus_act = 'RFBU'.
    wa_document_header-username = 'samwil'.
    wa_document_header-header_txt = 'TEST_BDC_PARK123'.
    wa_document_header-comp_code = '1001'.
    wa_document_header-doc_date = '20070817'.
    wa_document_header-pstng_date = '20070817'.
    CLEAR wa_document_header-trans_date.
    CLEAR wa_document_header-fisc_year.
    CLEAR wa_document_header-fis_period.
    wa_document_header-doc_type = 'SY'.
    wa_document_header-ref_doc_no = 'AAR1213'.
    wa_document_header-ac_doc_no = space.
    wa_document_header-obj_key_r = space.
    wa_document_header-reason_rev = space.
    wa_document_header-compo_acc = space.
    wa_document_header-ref_doc_no_long = space.
    wa_document_header-acc_principle = 'LGAP'.
    wa_document_header-neg_postng = space.
    wa_document_header-obj_key_inv = space.
    wa_document_header-bill_category = space.
    FILL LINE ITEMS *******************
    CLEAR: wa_document_line_item_main, wa_document_line_item_enhn, wa_document_line_item_amnt.
    Fill Main Portion Of Accounting Line Item
    wa_document_line_item_main-itemno_acc = '1'.         "Accounting Document Line Item Number
    wa_document_line_item_main-gl_account = '2480001067'."HKONT - Account
    wa_document_line_item_main-item_text = 'ITEM 2'.     "SGTXT - Item Text
    wa_document_line_item_main-doc_type = space.         "BLART - Document Type
    wa_document_line_item_main-comp_code = space.        "BUKRS - Company Code
    wa_document_line_item_main-pstng_date = '20080817'.  "BUDAT - Posting Date
    wa_document_line_item_main-alloc_nmbr = space.       "ZUONR - Allocation Number
    wa_document_line_item_main-costcenter = space.       "KOSTL - Cost Center
    wa_document_line_item_main-profit_ctr = '1999999'.   "PRCTR - Profit Center
    wa_document_line_item_main-de_cre_ind = 'D'.         "NEWBS - Posting Key / Debit Credit Indicator
    wa_document_line_item_main-trade_id = space.         "RASSC - Company ID Of Trading Partner
    Fill Amount Portion Of Accounting Line Item
    wa_document_line_item_amnt-itemno_acc = '1'.          "Accounting Document Line Item Number
    wa_document_line_item_amnt-curr_type = '00'.          "Currency Type
    wa_document_line_item_amnt-currency = 'USD'.          "WAERS - Currency Key
    wa_document_line_item_amnt-amt_doccur = '100'.        "WRBTR - Amount In Document Currency Type
    Create Enhancement Portion Of Accounting Line Item
    wa_document_line_item_enhn-field1+0(3) = '001'.     "Line of Bus YYLOB
    wa_document_line_item_enhn-field1+3(3) = '008'.     "Customer Segm YYCSG
    wa_document_line_item_enhn-field1+6(5) = space.     "Product Group
    wa_document_line_item_enhn-field1+11(2) = space.    "Distribution Ch
    wa_document_line_item_enhn-field1+13(4) = space.    "Maturity Year
    wa_document_line_item_enhn-field1+17(3) = space.    "Insurance Type
    wa_document_line_item_enhn-field1+20(4) = space.    "Accident Year
    wa_document_line_item_enhn-field1+24(6) = space.    "Product
    wa_document_line_item_enhn-field1+30(3) = space.    "Source
    wa_document_line_item_enhn-field1+33(22) = space.   "DI Run Name
    wa_document_line_item_enhn-field1+55(1) = space.     "DI Run Type
    wa_document_line_item_enhn-field1+56(5) = space.    "DI Run Number
    wa_document_line_item_enhn-field1+61(16) = space.   "DI Journal ID
    wa_document_line_item_enhn-field1+77(5) = space.    "DI Journal Link
    wa_document_line_item_enhn-field1+82(22) = space.   "DI File Name
    APPEND: wa_document_line_item_main TO t_document_line_item_main,
            wa_document_line_item_enhn TO t_document_line_item_enhn,
            wa_document_line_item_amnt TO t_document_line_item_amnt.
    Fill Next Line Item #2
    CLEAR: wa_document_line_item_main, wa_document_line_item_enhn, wa_document_line_item_amnt.
    Fill Main Portion Of Accounting Line Item
    wa_document_line_item_main-itemno_acc = '2'.         "Accounting Document Line Item Number
    wa_document_line_item_main-gl_account = '2480001067'."HKONT - Account
    wa_document_line_item_main-item_text = 'ITEM 3'.     "SGTXT - Item Text
    wa_document_line_item_main-doc_type = space.         "BLART - Document Type
    wa_document_line_item_main-comp_code = space.        "BUKRS - Company Code
    wa_document_line_item_main-pstng_date = '20080817'.  "BUDAT - Posting Date
    wa_document_line_item_main-alloc_nmbr = space.       "ZUONR - Allocation Number
    wa_document_line_item_main-costcenter = space.       "KOSTL - Cost Center
    wa_document_line_item_main-profit_ctr = '1999999'.   "PRCTR - Profit Center
    wa_document_line_item_main-de_cre_ind = 'C'.        "NEWBS - Posting Key / Debit Credit Indicator
    wa_document_line_item_main-trade_id = space.         "RASSC - Company ID Of Trading Partner
    Fill Enhancement Portion Of Accounting Line Item
    Fill Amount Portion Of Accounting Line Item
    wa_document_line_item_amnt-itemno_acc = '2'.          "Accounting Document Line Item Number
    wa_document_line_item_amnt-curr_type = '00'.          "Currency Type
    wa_document_line_item_amnt-currency = 'USD'.          "WAERS - Currency Key
    wa_document_line_item_amnt-amt_doccur = '100'.        "WRBTR - Amount In Document Currency Type
    Create Enhancement Portion Of Accounting Line Item
    wa_document_line_item_enhn-field1+0(3) = '001'.     "Line of Bus YYLOB.
    wa_document_line_item_enhn-field1+3(3) = '008'.     "Customer Segm YYCSG
    wa_document_line_item_enhn-field1+6(5) = space.     "Product Group
    wa_document_line_item_enhn-field1+11(2) = space.    "Distribution Ch
    wa_document_line_item_enhn-field1+13(4) = space.    "Maturity Year
    wa_document_line_item_enhn-field1+17(3) = space.    "Insurance Type
    wa_document_line_item_enhn-field1+20(4) = space.    "Accident Year
    wa_document_line_item_enhn-field1+24(6) = space.    "Product
    wa_document_line_item_enhn-field1+30(3) = space.    "Source
    wa_document_line_item_enhn-field1+33(22) = space.   "DI Run Name
    wa_document_line_item_enhn-field1+55(1) = space.    "DI Run Type
    wa_document_line_item_enhn-field1+56(5) = space.    "DI Run Number
    wa_document_line_item_enhn-field1+61(16) = space.   "DI Journal ID
    wa_document_line_item_enhn-field1+77(5) = space.    "DI Journal Link
    wa_document_line_item_enhn-field1+82(22) = space.   "DI File Name
    APPEND: wa_document_line_item_main TO t_document_line_item_main,
            wa_document_line_item_enhn TO t_document_line_item_enhn,
            wa_document_line_item_amnt TO t_document_line_item_amnt.
    ****FILL THE BDC TABLE*******************************************************
    LOOP AT t_document_line_item_main INTO wa_document_line_item_main.
      Move: wa_document_line_item_main-gl_account TO wa_bdc_document_item_main-v_HKONT,
            wa_document_line_item_main-item_text TO wa_bdc_document_item_main-v_SGTXT,
            wa_document_line_item_main-profit_ctr TO wa_bdc_document_item_main-v_PRCTR,
            wa_document_line_item_main-de_cre_ind TO wa_bdc_document_item_main-v_SHKZG.
      Read table t_document_line_item_amnt index sy-tabix into wa_document_line_item_amnt.
      IF sy-subrc = 0.
        Move : wa_document_line_item_amnt-currency TO wa_bdc_document_item_main-v_WAERS,
               wa_document_line_item_amnt-amt_doccur TO wa_bdc_document_item_main-v_WRBTR.
      ENDIF.
      Read table t_document_line_item_enhn index sy-tabix into wa_document_line_item_enhn.
      IF sy-subrc = 0.
        Move : wa_document_line_item_enhn-field1+0(3) TO wa_bdc_document_item_main-v_YYLOB,
               wa_document_line_item_enhn-field1+3(3) TO wa_bdc_document_item_main-v_YYCSG.
      ENDIF.
      APPEND wa_bdc_document_item_main TO t_bdc_document_item_main.
      CLEAR: wa_bdc_document_item_main.
    ENDLOOP.          " BDC Table.
    ************************BDC PROGRAM**************************************************************
    perform bdc_dynpro  TABLES t_bdcdata    using 'SAPLACHD' '1000'.
    perform bdc_field TABLES t_bdcdata       using 'BDC_CURSOR'
                                  'BKPF-BUKRS'.
    perform bdc_field  TABLES t_bdcdata      using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field TABLES t_bdcdata       using 'BKPF-BUKRS'
                                  wa_document_header-comp_code.
    perform bdc_dynpro  TABLES t_bdcdata     using 'SAPMF05A' '1001'.
    perform bdc_field  TABLES t_bdcdata      using 'BDC_OKCODE'
                                  '=PBBP'.
    perform bdc_field  TABLES t_bdcdata      using 'ACGL_HEAD-BLDAT'
                                  wa_document_header-doc_date.
    perform bdc_field   TABLES t_bdcdata     using 'ACGL_HEAD-WAERS'
                                  'USD'.
    perform bdc_field  TABLES t_bdcdata      using 'ACGL_HEAD-BUDAT'
                                  wa_document_header-pstng_date.
    perform bdc_field  TABLES t_bdcdata      using 'ACGL_HEAD-XBLNR'
                                  wa_document_header-ref_doc_no.
    perform bdc_field  TABLES t_bdcdata      using 'ACGL_HEAD-BKTXT'
                                  wa_document_header-header_txt.
    perform bdc_field  TABLES t_bdcdata      using 'ACGL_HEAD-BLART'
                                  wa_document_header-doc_type.
    perform bdc_field  TABLES t_bdcdata      using 'BDC_CURSOR'
                                  'ACGL_ITEM_GEN-GEN_CHAR2(02)'.
    LOOP AT t_bdc_document_item_main INTO wa_bdc_document_item_main.
      idx = idx + 1.
      ch3 = idx.
      CONCATENATE 'ACGL_ITEM-HKONT('ch3')' INTO FNAME.
      perform bdc_field  TABLES t_bdcdata      using fname
                               wa_bdc_document_item_main-v_HKONT.
      CONCATENATE 'ACGL_ITEM-SHKZG('ch3')' INTO FNAME.
      IF wa_bdc_document_item_main-v_SHKZG = 'C'.
        var_SHKZG = 'H'.
      ELSEIF wa_bdc_document_item_main-v_SHKZG = 'D'.
        var_SHKZG = 'S'.
      ENDIF.
      perform bdc_field  TABLES t_bdcdata      using fname
                                    var_SHKZG.
      CONCATENATE 'ACGL_ITEM-WRBTR('ch3')' INTO FNAME.
      WRITE: wa_bdc_document_item_main-v_WRBTR to amount.
      perform bdc_field  TABLES t_bdcdata      using FNAME
                       wa_bdc_document_item_main-v_WRBTR.
                                   amount.
      CONCATENATE 'ACGL_ITEM-SGTXT('ch3')' INTO FNAME.
      perform bdc_field  TABLES t_bdcdata      using FNAME
                                    wa_bdc_document_item_main-v_SGTXT.
      CONCATENATE 'ACGL_ITEM-PRCTR('ch3')' INTO FNAME.
      perform bdc_field   TABLES t_bdcdata     using FNAME
                                    wa_bdc_document_item_main-v_PRCTR.
      CONCATENATE 'ACGL_ITEM_GEN-GEN_CHAR1('ch3')' INTO FNAME.
      perform bdc_field  TABLES t_bdcdata      using FNAME
                                    wa_bdc_document_item_main-v_YYLOB.
      CONCATENATE 'ACGL_ITEM_GEN-GEN_CHAR2('ch3')' INTO FNAME.
      perform bdc_field  TABLES t_bdcdata      using FNAME
                                    wa_bdc_document_item_main-v_YYCSG.
      options-dismode = 'A'.
      options-nobinpt = 'X'.
    endloop.
    CALL TRANSACTION 'FV50' USING t_bdcdata MESSAGES INTO
    t_messages OPTIONS FROM options.
    *if sy-subrc = 0.
      Retrieve error messages
    LOOP AT t_messages WHERE msgtyp = 'E'.
        Builds actual message based on info returned from Call transaction
      CALL FUNCTION 'MESSAGE_TEXT_BUILD'
        EXPORTING
          msgid               = t_messages-msgid
          msgnr               = t_messages-msgnr
          msgv1               = t_messages-msgv1
          msgv2               = t_messages-msgv2
          msgv3               = t_messages-msgv3
          msgv4               = t_messages-msgv4
        IMPORTING
          message_text_output = w_textout.
    ENDLOOP.
    Start new screen
    FORM bdc_dynpro TABLES it_bdcdata STRUCTURE bdcdata USING program
    dynpro.
      DATA: wa_bdcdata TYPE bdcdata.
      wa_bdcdata-program = program.
      wa_bdcdata-dynpro = dynpro.
      wa_bdcdata-dynbegin = 'X'.
      APPEND wa_bdcdata TO it_bdcdata.
    ENDFORM. "BDC_DYNPRO
    Insert field
    FORM bdc_field TABLES it_bdcdata STRUCTURE bdcdata USING fnam fval.
      DATA: wa_bdcdata TYPE bdcdata.
      IF fval <> space.
        CLEAR wa_bdcdata.
        wa_bdcdata-fnam = fnam.
        wa_bdcdata-fval = fval.
        APPEND wa_bdcdata TO it_bdcdata.
      ENDIF.
    ENDFORM.                    "BDC_FIELD
    Title was edited by:
            Alvaro Tejada Galindo

    HI,
      The code looks ok...
    take a internal table for messages.
    data : begin of itab occurs 0,
             message(100) type c,
             end of itab.
    put this after
    Retrieve error messages
    LOOP AT t_messages WHERE msgtyp = 'E'.
    Builds actual message based on info returned from Call transaction
    CALL FUNCTION 'MESSAGE_TEXT_BUILD'
    EXPORTING
    msgid = t_messages-msgid
    msgnr = t_messages-msgnr
    msgv1 = t_messages-msgv1
    msgv2 = t_messages-msgv2
    msgv3 = t_messages-msgv3
    msgv4 = t_messages-msgv4
    IMPORTING
    message_text_output = w_textout.
    <b>itab-message = w_textout.
    append itab</b>.
    ENDLOOP.

  • Error Handling in table control for line item.

    Hi,
    Please how to do error handling in table control for line item in bdc,i have used format_message for header but i don't no fill decamps internal tabled and  how to do background processing in call transaction.
    Thanks

    Background processing is not possible using call transaction method.
    You can create an executable program which can have CALL TRANSACTION BDC code. And this can be run in background.
    What do you exactly mean by Error handling for Items in table control. Can you give some more details.

  • Error handling for inbound function module

    Dear all,
    I have written my custom function module for matmas idoc extention.In the begining of function module i have used IDOC_INPUT_MATMAS01  and then have coded my BDC.For handling errors in caese BDC fails i am filling  table  idoc_status. wih status 51.
    But this gives eror as-
    Status records with status 51 after status 53
    Message no. B1357
    Diagnosis
    The application function module controlling the ALE inbound processing has passed several status records to ALE. The status of the last of these was '51'. Before this, a status of '53' was passed.
    Procedure
    If you have written the application function module yourself, you need to change the program.
    Can anybody guide me how to get the exact application errors in Application log.
    Thank you.

    Hi,
    You are using BDC after the FM 'IDOC_INPUT_MATMAS01'. Right??.... The problem is, The function Module IDOC_INPUT_MATMAS01 itself posts the material and set the status '53' i.e. document posted. You can not have any error status '51' after that.
    I don't understand the need of BDC in spite of the FM 'IDOC_INPUT_MATMAS01'. But if whatever the reason, you still want to use the BDC and set the status to 51, After the FM 'IDOC_INPUT_MATMAS01' call, Delete status table where status = '53'. and then proceed for the BDC...

  • How to take control back from service error handler in osb

    I am using osb to send data to multiple services at the same time.since x query is a procedural language if any single operation fails the flow goes to service error handler which calls a BPEL webservice and logs the error in a database but the control doesnt comes back to my code I have tried everything including RESUME,REPLY operations but all in vain similarly i cannot use service callout call to my business service because its not allowing to select my BPEL wsdl operation

    If your statement "the control doesnt comes back to my code" means you expect that your xquery will continue in processing than your expectations are just too high. :-)
    Resume action is supposed to resume the next action in the message flow. It means the action that follows the action which caused an error.

  • Report and Alert don't executed in the error handler with a JMS proxy service

    Hi,
    I'm working with OSB 11.1.1.4.0 and I'm facing a problem with the error handler of my JMS proxy service.
    My error handler contains two main elements :
    - a Report action
    - an Alert with a JMS destination defined
    When the business service failed the message remain in the queue. It's the expected behavior.
    The problem is :
    - the report is missing
    - the alert is raised but missing in the JMS destination defined in the Alert setting.
    I've noticed if I add a Reply with Failure or Success, Report and Alert are successfully executed.
    Unfortunately the message don't remain in the JMS queue.
    What can I do in order to have my report/alert done and the JMS transaction rollback in order to keep the message in the queue ?
    I've already met this problem in the past with alsb v3 and my solution was to add Service Callout in the error handler in order to externalize these actions.
    This solution is not convenient and I hope another solution is possible.

    Inventorying workgroups can be difficult, especially when it comes to remote access and network security. Because workgroups are not centrally managed, some of the items discussed in this
    wiki article on preparing your workgroup environment may require you to visit each machine individually.
    For non-domain credentials, you do not use the <systemname>\<user> format, you simply enter the user name. Regarding how to enter the credentials, if you have an account that uses the same username and password on all machines and is an administrator
    on all of those machines, then you can enter that in the All computers credentials page of the wizard. You can also do this if they are different user names. However, if some machines have an account with the same user name, such as Administrator,
    but different passwords on each machine, you will need to use the Manually enter computer names discovery method, and then enter the information for each group or each machine.
    As you can tell, workgroup environments can quickly negate any benefit that the agentless inventory nature of MAP provides.
    Please remember to click "Mark as Answer" on the post that helps you, and to click
    "Unmark as Answer" if a marked post does not actually answer your question. Please
    VOTE as HELPFUL if the post helps you. This can be beneficial to other community members reading the thread.

  • LV7.1 Strange behavior with Automatic Error Handling occuring when it shouldn't [LV 7.1 Pro on WinXP for Tablet PC's]

    [LV 7.1 Pro on WinXP for Tablet PC's]
    I recently let a rather large LV app of mine run in the development environment while I was out for a couple of days. Upon returning I found that the app had hung for ~22 hours waiting for an answer to an Automatic Error Handling (AEH) dialog proclaiming an Error 7 in New File without any indication of the VI hierarchy that called New File.  I set about ensuring that AEH dialogs would not pop up and have not been able to discover how I could have possibly received one in the first place.
    Subsequent investigation revealed:
    Neither AEH option in Options>Block Diagrams were checked.
    Network problems had occurred around the time that the app had hung.  All file paths are network paths when running in the development environment, so the cause of the error was most likely valid, even if the AEH dialog appearance wasn't.
    My app has only one instance where the New File primitive is used by me. That subVI and all others above it in the hierarchy DO NOT have the AEH property enabled.  The error out cluster of New File in my subvi is wired.
    My app has three instances where New File is called from a vi.lib vi (Open/Create/Replace File.vi, Open Config Data.vi, and Prompt Web Browser Path.vi), none of which have the AEH property enabled.  Nor does any of their calling VI's.  All three instances also have their error out cluster wired.
    A utility to examine the AEH property of all VI's (with all top level and dynamic VI's loaded) in memory reported that only 1 of 308 vi's ( RGT Does File Exists.vi from the Report Generation Toolkit) had that property true.  That vi has no subVI's other than the File/Directory Info primitive and no calling VI's in common with any of the vi's that call New File, except a top level VI.
    As long as 'Enable automatic error handling dialogs' remains unselected in options>block diagram, I am unable to get an AEH dialog for either the New File or File/Directory Info primitives in a test VI with AEH property enabled and their error out clusters unwired no matter what invalid path I pass to the functions.  As soon as the options>block diagram>Enable AEH dialogs' is selected, both primitives fire AEH dialogs with no error out wired and don't when wired. i.e. works as advertised.
    In other words I can find no reason why I should have gotten the problem AEH dialog...
    I cannot afford for this app to hang because of a network problem, other portions of the app that were running concurrently correctly handled the error and, had the AEH dialog not appeared, the app would have made corrections or shutdown in an orderly fashion.
    Any ideas?

    Very good.
    Write Characters to File.vi>Open/Create/Replace File.vi>New File
    New File throws the error.  Open/Create/Replace strips the hierarchy from the source of the error.  Write Characters passes it to the General Error Handler.  I never looked above O/C/R file in the hierarchy except for enable automatic error handling property.  The tip-off should have been to realize that O/C/R file was stripping the hierarchy from the error and look above that. 
    The real irony is that Write Characters was being used to log error cluster data to an error log file...
    Save as... Copy without updating... the OEM 'Write Characters to File' is gone from this app.
    Thanx (a bunch)

  • Error handling in process chain-doubts

    Hi ,
    I have some doubts in error handling of process chains.
    1) I have  aprocess load infopackeage and subsequent process is update fromPSA.
    process load infopackage got failed  , so i loaded  the IP manually and repeated the next i.e process update from PSA .
    How to correct the process chain from now?
    2) I have  aprocess load infopackeage and subsequent process is Delete request in infocube .process load infopackage got failed  , so i loaded  the IP manually and repeated the next process i.e Delete request in infocube. Chain continued by deleting the right request . How this is possible ?
    Plz  help me  as this is urgent and daily i have to deal with this  issues. If any documents on error handling is greatly appreciated.
    My mail id is [email protected]
    Regards,
    Pavan

    Hi Pavan,
    Hope the following links will give u a clear idea about process chains and clear ur doubts.
    Business Intelligence Old Forum (Read Only Archive)
    http://help.sap.com/saphelp_nw2004s/helpdata/en/8f/c08b3baaa59649e10000000a11402f/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/8da0cd90-0201-0010-2d9a-abab69f10045
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/19683495-0501-0010-4381-b31db6ece1e9
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/36693695-0501-0010-698a-a015c6aac9e1
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9936e790-0201-0010-f185-89d0377639db
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/263de690-0201-0010-bc9f-b65b3e7ba11c
    /people/siegfried.szameitat/blog/2006/02/26/restarting-processchains
    Errors in monitoring of process chains can be categorized into 4 different sections...
    Master data - Full Update
    Master data - Delta Update
    Transaction data - Full Update
    Transaction data - Delta Update.. in terms of loading of data which can be due to server shut down or system maintenance... errors due to incorrect entries in the OLTP system in which case you'll have to fix the errors in the PSA and manually load the data...
    Otherwise it can have errors on Attribute change run being locked by some other job... Aggregate Roll up failing because of attribute change run being run at the same time... Problem with hierarchies and save hierarchies...
    There can be problems with the data store activation if the ODS object contains any incorrect request sitting inside it... then, you need to delete the incorrect request and reload the data again...
    In case of Transaction Delta failure, you'll have to request for a repeat either manually in the infopackage or using the repeat option if available on right clicking the load event...
    For Master Data Delta failures, you need to do an Re-init by deleteing the previous initalization condition in the "initalization option for source systems" in the menu scheduler or reschedule the enitre chain... because, master data generally do not support repeat of last delta ...
    U can even look into these links:
    /people/siegfried.szameitat/blog/2006/02/26/restarting-processchains
    For common data load errors check this link:
    /people/siegfried.szameitat/blog/2005/07/28/data-load-errors--basic-checks
    ****Assign Points if Helpful****
    Regards,
    Ravikanth.

  • Error handling function: ORA-20001: get_dbms_sql_cursor error:ORA-00942: table or view does not exist  is not trapped. Why?

    Why APEX 4.1 Error handling function does not trap  the error of missing table?
    Say, I create simple application with single IR report page and I also assign standard simple error handling function.
    Function works perfectly, except but this case:
    If I just drop a table used by report page and then refresh the page I am getting usual APEX error message:
    ORA-20001: get_dbms_sql_cursor error ORA-00942: table or view does not exist
    and error handling function is not invoked at all.
    Is this a feature or a bug?

    Hi,
    Check the corrections given in the note 990764:
    Reason and Prerequisites
    Up to now, using a characteristic with its own master data read class as the InfoProvider was not supported. This is now released but it is not available for all modelings. Using the attributes in the query is not supported for characteristics that have their own master data read class. Using the attributes in the query causes a termination. The following errors may occur in this case:
    ORA-00942: table or view does not exist
    Fehler in CL_SQL_RESULT_SET  Include NEXT_PACKAGE
    RAISE_READ_ERROR in CL_RSDRV_VPROV_BASE
    Solution
    SAP NetWeaver 2004s BI
               Import Support Package 11 for SAP NetWeaver 2004s BI (BI Patch 11 or SAPKW70011) into your BI system. The Support Package is available once Note 0914305 "SAPBINews BI 7.0 Support Package 11", which describes this Support Package in more detail, has been released for customers.
    In urgent cases you can implement the correction instructions.
    The correction instructions contain the tightened inspection for characteristics.
    Regards,
    Anil Kumar Sharma .P

  • Issue with SRDemo error handling

    Hi All,
    Glad the forums are back up and running. In debugging some error-handling issues in our own application, I found an issue in the error handling code of SRDemo. I thought I'd post the issue here, as many of us (myself included) use some SRDemo code as the basis for our own applications.
    The issue can be found in the oracle.srdemo.view.frameworkExt.SRDemoPageLifecycle class, specifically in the translateExceptionToFacesErrors method. I'll show the code that has the issue first, and explain the issue afterwards:
            if (numAttr > 0) {
                Iterator i = attributeErrors.keySet().iterator();
                while (i.hasNext()) {
                    String attrNameKey = (String)i.next();
                     * Only add the error to show to the user if it was related
                     * to a field they can see on the screen. We accomplish this
                     * by checking whether there is a control binding in the current
                     * binding container by the same name as the attribute with
                     * the related exception that was reported.
                    ControlBinding cb =
                        ADFUtils.findControlBinding(bc, attrNameKey);
                    if (cb != null) {
                        String msg = (String)attributeErrors.get(attrNameKey);
                        if (cb instanceof JUCtrlAttrsBinding) {
                            attrNameKey = ((JUCtrlAttrsBinding)cb).getLabel();
                        JSFUtils.addFacesErrorMessage(attrNameKey, msg);
                }Now, this bit of code attempts to be "smart" and only show error messages relating to attributes if those attributes are in fact displayed on the screen. It does so by using a utility method to find a control binding for the attribute name. There are two issues with this code, one obvious, and one that is a bit more subtle.
    The obvious issue: if there is a binding in the page definition, it doesn't necessarily mean that the attribute is shown on the screen. It's a good approximation, but not exact.
    The other issue is more subtle, and led to errors being "eaten," or not shown, in our application. The issue comes if you are using an af:table to display and update your data. In that case, the findControlBinding will not find anything for that attribute, since the attribute is contained within a table binding.
    Just posting this as a word to the wary.
    Best,
    john

    somehow, this message got in the wrong thread....
    Hi Frank,
    Yes, I simply scripted it out this way to contrast the behaviour if the first attribute was read-only vs not read-only. I found the issue on a page in our app that was simply drag-and-drop the VO from the data control on the page.
    It's quite annoying, because our particular use case that hit this error is a "save" button on the page. If the commit operation doesn't return any errors (and it doesn't in this use case!), we add a JSF message saying "save successful" - then the attribute errors are further added later in the page lifecycle, so we get 3 messages: "Save successful" and "Fix this error" and "Tried to set read-only attribute" - quite confusing to the end-user when the only message they should see is "fix this error."
    At any rate, the fix is to simply re-order the attributes in the page definition - that doesn't affect the UI at all, other than to fix this issue.
    John
    it was supposed to be something like:
    Hi Frank,
    Thanks for the reply. I was simply posting this here so that people who use the SRDemo application techniques as a basis for developing the same functionality in their own apps (like me) can be aware of the issue, and avoid lots of head-scratching to figure out "what happened to the error message?"
    John

  • Error Handling in File Adapter

    I have been working on a requirement where the file adapter picks up the file and gives to the BPEL for processing the data.
    So, in order to do Error Handling for file adapter, i have been reading the Oracle documentation for technology adapters. In that, some of the
    points which i felt valuable for my error handling when using file adapter are the uniqueMessageSeparator property, fault-policies for rejected messages,
    and one of the action for rejected messages could be writing the payload to a file or invoking any other webservice.
    In my composite, i have configured the file adapter as a service for reading files, and i defined the xsd using the native format builder....If i put some data like 'aaaa' in the attribute of type integer , the .csv file is being picked up and its being passed to the BPEL without any error ? I believe there should be a translation error...right...
    But i am not getting the error, please tell me if anything is wrong in my xsd....
    Here is my xsd...
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    xmlns:tns="http://TargetNamespace.com/InboundService"
    targetNamespace="http://TargetNamespace.com/InboundService"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    nxsd:version="NXSD"
    nxsd:stream="chars"
    nxsd:encoding="US-ASCII"
    nxsd:hasHeader="true"
    nxsd:headerLines="1"
    nxsd:headerLinesTerminatedBy="${eol}"
    >
    <xsd:element name="names">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="name" minOccurs="1" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="FirstName" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," />
    <xsd:element name="LastName" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," />
    <xsd:element name="Number" type="xsd:integer" nxsd:style="terminated" nxsd:terminatedBy="${eol}" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    And for DB Adapter, there is a property called SchemaValidation, i think that is not there for File adapter, by default it will take care of validation i guess....In another composite, my file adapter is picking up the .xml file and if i put any wrong data over there, that is working fine, i am getting the translation error, but only here in the case of csv file, i am not getting the error. Experts, please help me in this regard...I am using SOA 11G
    Thanks,
    Naresh

    Hi Yatan,
    Thanks for the reply. I did the same way, where my composite is picking up an XML file and translation error is coming. Even the fault policies are working fine, like writing to a file and even invoking other web service. Its really good that you have achieved the same thing in csv files. But the same thing i am unable to achieve when my file adapter is picking up the csv file. I really cant understand where i am doing wrong.
    here is my XSD which i defined through my native builder format...
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    xmlns:tns="http://TargetNamespace.com/FileRecv"
    targetNamespace="http://TargetNamespace.com/FileRecv"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    nxsd:version="NXSD"
    nxsd:stream="chars"
    nxsd:encoding="US-ASCII"
    nxsd:hasHeader="true"
    nxsd:headerLines="1"
    nxsd:headerLinesTerminatedBy="${eol}"
    >
    <xsd:element name="Roots">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="FirstName" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
    <xsd:element name="LastName" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
    <xsd:element name="Number" type="xsd:integer" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    the jca file ..
    <adapter-config name="FileRecv" adapter="File Adapter" wsdlLocation="FileRecv.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
    <connection-factory location="eis/FileAdapter" UIincludeWildcard="n*.csv"/>
    <endpoint-activation portType="Read_ptt" operation="Read">
    <activation-spec className="oracle.tip.adapter.file.inbound.FileActivationSpec">
    <property name="DeleteFile" value="true"/>
    <property name="MinimumAge" value="0"/>
    <property name="PhysicalDirectory" value="C:\files"/>
    <property name="Recursive" value="false"/>
    <property name="PollingFrequency" value="5"/>
    <property name="IncludeFiles" value="n.*\.csv"/>
    <property name="UseHeaders" value="false"/>
    </activation-spec>
    </endpoint-activation>
    </adapter-config>
    I told that the file will contain only 1 record while defining xsd and i kept a record whose values are John , Peter and akjdkjdskj.
    Now if the data is like above, the file is still getting picked up without any translation error and the BPEL is getting completed successfully...
    Is it possible for you to send your sample project and the csv file from which you have defined the xsd to me if you dont mind ?
    Thanks,
    Naresh

  • Error handling in File - XI - SOAP scenario without BPM

    Hello!
    We have a File -> XI -> SOAP scenario without BPM. The problem is that if the Web Service sends back an error XI tries to reprocess the same message again and again instead of taking the next one.
    We do not want set the retry interval to NULL because most error cases are temporary connection problems and then also those messages would not automatically be reprocessed any more.
    We also have to use BE instead of EO, otherwise the Web Service will not return a response. But we need the response to be sure that the processing was successful. The message volume in this scenario is quite high and we do not want to use BPM only for the error handling.
    I know that from SP19 some additional adapter modules are available for async - sync scenarios without BPM. I tried to configure it like described in File - RFC - File without a BPM - Possible from SP 19. but it did not solve the problem. Does anybody have any other ideas? Thanks.
    Regards, Tanja

    Hi Tanja,
    >>>The volume is 3000 messages/day on business days and 700 messages/day during weekends but the traffic will increase in the future
    I think, you should check that out. It is assumedly only 2 days work to build a scenario:
    IDoc -> BP
    BP <-> SOAP/HTTP
    BP -> IDoc (Acknowledgement)
    In the process you need a condition branch, where you decide success or not. You need 2 Interface Mappings for filling the ALEAUD.
    Just send 1000 IDocs to the Test-XI and look to performance monitoring at Runtime Workbench, to find out, how many message will be processed in one hour. Assumedly 3000 and more per day should be possible. The advantage would be to reduce number of systems (no file system) and messages (better monitoring) and using the standard (better maintenance).
    >>>So you are suggesting I should use HTTP adapter and then add the SOAP header manually in a mapping?
    Yes, build the SOAP envelop during the mapping. Most easy is to use XSL or, if your mapping is ready, an additionsal XSL. You can put the error into the Acknowledgement to see it in ERP transaction WE02.
    Filling of ALEAUD fields:
    E1ADHDR/MESTYP: original message type
    E1ADHDR/E1STATE/DOCNUM: original IDoc number
    E1ADHDR/E1STATE/STATUS: 68 in case of error, 53 in case of success
    E1ADHDR/E1STATE/STATXT: Short description for R/3 user what has happend
    I ve done such a scenario several times. That works without any problems.
    Regards,
    Udo

  • IDOC to SOAP asynchronous scenario Error handling

    Need an expert!!!!!!!!! advise on  error handling for IDOC--PI--
    SOAP scenario.This is a asynchronous scenario where PI is calling a Legacy system using SOAP adapter.My question is how i can do error handling in this scenario.If i get an alert in pi with payload variable that would be fine, do i need to use BPM and if that is tthe case what will be steps.
    Appreciate your help.
    Manish

    Hello Manish,
    My question is how i can do error handling in this scenario.
    Use the standard alert framework. Search on SDN / SAP Help for details.
    do i need to use BPM and if that is tthe case what will be steps.
    BPM is not required to raise alerts, as this is an async call.
    Regards,
    Neetesh

Maybe you are looking for