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

Similar Messages

  • 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

  • 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

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

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

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

  • Workspace  error.pls its urgent

    Hi All,
    I have installed hyperion 11.1.1.2 version.When I have configured workspace,I am getting the following error"Register with shared services status is failed"
    Anyone could help me for this.
    Please its Urgent for me.
    Many thanks to all
    selva

    hmmmm... this is a forum... not an online training portal....
    You can google and find out how to create JSP(stepwise)
    http://java.sun.com/products/jsp/docs.html

  • 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

  • Regarding BDC for CO02

    Hi All,
    Iam facing a peculiar problem in BDC for CO02  for Collective orders. While recording, I have captured the ok_code for the Push button 'Read Order' . But while processing it , it stops exactly after displaying the list. Here I need to click manually on 'Read Order' to continue the processing. I think the problem comes because the list displayed is a ALV tree.Can anybody please suggest a solution if they faced it earlier.
    Please let me know if you need any details. Points will be rewarded to the useful answers.
    Thanks,
    Manjula.S

    HI Manjula
    I am facing a similar kind of issue to process the BDC for tree sture
    Please advice

  • Regarding BDC for CO01

    Hi Friends,
    Can anybody help me for BDC CODE for CO01(Create production order).
    This is 1st time i am using BDC for CO01. I don't know how to do recording of CO01.
    How many fields are mandatory? Or Anyother way to Create production orde.(Like FM or BAPI)
    Thanks And Regards,
    Amit

    Amit,
    Here is a trick (you can treat it as method) to know mandatory fields for BDC method.
    1. Go to your transaction code, I guess you are working 'co01'.
    2. Press 'Enter' on the screen, you would be asked to enter value for a field-enter correct value and then press enter, next you may be asked to enter value for another field....continue until you don't get any error/warning.
    3. You will be taken to next/second screen if you were successful entering correct values in the first screen.
    4. Mean while, note down those fields that you have filled.
    5. Follow above steps until you are done with all screens.
    6. Next you can start recording from T.Code 'SHDB'.
    Reply to the post if you have any question in the explanation.

  • Regarding BDC for MB31

    Hi,
    Can anybody help me for  BDC CODE for MB31(Goods Receipt for Production Order).
    This is 1st time i am using BDC for MB31. I don't know how to do recording of MB31.
    How many fields are mandatory? Or Anyother way to create Good Receipt.(Like FM or BAPI)
    Thanks And Regards,
    Amit

    Hi Amit,
    Use following function module to create Goods receipt:
    MB_CREATE_GOODS_MOVEMENT
    The function module provides a general interface for posting goods movements.
    Hope this helps.
    Regards,
    Abhijeet

  • Regarding bdc for automatic run

    hi experts,
                    i have developed a bdc for hr in which the data is uploading from the excel sheet,what my user wants that this report will run automatically at 11 pm every day so for this send me the steps for this i know i have to exceute it in the background but how plz help me ...
    ***plz dnt send me the url come up with your own answer....
    thnx in advance.....

    Hi RAVI,
    if u've created the BDC in call transaction method, then create a variant for the selection screen with the relevant data. and create a scheduled job from SM36.
    in case of session: u need to schedule the two programs in SM36.
    1st the bdc program to create the session and next the program RSBDCSUB with variants. in case of scheduling RSBDCSUB session name & other details should be saved in the variants.
    Reward if useful
    Regards
    ANUPAM

  • BDC for every 80 records

    Dear All,
    I have one typical BDC problem.
    If the number of records in file are crossing 80,my bdc is giving problem. So I need to split total records into sets of 80 and submit them.
    So I need to create the session name dynamically, pass the data dynamically.
    IF you can send some example code for the above it will be great help for me.
    Many Thanks,
    Ranjan

    Please find my code..
    This info may be useful..
    I'm doing BDC for KB31N tcode,where i have two items in header(doc date, posting date).Multiple line items(each line item should consists of 4 fields namely cost center,statistical key figure,total qty,text).
    When i'm sending more than 80 rec records i'm being populated an error message "BDC_Close_group, session not opened"
    Kindly advice me how to handle this
    *& Report  ZCO_I025_WSKAZNIKI_STAT_DEV                                 *
    *& Interfejs wczytywania wskaŸników statystycznych                     *
    REPORT  zco_i025_wskazniki_stat_dev                                 .
    TYPES: BEGIN OF l_tab_dane,
        indic LIKE rk23f-stagr,
        quant LIKE rk23f-mbgbtr,
        mpk LIKE rk23f-ekostl,
        order LIKE rk23f-eaufnr,
        text LIKE rk23f-sgtxt,
      END OF l_tab_dane.
    DATA: it_excel TYPE TABLE OF alsmex_tabline,
      wa_excel TYPE alsmex_tabline,
      it_data TYPE TABLE OF l_tab_dane,
      wa_data TYPE l_tab_dane,
      error  TYPE C,
      msg TYPE string.
    DATA:iv_pole TYPE string,
      ddatum(10),
      kdatum(10),
    *Inserted By  Developer
       filelist    TYPE filetable,
            rc          TYPE i.
    DATA: BEGIN OF bdctab OCCURS 5.
            INCLUDE STRUCTURE bdcdata.
    DATA: END OF bdctab.
    SELECTION-SCREEN BEGIN OF BLOCK p1 WITH FRAME TITLE text-001.
    PARAMETERS:
      p_zakla LIKE tka01-kokrs DEFAULT '1000',
      p_ddate LIKE sy-datum DEFAULT sy-datum,
      p_kdate LIKE sy-datum DEFAULT sy-datum.
    SELECTION-SCREEN ULINE.
    PARAMETERS:
      p_fname LIKE rlgrap-filename.  " DEFAULT 'd:dane.xls'.
    SELECTION-SCREEN END OF BLOCK p1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          file_filter       = cl_gui_frontend_services=>filetype_excel
         multiselection    = 'X'
        CHANGING
          file_table        = filelist
          rc                = rc.
      IF LINES( filelist ) IS INITIAL.
        EXIT.
      ENDIF.
      READ TABLE filelist INDEX 1 INTO p_fname.
    START-OF-SELECTION.
    AUTHORITY-CHECK OBJECT 'TKA01'
      ID 'KOKRS' FIELD p_zakla.
    CONCATENATE p_ddate6(2) '.' p_ddate4(2) '.' p_ddate(4) INTO ddatum.
    CONCATENATE p_kdate6(2) '.' p_kdate4(2) '.' p_kdate(4) INTO kdatum.
    error = '0'.
    PERFORM wczytaj_dane.
    IF error = '0'.
      PERFORM utworz_sesje.
      PERFORM wprowadz_dane.
        PERFORM zamknij_sesje.   "comment by prav
    ENDIF.
    PERFORM zamknij_sesje.        "add by prav
    IF error = '1'.
      WRITE: msg, /.
    ENDIF.
    WRITE: 'Wykonano', /.
    *&      Form  wczytaj_dane
          text
    FORM wczytaj_dane.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = p_fname
          i_begin_col             = 1
          i_begin_row             = 1
          i_end_col               = 8
          i_end_row               = 65000
        TABLES
          intern                  = it_excel
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
        WRITE: / 'B³ad importu pliku wejsciowego: ', p_fname, ' - ',
        sy-subrc.
      ELSE.
        SORT it_excel BY row col.
        LOOP AT it_excel INTO wa_excel.
          IF wa_excel-row = 1.
            CONTINUE.
          ENDIF.
          iv_pole = wa_excel-value.
          CASE wa_excel-col.
            WHEN 1. wa_data-indic = iv_pole.
            WHEN 2.
              REPLACE ',' WITH '.' INTO iv_pole.
              wa_data-quant = iv_pole.
            WHEN 3. wa_data-mpk = iv_pole.
            WHEN 4. wa_data-order = iv_pole.
            WHEN 5. wa_data-text = iv_pole.
          ENDCASE.
          AT END OF row.
            IF wa_data-mpk IS INITIAL AND wa_data-order IS INITIAL.
              error = '1'.
              WRITE:
    'Musi byæ podane Stanowisko kosztów lub Zlecenie wewnêtrzne. Rekord: ',
              wa_excel-row, /.
              EXIT.
            ENDIF.
            IF wa_data-mpk IS NOT INITIAL AND wa_data-order IS NOT INITIAL.
              error = '1'.
              WRITE:
    'Musi byæ podane Stanowisko kosztów lub Zlecenie wewnêtrzne. Rekord: ',
              wa_excel-row, /.
              EXIT.
            ENDIF.
            IF wa_data-indic IS INITIAL.
              error = '1'.
              WRITE: 'Brak identyfikatora wskaŸnika. Rekord: ', wa_excel-row
              EXIT.
            ENDIF.
            IF wa_data-quant IS INITIAL.
              error = '1'.
              WRITE: 'Brak informacji o iloœci. Rekord: ', wa_excel-row, /.
              EXIT.
            ENDIF.
            APPEND wa_data TO it_data.
            CLEAR wa_data.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "wczytaj_dane
    *&      Form  wprowadz_dane
          text
    FORM wprowadz_dane.
      DATA:licznik TYPE i,
        l_txt TYPE string,
        pole(30) TYPE c,
        liczba(15) TYPE c.
      PERFORM bdc_dynpro      USING 'SAPLSPO4' '0300'.
      PERFORM bdc_field       USING 'BDC_CURSOR' 'SVALD-VALUE(01)'.
      PERFORM bdc_field       USING 'BDC_OKCODE' '=FURT'.
      PERFORM bdc_field       USING 'SVALD-VALUE(01)' p_zakla.
      PERFORM bdc_dynpro      USING 'SAPLK23F1' '1200'.
      PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
      PERFORM bdc_field       USING 'COHEADER-SEND_REC_REL' '03SAP'.
      PERFORM bdc_field       USING 'RK23F-STATUS' 'L'.
      PERFORM bdc_field       USING 'COHEADER-BLDAT' ddatum.
      PERFORM bdc_field       USING 'COHEADER-BUDAT' kdatum.
      PERFORM bdc_field       USING 'BDC_CURSOR' 'EKOSTL(1)'.
      licznik = 0.
      LOOP AT it_data into wa_data.
        ADD 1 TO licznik.
        l_txt = licznik.
        CONCATENATE 'EL4(' l_txt ')' INTO pole.
        condense pole no-gaps.
        PERFORM bdc_field USING pole wa_data-indic.
        CONCATENATE 'ELR1(' l_txt ')' INTO pole.
           condense pole no-gaps.
          liczba = wa_data-quant.
          if liczba <  0.
              shift liczba circular  left up to '-'.
          endif.
            condense liczba no-gaps.
        PERFORM bdc_field USING pole liczba.
        IF NOT wa_data-mpk IS INITIAL.
          CONCATENATE 'EL2(' l_txt ')' INTO pole.
             condense pole no-gaps.
          PERFORM bdc_field USING pole wa_data-mpk.
        ENDIF.
        IF NOT wa_data-order IS INITIAL.
          CONCATENATE 'EL3(' l_txt ')' INTO pole.
             condense pole no-gaps.
          PERFORM bdc_field USING pole wa_data-order.
        ENDIF.
        CONCATENATE 'EL8(' l_txt ')' INTO pole.
           condense pole no-gaps.
        PERFORM bdc_field USING pole wa_data-text.
      ENDLOOP.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          tcode            = 'KB31N'
        TABLES
          dynprotab        = bdctab
        EXCEPTIONS
          internal_error   = 1
          not_open         = 2
          queue_error      = 3
          tcode_invalid    = 4
          printing_invalid = 5
          posting_invalid  = 6
          OTHERS           = 7.
      IF sy-subrc <> 0.
        WRITE: / text-010 .
      ENDIF.
      REFRESH bdctab.
    clear:bdctab.        "by praveen
    ENDFORM.                    "wprowadz_dane
    *&      Form  bdc_dynpro
          text
         -->PROGRAM    text
         -->DYNPRO     text
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdctab.
      MOVE:
        program   TO bdctab-program,
        dynpro    TO bdctab-dynpro,
        'X'       TO bdctab-dynbegin.
      APPEND bdctab.
    ENDFORM.                    "bdc_dynpro
    *&      Form  bdc_field
          text
         -->POLE       text
         -->WARTOSC    text
    FORM bdc_field USING pole wartosc.
      CLEAR bdctab.
      MOVE:
        pole     TO bdctab-fnam,
        wartosc  TO bdctab-fval.
      APPEND bdctab.
    ENDFORM.                    "bdc_field
    *&      Form  utworz_sesje
          text
    FORM utworz_sesje.
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          client = sy-mandt
          group  = 'WSKASTAT'
          user   = sy-uname
          keep   = 'X'.
    ENDFORM.                    "utworz_sesje
    *&      Form  zamknij_sesje
          text
    FORM zamknij_sesje.
      CALL FUNCTION 'BDC_CLOSE_GROUP'.
      IF sy-subrc NE 0.
        WRITE: /, 'B³ad podczas zamykania sesji'.
        EXIT.
      ENDIF.
    ENDFORM.                    "zamknij_sesje

  • Creating session for the Error records

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

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

  • Listing BDC session method error records

    Hi ABAP'rs,
                     Can any one help me, how to show error records of BDC session method on the List screen.
                                        Thanks and Regards,
                                                              Param.

    Hi,
    goto sm35 and find the error logs.
    what do you mean by list screen...do you mean in ort output ?
    Regards,
    pankaj singh

  • Can a Web Service be Connected to XI for Capturing Error Messages?

    Hello,
    Several years we developed a Web Service from Sap to Sharepoint. The issue is that we often get an "Error at Target of Invocation" intermittently. The first thing we do of course is to make sure the SAP connection password has not expired. Also, whenever mapping is changed we use the Web Service to create a new WSDL file that is compatible. Importantly, we assume that the connection from a Sharepoint is being made, because to run one of the processes from Sharepoint, while connecting to SAP, there is  no problem. However, when we run a different process that uses the same Sharepoint to SAP connection, we get the error at target of invocation message.
    The .NET developer will sometimes recycle the Sharepoint process that clears the cache, and for now, we think, that may be the issue. Still we are not positive, and this message does not reveal the real issue. Is there a way to connect the Web Service to XI to capture any issues in between the two systems that would uncover what the real issue is?
      Thanks, Tom M.

    Hi Tom,
    AFAIK  We can raise alerts in PI system , if any messages fail for the interface (PI to .Net Webservice). But if any connection issue occurred , Receiver server will be having more information/log traces why exactly connection occurred. I will recommend to get the trace from receiver system (Server on which Webservice was hosted) and analyze the trace and find the root cause.
    Thanks
    Hari.

  • Regarding BDC for QA01 ( inspection lot creation )

    I am creating an inspection lot in qa01.
    I am getting a model dialog box in between.
    The dialog box contains 3 group counter values ( say 5
                                                          6
                                                          7 )
    I need to Pick only only one group counter value.
    The value that needs to be picked is contained in a
    variable ( wl_gpcntr).
    Also, i have an internal table with all the group counters.
    So, i can get the index of the group counter which i
    need to filled in the inspection lot.
    Then i concatenated the field name with the index.
      ( PLKO-PLNAL(index of the group counter) ) into the
       screen field wl_grp_cntr and passed to the BDC_field
       subroutine.
    In the BDC steps, i have given
      PERFORM bdc_dynpro     USING 'SAPLCPSE' '2110'.
      PERFORM bdc_field :    USING 'BDC_CURSOR'
                                                wl_grp_cntr,
                             USING 'BDC_OKCODE' '=PICK'.
       Now, the Problem is
        In ALL SCREEN mode it is working perfectly,
        but in NO SCREEN mode it is creating an inspection
        lot but with blank group counter.
        kindly need suggestion.

    Hi,
    If you have activated two inspection types (eg 01, 0101) of same inspection lot origin (01), in material master you should  have a preferred indicator set for the inspection type for which you want to be selected when you perform goods receipt.
    This check box is available in the inspection type set up in the Material master.
    Also check whether the post to inspection stock indicator is set for the material (in the inspection type), then only material will be posted to inspection stock.
    Please confirm, what happens to the stock after making MIGO. check in MMBE and confirm
    Go through the link and maintain the necessary settings. I think default settings for 01 type should work.
    http://help.sap.com/saphelp_470/helpdata/en/2d/350e4d448c11d189420000e829fbbd/content.htm
    Regards
    Hari

Maybe you are looking for

  • X-Fi Fatal1ty - Smart Recorder will not work in

    I think the 64-bit drivers for this puppy are still buggy. When I try to record my vinyl albums through Smart Record, Wave Studio or even the basic Windows Sound Recorder, I get screeching noise on playback. Everything appears to record normally, but

  • Problem removing Objects from the stage in Flash CS4 (AS3.0)

    I have a problem with this code: this.addEventListener(Event.ENTER_FRAME, vanish); function vanish(event:Event):void{      if(character_mc.hitTestObject(vanish_mc)){           vanish_mc.parent.removeChild(vanish_mc); There are two overlapping objects

  • Cheque Writer (Generic) Error: HR_6882_HRPROC_ASSERT LOCATION pyjavaco:1

    hey hope all is fine with you all gurus i am getting the following error when i run the post payroll process called "Cheque Writer (Generic)" process it ends with RED color: HR_6882_HRPROC_ASSERT LOCATION pyjavaco:1 APP-PAY-06882: Assertion failure d

  • "invalid destination address" sending mms

    Whenever I try to send a picture message (or any sort of MMS really), it says "pending" for a few seconds then says "sending" and after a few more seconds it finally says the message failed and a note pops up that says "invalid destination address" N

  • Content removed by author...

    Content removed by author due to concern voiced about this posting being "spam"... Thanks, Mike