Error records in LSMW

Hi,
     Where do we find error records in lsmw?

Naveen...
Its is not specific...
If you are doing any kind of validations in the programs.... i.e. if u added some logic in the field mapping and conversion step and if  any of the records fails due to those validations u can catch those in convert data step...
If the error related to process then once u process the batch session u can find the errors in the session over view log.....

Similar Messages

  • Handling error records in LSMW

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

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

  • HOW TO DOWNLOAD ERROR RECORDS IN LSMW

    hi abap gurus ,
    i have 2 queries .
    1) first of all how  to identify error records while running in background while using predefined progrmmes .
    2) if there are any error records how to download those error records , can any one give the logic to download the error records while handling LSMW with predefined programmes or
    bapis .
    regards ,
    dinesh .

    1) first of all how to identify error records while running in background while using predefined progrmmes .
    If there is a session for that u can moniter the session in SM35 for the error records.....
    2) if there are any error records how to download those error records , can any one give the logic to download the error records while handling LSMW with predefined programmes or
    bapis .
    Hi,
    In the field mappings and conversion rules,
    in the global section,define an internal table.
    data : begin of it_errors occurs 0,
    desc type string,
    end of it_errors.
    and where ever you have wrong or empty values for the fields,populate error there to the internal table.
    for example, if Material no is blank,i have to give err msg
    IF NOT MATMAS_MRPVIEW-MATNR IS INITIAL.
    BMM00-MATNR = MATMAS_MRPVIEW-MATNR.
    else.
    IT_ERROR-DESC = 'Material no is empty'.
    append it_error.
    SKIP_RECORD. "to skip further processing of this error record.
    ENDIF.
    like this you populate all the error records to that IT_ERRORS internal table.
    and finally download it using GUI_DOWNLOAD in the event
    '__END_OF_PROCESSING__'
    there is another way also, you can create a Session in the LSMW, and record the error records in the session then process the error records in the session
    Hope you got it
    ~~Guduri

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

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

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

  • Error records handling using lsmw

    Hi All,
    Could you please  tell me how can report error records in updating database useing lsmw and related infromation .
    email: [email protected]
    Thanks,
    krishna.

    in the field mappings and conversion rules,
    in the global section,define an internal table.
    data : begin of it_errors occurs 0,
            desc type string,
           end of it_errors.
    and where ever you have wrong or empty values for the fields,populate error there to the internal table.
    for example, if Material no is blank,i have to give err msg
    IF NOT MATMAS_MRPVIEW-MATNR IS INITIAL.
      BMM00-MATNR = MATMAS_MRPVIEW-MATNR.
    else.
      IT_ERROR-DESC = 'Material no is empty'.
      append it_error.
      SKIP_RECORD. "to skip further processing of this error record.
    ENDIF.
    like this you populate all the error records to that IT_ERRORS internal table.
    and finally download it using GUI_DOWNLOAD in the <b>event
    '__END_OF_PROCESSING__'</b>
    Hope you got it.
    Regards,
    Srikanth

  • LSMW error records

    Hi,
    One basic doubt..when we use LSMW for conversion of huge amount of any data.For e.g if we have 1000 Customer Master records in the input file. After running the LSMW, if many posted successfully and if few fail due to data error, how will trace the error records? How can we get those error records alone, to send it back to the Legacy system, for them to correct and resend those records again?
    And how else can we avoid duplication?
    Thanks
    Swetha.

    You can use the Report RSBDC_PROTOCOL to get the log of the session.
    One thing you can do is, run the same session again with the mode "Error only". System will stop at the errors. Correct those errors manually.
    Regards,
    Naimesh Patel

  • LSMW- Download error records to a file

    Hi Experts,
       I have a query regarding error handling in LSMW using Direct Input method.
    I want to upload a file using Direct Input method in LSMW(for material master).
    Once the upload is done, there may be some records which cannot be uploaded due to some errors.
    I want to download such records in the same structure as the source structure was, to the presentation server.
    I know i can validate in the conversion and mapping step, but i cannot find all the conditions when a upload will fail.
    Can Somebody guide me in this regard?
    Thanks and regards,
    Ravi kanth Talagana

    Bump...

  • Errors record handling in LSMW

    Hai,
      Could u please tell me, How can I process error record during uploading by using LSMW.
    Thanking You
    murali

    Hi,
    In the field mappings and conversion rules,
    in the global section,define an internal table.
    data : begin of it_errors occurs 0,
    desc type string,
    end of it_errors.
    and where ever you have wrong or empty values for the fields,populate error there to the internal table.
    for example, if Material no is blank,i have to give err msg
    IF NOT MATMAS_MRPVIEW-MATNR IS INITIAL.
    BMM00-MATNR = MATMAS_MRPVIEW-MATNR.
    else.
    IT_ERROR-DESC = 'Material no is empty'.
    append it_error.
    SKIP_RECORD. "to skip further processing of this error record.
    ENDIF.
    like this you populate all the error records to that IT_ERRORS internal table.
    and finally download it using GUI_DOWNLOAD in the event
    '__END_OF_PROCESSING__'
    there is another way also, you can create a Session in the LSMW, and record the error records in the session then process the error records in the session
    Hope you got it
    Regards
    Sudheer

  • Error while doing LSMW

    Hi, Freinds
    I m getting error while doing LSMW.
    In the step <b>Convert Data</b> it gives the following error <i>'Syntax error in program /icadmc/sap_lsmw_conv_0000027
    line 27
    for type 'C' a maximum length specification of 65535 is allowed'</i>
    Please Help
    Its Urgent
    Regards

    Hello,
    Try to convert the same file in the development server. May be some records get wired in your file.
    Regards,
    Naimesh

  • Display Error Message in LSMW

    Hi,
       I want to display the error records that did not get updated thru the transaction, using the LSMW tool... Please tell me how can I display where & in which record the error has occured...
    Thank You,
    Seema.

    Hi Seema,
    As Rick pointed out, it all depends on which method you chose and in most cases, you may not have a direct link between the errors and records in your file that caused it.
    In LSMW, you will pick a method(BAPI, IDOC, call transaction, Batch Input, Direct Input etc). All LSMW does is to convert your input file data into a format that is used by the method you used. As you may be aware of, your input file will be stored first as 'READ' file and then as a 'CONVERSION' file. It is this 'CONVERTED' file that is used by the method you use.
    After the file is being processed by the method, if error occurs, it goes into whatever error logging mechanism that is available with the method you chose. For instance, if Batch Input program is chosen, then your error log may in the SM35 session log, or if a IDOC is chosen, then it may be in the IDOC status records.
    If you give us what you are doing in LSMW, a more direct solution may be found.
    Srinivas

  • Error record

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

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

  • Error Record in report

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

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

  • What are the main steps to be taken care while doing recording for LSMW

    Hi,
    I am facing problem in LSMW.
    Can anybody suggest me that What are the main steps to be taken care while doing recording for LSMW for recording mm01 ?
    thanks'
    naresh

    Hi,
    Recording in LSMW is similar as SHDB.
    in LSMW after you give Project-Subproject and Object.
    1)Go to-> Maintain Object Attributes -> double click
    2)Press Display/Change Button at top left to make editable mode.
    3)Select radiobuton -> Batch Input -> Give Recording name say Z_mm01
    4) Click the Recording Overview boton on right -> Give TCode which u want to record....
    Rest refer the Document link attached.
    Please find the links to various threads on the same.
    Re: LSMW - Using a BAPI
    BAPI, IDOC in LSMW
    Upload the data in LSMW using BAPI
    This one is the most complete document for the same
    http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
    http://service.sap.com/lsmw.
    Regards
    Kiran

  • Issue regarding bdc for capturing error records

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

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

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

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

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

Maybe you are looking for

  • How do I find out another computer's IP address on the network?

    About ten minustes ago, I noticed a PC appearing on our local Airport network. Since the network is password protected, it startled me. That computer has no business on our network, and since sometimes internet is extremely slow and we even got an em

  • [Request] Amazon MP3 Downloader

    Amazon has released a Linux version of the Amazon MP3 Downloader program.  It allows you to purchase and download entire albums of DRM-free MP3s at a discount over buying the MP3s one at a time. They've only packaged it for Ubuntu, Debian, Fedora, an

  • Java.io.UnsupportedEncodingException

    Hello. I am trying to parse an XML file into its DOM representation. The XML files starts with this line: <?xml version="1.0" encoding="X-User-Defined"?>My code for parsing the XML is this: DocumentBuilderFactory factory = DocumentBuilderFactory.newI

  • Sound is tooooo low, what should i do?

    as i sad in the title, the sound of my n73 is too low. it is almost impossible to hear the other side. but the sound of the headphone is perfect. the problem is on the speaker of the phone for sure. what should i do? can i do it or do ı have to take

  • Function module to change the partner of partner function of an order

    Hi All,       I want to change a partner of a particular partner function related to an order if a condition is satisfied. That is if a condition is satisfied then the earlier partner assigned to the partner function should be changed and new partner