Problem in BDC: Catching error messages (Urgent)

Hello Experts,
I want to catch the error message coming in the form of popup using Call Transaction in background mode.
I have used the following statement.
CALL TRANSACTION 'FBZ5' USING bdcdata MODE 'N' messages into bdcmsg.
But this statement catches only the messages which are displayed in the task bar. It doesn't catch the error message in the form of popup.
Please suggest any solution to this.
Thanks.
Radhika

Hi Radhika ,
try this one,
DATA : BDCMSGCOLL TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE,
       BDCDATA TYPE TABLE OF BDCDATA WITH HEADER LINE.
<b>CALL TRANSACTION 'MM01' USING BDCDATA MODE N UPDATE S MESSAGES INTO BDCMSGCOLL.</b>
IF SY-SUBRC <> 0.
  PERFORM ERR.
  CLEAR I_MSG.
  REFRESH I_MSG.
ENDIF.
*&      Form  ERR
      text
-->  p1        text
<--  p2        text
form ERR .
DATA V_MSG(255) TYPE C.
READ TABLE I_MSG WITH KEY MSGTYP = 'E'.
IF SY-SUBRC = 0.
  CALL FUNCTION 'FORMAT_MESSAGE'
   EXPORTING
     ID              = I_MSG-MSGID
     LANG            = 'E'
     NO              = I_MSG-MSGNR
     V1              = I_MSG-MSGV1
     V2              = I_MSG-MSGV2
     V3              = I_MSG-MSGV3
     V4              = I_MSG-MSGV4
   IMPORTING
     MSG             = V_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.
  WRITE V_MSG. " Error Message Displayed Here.
  CLEAR V_MSG.
ENDIF.
endform.                    " ERR
Regards,
Vijay.

Similar Messages

  • Catching Error Message

    Hi,
    Question : could you please tell me how to catch footer error message?
    Background :
    I am working with FM L_TO_CREATE_SINGLE .
    This FM has so many exceptions and I am catching those in my custom program.
    the problem is FM is throwing error message while it executes and simply coming out of my custom program and displaying error message at footer so I am not able to catch error message.
    Please help me how to catch this error and see my code below
            CALL FUNCTION 'L_TO_CREATE_SINGLE'
              EXPORTING
                I_LGNUM                     = '620'
                I_BWLVS                     = '999'
                I_MATNR                     = WA_RECORD_OUT-MATNR
                I_WERKS                     = WA_RECORD_OUT-WERKS
                I_ANFME                     = WA_PHY_INV_HIS-QUANTITY
                I_ALTME                     = WA_PHY_INV_HIS-UNIT_OF_MEASURE
               I_SQUIT                     = 'X'
               I_VLTYP                     = WA_RECORD_OUT-LGTYP
               I_VLPLA                     = WA_RECORD_OUT-LGPLA
               I_VLENR                     = WA_PHY_INV_HIS-STO_UNIT
               I_NLTYP                     = WA_PHY_INV_HIS-STO_TYPE
               I_NLPLA                     = WA_PHY_INV_HIS-STO_BIN
               I_COMMIT_WORK               = 'X'
               I_BNAME                     = SY-UNAME
               I_KOMPL                     = 'X'
             IMPORTING
               E_TANUM                     = I_TANUM
            EXCEPTIONS
               NO_TO_CREATED               = 1
               BWLVS_WRONG                 = 2
               BETYP_WRONG                 = 3
               BENUM_MISSING               = 4
               BETYP_MISSING               = 5
               FOREIGN_LOCK                = 6
               VLTYP_WRONG                 = 7
               VLPLA_WRONG                 = 8
               VLTYP_MISSING               = 9
               NLTYP_WRONG                 = 10
               NLPLA_WRONG                 = 11
               NLTYP_MISSING               = 12
               RLTYP_WRONG                 = 13
               RLPLA_WRONG                 = 14
               RLTYP_MISSING               = 15
               SQUIT_FORBIDDEN             = 16
               MANUAL_TO_FORBIDDEN         = 17
               LETYP_WRONG                 = 18
               VLPLA_MISSING               = 19
               NLPLA_MISSING               = 20
               SOBKZ_WRONG                 = 21
               SOBKZ_MISSING               = 22
               SONUM_MISSING               = 23
               BESTQ_WRONG                 = 24
               LGBER_WRONG                 = 25
               XFELD_WRONG                 = 26
               DATE_WRONG                  = 27
               DRUKZ_WRONG                 = 28
               LDEST_WRONG                 = 29
               UPDATE_WITHOUT_COMMIT       = 30
               NO_AUTHORITY                = 31
               MATERIAL_NOT_FOUND          = 32
               LENUM_WRONG                 = 33
               OTHERS                      = 34       .
            IF SY-SUBRC <> 0.
              CASE sy-subrc.
                WHEN 1.  MESSAGE = 'no_to_created'.
                WHEN 2.  MESSAGE = 'bwlvs_wrong' .
                WHEN 3.  MESSAGE = 'betyp_wrong'.
                WHEN 4.  MESSAGE = 'benum_missing'.
                WHEN 5.  MESSAGE = 'betyp_missing'.
                WHEN 6.  MESSAGE = 'foreign_lock'.
                WHEN 7.  MESSAGE = 'vltyp_wrong'.
                WHEN 8.  MESSAGE = 'vlpla_wrong'.
                WHEN 9.  MESSAGE = 'vltyp_missing'.
                WHEN 10. MESSAGE = 'nltyp_wrong'.
                WHEN 11. MESSAGE = 'nlpla_wrong'.
                WHEN 12. MESSAGE = 'nltyp_missing'.
                WHEN 13. MESSAGE = 'rltyp_wrong'.
                WHEN 14. MESSAGE = 'rlpla_wrong'.
                WHEN 15. MESSAGE = 'rltyp_missing'.
                WHEN 16. MESSAGE = 'squit_forbidden'.
                WHEN 17. MESSAGE = 'manual_to_forbidden'.
                WHEN 18. MESSAGE = 'letyp_wrong'.
                WHEN 19. MESSAGE = 'vlpla_missing'.
                WHEN 20. MESSAGE = 'nlpla_missing'.
                WHEN 21. MESSAGE = 'sobkz_wrong'.
                WHEN 22. MESSAGE = 'sobkz_missing'.
                WHEN 23. MESSAGE = 'sonum_missing'.
                WHEN 24. MESSAGE = 'bestq_wrong'.
                WHEN 25. MESSAGE = 'lgber_wrong'.
                WHEN 26. MESSAGE = 'xfeld_wrong'.
                WHEN 27. MESSAGE = 'date_wrong'.
                WHEN 28. MESSAGE = 'drukz_wrong'.
                WHEN 29. MESSAGE = 'ldest_wrong'.
                WHEN 30. MESSAGE = 'update_without_commit'.
                WHEN 31. MESSAGE = 'no_authority'.
                WHEN 32. MESSAGE = 'material_not_found'.
                WHEN 33. MESSAGE = 'lenum_wrong'.
                WHEN 34. MESSAGE = 'ERROR_MESSAGE'.
                WHEN OTHERS.
                  message id sy-msgid type sy-msgty number sy-msgno with
                          sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              ENDCASE.
    Thanks
    SB

    Hi I have resloved it myself. here is the working code, thanks for all your help
    CALL FUNCTION 'L_TO_CREATE_SINGLE'
              EXPORTING
                I_LGNUM                     = '620'
                I_BWLVS                     = '999'
                I_MATNR                     = WA_RECORD_OUT-MATNR
                I_WERKS                     = WA_RECORD_OUT-WERKS
                I_ANFME                     = WA_PHY_INV_HIS-QUANTITY
                I_ALTME                     = WA_PHY_INV_HIS-UNIT_OF_MEASURE
               I_SQUIT                     = 'X'
               I_VLTYP                     = WA_RECORD_OUT-LGTYP
               I_VLPLA                     = WA_RECORD_OUT-LGPLA
               I_VLENR                     = WA_PHY_INV_HIS-STO_UNIT
               I_NLTYP                     = WA_PHY_INV_HIS-STO_TYPE
               I_NLPLA                     = WA_PHY_INV_HIS-STO_BIN
               I_COMMIT_WORK               = 'X'
               I_BNAME                     = SY-UNAME
               I_KOMPL                     = 'X'
             IMPORTING
               E_TANUM                     = I_TANUM
             EXCEPTIONS
               NO_TO_CREATED               = 1
               BWLVS_WRONG                 = 2
               BETYP_WRONG                 = 3
               BENUM_MISSING               = 4
               BETYP_MISSING               = 5
               FOREIGN_LOCK                = 6
               VLTYP_WRONG                 = 7
               VLPLA_WRONG                 = 8
               VLTYP_MISSING               = 9
               NLTYP_WRONG                 = 10
               NLPLA_WRONG                 = 11
               NLTYP_MISSING               = 12
               RLTYP_WRONG                 = 13
               RLPLA_WRONG                 = 14
               RLTYP_MISSING               = 15
               SQUIT_FORBIDDEN             = 16
               MANUAL_TO_FORBIDDEN         = 17
               LETYP_WRONG                 = 18
               VLPLA_MISSING               = 19
               NLPLA_MISSING               = 20
               SOBKZ_WRONG                 = 21
               SOBKZ_MISSING               = 22
               SONUM_MISSING               = 23
               BESTQ_WRONG                 = 24
               LGBER_WRONG                 = 25
               XFELD_WRONG                 = 26
               DATE_WRONG                  = 27
               DRUKZ_WRONG                 = 28
               LDEST_WRONG                 = 29
               UPDATE_WITHOUT_COMMIT       = 30
               NO_AUTHORITY                = 31
               MATERIAL_NOT_FOUND          = 32
               LENUM_WRONG                 = 33
               ERROR_MESSAGE               = 99
               OTHERS                      = 34.
            IF SY-SUBRC NE 0.
              CALL FUNCTION 'FORMAT_MESSAGE'
                EXPORTING
                  ID        = SY-MSGID
                  LANG      = '-D'
                  NO        = SY-MSGNO
                  V1        = SY-MSGV1
                  V2        = SY-MSGV2
                  V3        = SY-MSGV3
                  V4        = SY-MSGV4
                IMPORTING
                  MSG       = MESSAGE
                EXCEPTIONS
                  NOT_FOUND = 1
                  OTHERS    = 2.
           ENDIF.
    Edited by: Rob Burbank on Oct 12, 2011 3:44 PM

  • TS2634 My problem - when syncing and error messages  comes up:  iTunes could not sync calendars to the iPhone because an error occurred while margin data."  I've tried turning the phone off and back on, & tried both USB ports but get the same thing.  What

    My problem - when syncing and error messages  comes up:  iTunes could not sync calendars to the iPhone because an error occurred while margin data."  I've tried turning the phone off and back on, & tried both USB ports but get the same thing.  What can I do next since it doesn't give me even one clue as to what the error would be?

    Before I started to resync calendars one by one as suggested in the troubleshooting article, I remembered something that came up in a sync when I first attempted :  a 'which one do you want to keep' message about a repeating calendar event, which came up with three options, one from Calendar, and two from iCal on the phone.  I deleted that event, then went through the calendar resync one by one, and all seems OK now.
    In Music there is a way to find 'ghost' items that show up as grayed-out on the menus, so that you can try to reassociate or delete them.  It would be nice to have a similar way to work with Calendar!
    Thanks for pointing me to the right article.

  • What do I need to do to fix a problem such as an error message stating "iTunes has stopped working"?

    What do I need to do to fix a problem such as an error message stating "iTunes has stopped working"?

    Hello westerboy,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iTunes for Windows XP: Troubleshooting unexpected quits, freezes, or launch issues
    http://support.apple.com/kb/ts1421
    Best of luck,
    Mario

  • Problem installing i tunes Error message in Dialoque Box

    Problem installing i tunes Error message  in a Error Box "Installation source for this product not available, verify source exisits , - The feature you are trying to use is on a network resourse that is unavaialble
    Also message reads  Installation source for this product is not available, verify source exists
    I have tried to unistall I tunes using Revo Uninstaller, and get the same message box as when I'mtrying to install I tunes
    I have downloaded the latest version, but cannot install it, I have tried to re -install from my computer an old version, but a message come back stating a newer version is already installed, have selected the two boxes in the Dialoque box and the same message comes back
    Please help

    "Installation source for this product not available, verify source exisits , - The feature you are trying to use is on a network resourse that is unavaialble
    Which particular .msi file (or files) does the message (or messages) go on to say cannot be found? (Several different .msi files might be mentioned in this context: itunes.msi, bonjour.msi, AppleSoftwareUpdate.msi, etc.)

  • OLE Automation: catch error message

    Hi, Experts.
    I am interested in catching error messages after OLE commands. I show it in Excel example, but interested in general:
    REPORT zlcka_ole .
    TYPE-POOLS ole2.
    DATA h_excel TYPE ole2_object.
    DATA h_workbooks TYPE ole2_object.
    DATA h_workbook TYPE ole2_object.
    DATA h_range TYPE ole2_object.
    CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
    SET PROPERTY OF h_excel 'Visible' = 1.
    CALL METHOD OF h_excel 'Workbooks' = h_workbooks.
    CALL METHOD OF h_workbooks 'Add' = h_workbook.
    CALL METHOD OF h_excel 'Rows' = h_range
      EXPORTING
        #1 = 3.
    SET PROPERTY OF h_range 'Name' = 'TEST'.
    CALL METHOD OF h_excel 'Range' = h_range
      EXPORTING
        #1 = 'TEST'.
    SET PROPERTY OF h_range 'Hidden' = 1.
    WRITE / sy-subrc.
    WRITE / sy-msgli.
    I turned on debuging Automation of GUI and execute program.
    Result was sy-subrc = 3 sy-msgli = ''
    But in logfile(directory: SapWorkDir) I find:
    <275=Automation(Error): *****************************ERROR OCCURED IN MODULE: [CALL METHOD OF 12 ('[Excel.Application.10]') 'Range' Imode 1002]*********************************************************************************************************************************
    <275=Automation(Error): PROGRAM_ID                                                          |MODULE_NAME              |METHOD_NAME          |ERROR DESCRIPTION                                        |VERSION                    |GUI VERSION       |MODULE_PATH              |
    <275=Automation(Error): ********************************************************************************************************************************************************************************************************************************************************
    <275=Automation(Error): CALL METHOD OF 12 ('[Excel.Application.10]') 'Range' Imode 1002     |Class name not found     |Hidden               |Unable to set the Hidden property of the Range class     |Version info not found     |6206.6.64.970     |Module doesnot exist     |
    <275=Automation(Error): ********************************************************************************************************************************************************************************************************************************************************
    Is there anybody know how to get that error message <i>"Unable to set the Hidden property of the Range class"</i>?
    SAP Version: 4.6C

    Hi,
    in SRM all messages are stored in the message handler. Also when you set a message within the check BAdI, the message is stored later in the message handler. If you want to know when a message is moved to the message handler, just set a break-point in FM BBP_PD_MSG_ADD.
    Regards

  • HT1933 Tried iTunes Store directive for reporting a problem. Got an ERROR message every time. Stuck with a NY Times app that won't recognize my subscription.

    Tried iTunes Store directive for reporting a problem. Got an ERROR message every time. Stuck with a NY Times app that won't recognize my subscription.called Apple and was told by an automated message to...use the ITunes Store directive.
    Can someone point me in the right direction.

    Hello atransient,
    Thanks for the question, that definitely sounds frustrating to encounter errors at the most important times.
    Let's see if the online Report a Problem works any better for you:
    http://reportaproblem.apple.com
    Thanks,
    Matt M.

  • Having problems understanding f60genm error messages - urgent please help.

    Hi all,
    I'm a guy who has not a single idea about forms or form compilation. This is because I don't work with forms. The only reason that I am relaterd to forms is that i have a script that converts form files into a browsable web page (some thing like javadocs) which is being used by many people.
    my script converts a form file into txt file using f60genm and then the resultant txt file is converted to fmt file using f60genm. I am running my script from a RHEL server where a display variable is set.
    It was working fine all this while. But now i get error messages as this
    @ f60genm module=<form file name without the .fmb> batch=YES logon=NO forms_doc=YES...
    * CMD_FAIL_START
    @ * command failed: f60genm module=<form file name without the .fmb> batch=YES logon=NO forms_doc=YES
    * exit value: 0
    * core dumped: yes
    * signal received: 11
    * system message:
    * output:
    * CMD_FAIL_END
    Now my question is in what circumstances do i get this error message and what is it that f60genm trying to tell me by saying signal received 11?
    Is there any document or website where i can get all this information?
    Please help.

    Sorry guys,
    Just found that the error message that i pasted is not generated by f60genm.

  • Catching error message from standard function module to internal table.

    Hi,
    i am calling a FM in my custom prog.
    After execution of the FM some auto generated errors is getting displayed.
    I want to pass this error to an internal table.
    Please tell me how to do this?
        CALL FUNCTION 'FORMAT_CHECK'
          EXPORTING
            i_checkrule   = t005-prbkn
            i_checkfield  = it_ven-bankn
            i_checklength = t005-lnbkn
            i_checkmask   = space
            i_fname       = fname
          EXCEPTIONS
            not_valid     = 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.
    I want to catch this particular error message in the itab.
    Thanks,
    SAM.

    Even we can create an internal table  nad move the messages to it.
    DATA : BEGIN OF L_ERR OCCURS 0,
            SNO LIKE SY-tabix,                                  "serial no
            MSGTY LIKE SY-MSGTY,                         "message type
            MSGNO LIKE SY-MSGNO,                        "message no
            ERR_TEXT LIKE T100-TEXT,                     "message text
           END OF L_ERR. 
       IF SY-SUBRC <> 0.
              L_ERR-SNO      = SY-TABIX.
              L_ERR-MSGTY    = SY-MSGTY.
              L_ERR-MSGNO    = SY-MSGNO.
              L_ERR-ERR_TEXT = TEXT-015.                        "Problem encounterd in uploading data.
              APPEND L_ERR.
              clear L_ERR.
         ENDIF.

  • How to catch error message inside a variable?

    Hi,
    I'm trying to catch the error message inside a variable using this this command below:-
    <%=odiRef.getPrevStepLog("MESSAGE")%>
    Could you please tell me what is the right approach to capture the error message inside a variable.
    Thanks
    Anindya

    Hi Bhabani,
    I have done this and select an oracle schema.But the variables only captures the (null).Please look into this.You must have one step prior to this refresh variable. Then only it can get the status as given below.
    Returns the one-letter code indicating the status with which the previous step terminated. The state R (Running) is never returned.
    D: Done (success)
    E: Error
    Q: Queued
    W: Waiting
    M: Warning
    If you want the complete error details then you will face issues in case of multi line message. For this best option would be jython variable.Could please provide me some idea how to use this jython variable.I will update you on this soon
    Thanks
    Anindya

  • How to catch error message and show it in VC?

    I want to catch the error message and show it in VC.For example, if there is no data row in table view queryed from data service, then popup a window to show the message "No Data Found".I don't konw how to implement it!

    Hello Kane
    use expression{disble this after defining erroe messege} box in that popup there u can define your own message as error or warning accordingnly it display message
    I hope it work or Let me know it
    Regards
    ````Satish````

  • Problem with iTunes installation - Error Message when trying to use

    I intalled iTunes on my Dell Laptop. The icon is on my Desktop, but when I try to start it, I get the following error message;
    "iTunes has encountered a problem and needs to close. We are sorry for the inconvenience."
    Then the error message wants me to send some message to microsoft?

    You can't do that.  Instead, just remove "aaa new-model" from the config then try to deploy it.  Alternatively, you can try "merge mode," but that will send the whole config back to the device.

  • When trying to uninstall iTune (because the current install has problems), I get the error message 2324.  What should I do to reinstall the application?

    When trying to uninstall iTune (because the current install has problems; iTune error message states it cannot sync and that I should reinstall the application; also, it fails when I tried to upgrade to the latest release), I get the error message 2324.  What should I do to reinstall the application?

    That installer error is a "Can't open file" error
    It suggest that you may have a corrupt file.
    Try running a disk check
    http://windows.microsoft.com/en-US/windows7/Check-a-drive-for-errors
    If it fixes errors try uninstalling iTunes again.
    If that doesn't work, is it possible for find out the name of the problem file, is further information available? Try looking in your Action center - that's on the control panel. Another place is in the Windows Error logs. From the start menu , right click on "Computer" and select manage, then Event viewer.
    If nothing emerges, try a manual uninstall of iTunes and related programs according to this method:
    http://support.apple.com/kb/HT1923
    Don't worry if an uninstall fails, that is expected. Go on to the part where you have to delete files (2. Verify iTunes etc completely deleted) . Hopefully you manage to find a file that can't be deleted, that is the one we will need to deal with.

  • MB_DOCUMENT_BADI can not show error message  URGENT

    hi all:
    now i have a badi problem.
    I use t-code migo to  post a purchase oder to complete goods receipt.
    I need to  control the stock when user click the 'post' button, then maybe  I WILL give a error message and then stop the migo program.
    for example, i wirte the code 'show message e398(00) with 'error message'' in the badi implementation ZMB_DOCUMENT_BADI,method 'MB_DOCUMENT_BEFORE_UPDATE' and active it. it will come to a  runtime error 'MESSAGE_TYPE_X'.
    I debug the programe I found when the progamm come to
    'show message e398(00) with 'error message'' ,next it will return sy-subrc = 4.
    if I MODIFY the e398(00) with i398(00) then it will be OK
    but I can not stop the program migo.

    Hi all,
    Try using the BADI "MB_MIGO_BADI" it has an POST_DOCUMENT where you can do the validations.
    Reward if helpful plz.
    Fran

  • I am having problems deleting 9.0 error message 1606 comes up

    I am having problems uninstalling 9.0 to download 9.1.  Can not read items.  Error message 1606

    I was following the directions from the adobe rep on the phone by going through the control panel.  When I was trying to download the new 9.1 I got to the 98.9 % and would not go further.  That is when I got the 1606 error message.  Can this be fixed?  The rep on the phone said yes then the phone went dead.   Please help.  Am frustrated.  Gidget Louise

Maybe you are looking for

  • Has anyone not working with .dv files had synchronization problems?

    Has anyone not working with .dv files had sound synchronization problems? I'm not exactly sure what the alternatives to DV are, but I think one of them is HD. The reason for asking this question is to help isolate the nature and cause of a very serio

  • Changing the order of playli

    I am using Creative Mediasource Organizer and a Zen Micro. I can drag songs into a playlist and everything will work fine, apart from Mediasource won't let me move songs around into a different order. All the instructions that I can find on the subje

  • IPod Classic plays music, but will not show in iTuens or My computer

    My ipod was working perfectly fine until 2 nights ago. I never had a problem with it then it just randomly disconnected from iTunes. I I safely removed it then plugged it back in and it froze iTunes, and didn't show in My Computer. After repeating th

  • How can I tell if I have installed flash player properly

    I had to reinstall flash player and yes I did all that I was supposed to according to the support notes The problem is that apps that use flash player run very slow or not at all. That was the reason I reinstalled adobe.  Any ideas.  I using vista 32

  • Changing background color in 'options'-content- colors hides icons and buttons at various sites

    <blockquote>Locking duplicate thread.<br> Please continue here: [[/questions/895755]]</blockquote> This has been an ongoing fault through the versions of Firefox. A work around I discovered is to check- 'allow pages to choose own colors' then use no