Error Message not getting clear while creation of purchase order

Hi All,
I am facing one problem while creating purchasing order.
I have written one user-exit for purchase order. User has to enter purchase requisition number for certain purchase order type. If he doesn’t enter PR number, we have to throw an error message.
I have used the MM06E005 for the same. User exit is working fine, but the problem is, all error messages are collected in log and it will be displayed in a dialog screen when you check the document (Transaction ME21N).
When I enter PR number and check the document, the error message is still there, system is not clearing the error log. I have created “Z” message class and have used in User exit.
Do you guys have any solution for this? Am I using the right user exit? What should I do to clear the error message?
If you don’t have answer, please pass it to your friends also….
Thanks a lot in advance…

Hi Rob,
Your inforamtion was good enough to start. thanks a lot for that. I tried to implement the same but no luck this time also.
FYI..
The FM exit name is EXIT_SAPMM06E_012 and see the following code, i used.
TYPES:  BEGIN OF type_my,
        subrc TYPE sysubrc,
        msgid TYPE symsgid,
        msgty TYPE symsgty,
        msgno TYPE symsgno,
        msgv1 TYPE symsgv,
        msgv2 TYPE symsgv,
        msgv3 TYPE symsgv,
        msgv4 TYPE symsgv,
        END   OF type_my.
DATA:  my TYPE type_my.
DATA : GV_PO(10) TYPE I.
  if I_EKKO-BSART = 'Z005'.
  GV_PO = I_EKKO-EBELN.
    loop at TEKPO.
      if TEKPO-BANFN is initial.
       message E000(ZBC_MESSAGES) with TEKPO-EBELP.
        my-subrc = sy-subrc.
       my-msgid = sy-msgid.
       my-msgty = sy-msgty.
       my-msgno = sy-msgno.
        my-msgid = 'ZBC_MESSAGES'.
        my-msgty = 'E'.
        my-msgno = '000'..
        my-msgv1 = sy-msgv1.
        my-msgv2 = sy-msgv2.
        my-msgv3 = sy-msgv3.
        my-msgv4 = sy-msgv4.
  Cleaning
        CLEAR:
        sy-subrc,
        sy-msgid,
        sy-msgty,
        sy-msgno,
        sy-msgv1,
        sy-msgv2,
        sy-msgv3,
        sy-msgv4.
  Generate message
        mmpur_message my-msgty my-msgid my-msgno
        my-msgv1 my-msgv2 my-msgv3 my-msgv4.
  Remove message from message list
        mmpur_remove_messages_by_id GV_PO.
      endif.
    endloop.
It is still not working. Moreover i don't have PO number at run time.
I hope this clarify the problem in more detail.
Meanwhile i am searching for OSS as suggested by Michael Bennett.

Similar Messages

  • Complete error message not getting displayed

    Hi All,
    I've built a custom webadi integrator which loads into a custom staging table.
    All fine with the webadi but the error messages are getting truncated to only 45 characters. The variable size is 4000 characters and a debug message before RAISE_APPLICATION_ERROR indicates there is no truncation of the message in the PL SQL package.
    Where and how is my message getting truncated?
    Any pointers highly appreciated !

    Hi
    See the sample BADI code for PR which raises an exceptions and do accordingly
    BAdI Name: ZPUR_RFQ (Implementation name) Purchase Requisitions
    Definition Name: ME_REQ_POSTED
    Interface Name : IF_EX_ME_REQ_POSTED
    Implementing Class: ZCL_IM_PUR_REQ
    Method :            POSTED
    METHOD if_ex_me_req_posted~posted .
      DATA : v_mtart TYPE mtart.
      DATA l_s_eban TYPE ueban.
      LOOP AT im_eban INTO l_s_eban.
        IF l_s_eban-estkz NE 'B'.
          CLEAR v_mtart.
          SELECT SINGLE  mtart INTO v_mtart FROM mara WHERE matnr = l_s_eban-matnr.
          IF v_mtart EQ 'ZERS' OR v_mtart EQ 'FHMI' OR v_mtart EQ 'UNBW'.
            MESSAGE e000(zm_msg) WITH 'You are not allowed' 'to create PR for stock items'.
          ENDIF.
        ENDIF.
        IF  l_s_eban-knttp NE 'F' OR l_s_eban-pstyp NE '9'.
          IF l_s_eban-knttp NE 'A'.
            IF ( l_s_eban-pstyp NE '9' AND l_s_eban-pstyp NE 'D' ) 
               AND l_s_eban-matnr EQ space.
              MESSAGE e000(zm_msg) WITH 'You cannot create'
                'a PR without material number'.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDMETHOD.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Problem in BADI, error message not getting displayed

    Hello Experts,
    I am facing a strange problem in BADI.
    The requirement is that the user should not be allowed to change the plant field
    on the screen of standard MM transctions for PO/PR amendment.
    I have written the code in separate BADIs for PO and PR.
    I am displaying an error message if the user tries to change the field.
    For PO, it is working fine.But for PR, the same code is not working.
    The control is going over to the BADI for PR and rest of the code is working fine.
    But the error message is not getting displayed for PR amendment.
    Can anybody please suggest the possible cause of problem and some solution to it.
    Thanks in advance.

    Hi
    See the sample BADI code for PR which raises an exceptions and do accordingly
    BAdI Name: ZPUR_RFQ (Implementation name) Purchase Requisitions
    Definition Name: ME_REQ_POSTED
    Interface Name : IF_EX_ME_REQ_POSTED
    Implementing Class: ZCL_IM_PUR_REQ
    Method :            POSTED
    METHOD if_ex_me_req_posted~posted .
      DATA : v_mtart TYPE mtart.
      DATA l_s_eban TYPE ueban.
      LOOP AT im_eban INTO l_s_eban.
        IF l_s_eban-estkz NE 'B'.
          CLEAR v_mtart.
          SELECT SINGLE  mtart INTO v_mtart FROM mara WHERE matnr = l_s_eban-matnr.
          IF v_mtart EQ 'ZERS' OR v_mtart EQ 'FHMI' OR v_mtart EQ 'UNBW'.
            MESSAGE e000(zm_msg) WITH 'You are not allowed' 'to create PR for stock items'.
          ENDIF.
        ENDIF.
        IF  l_s_eban-knttp NE 'F' OR l_s_eban-pstyp NE '9'.
          IF l_s_eban-knttp NE 'A'.
            IF ( l_s_eban-pstyp NE '9' AND l_s_eban-pstyp NE 'D' ) 
               AND l_s_eban-matnr EQ space.
              MESSAGE e000(zm_msg) WITH 'You cannot create'
                'a PR without material number'.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDMETHOD.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • QE573 and QE570 error messages always getting printed while releasing orders from COR5 T-Code.

    Hi Experts,
    User is getting QE573 and QE570 printed messages while releasing every process order from COR5 T-Code.
    I tried to investigate this and found that these are printing messages for "Sample Drawing Instruction" and "Inspection instruction", and there is a print setting in CB85 because of which these message are printed.
    But need to know if there is any additional setting related to Production Planning/Order Types/Plants because of which these printed messages are appearing in COR5 T-Code.
    If yes, then please mention the settings and possible how to resolve this so that the users don't get this while releasing any order.
    Thanks
    Adarsh

    Hi Ajay,
    In KEPC with the combination of sales organisation &, billing type  costing key is assigned for the valuation class 7010 (Finished goods) But costing key is not assigned to valuation class 3000 (raw material). and I saw the same setting in quality. Still we are able to create the acounting document. But in case of production it is asking for cost estimate with the costing keys for the valuation class 7010.. Is any other setting which is missing in Quality as we are able to create accounting documents though the costing key is defined for the valuation class 7010. 
    Can you please advise?
    Thanks & Regards
    Veda

  • Error while creation of PUrchase order by using BAPI.

    Hi All,
       We are creating a purchase order thru BAPI ("BAPI_POEC_CREATE") and we are passing the following parameters ( I_PO_HEADER , I_PO_ITEMS , I_PO_ACCASS , I_PO_PARTNER and I_PO_ORGDATA)  to the bapi and after processing  we are getting the following error and Abend messages.
    Messages:
    1) Enter at least one item or one limit ( we have added line items in I_PO_ITEMS structure).
    2) Incorrect interface data for set 78 in method C.
    3) Interface data contains errors.
    Can anyone help me in fixing these errors inorder to proceed further.
    Regards
    Dharmaraju

    Hi there,
    Did you manage to sort this problem ?
    If not let me know
    I am using the same and know how to overcome
    Thanks
    Turlock
    T

  • Check box GEN_NEW is not getting checked while creating a change order.

    Hi Experts,
      I have written a zee function module to create a change order.I am calling this function module from an external system.In my zee function module I am calling a standard function module
    CCAP_ECN_MAINTAIN.I am able to create the change order successfully but when I open the object types in the change order the check boc of the field GEN_NEW is not getting checked.I am unable to find the field and default it to 'X' so can you please help out over this issue.Answers will be rewarded with good number of points.
    Thanks,
    Sridevi.

    Hi,
    If you want to close a line item for a PR Number, refer FM BAPI_REQUISITION_DELETE
      CLEAR : wa_pr_close,
              wa_return_close.
      REFRESH : it_pr_close,
                it_return_close.
      wa_pr_close-preq_item  = lv_bnfpo. "<--Line Item Number (BNFPO)
      wa_pr_close-delete_ind = c_check.  "<--set as X (c_check = 'X')
      APPEND wa_pr_close TO it_pr_close.
      CLEAR wa_pr_close.
      CALL FUNCTION 'BAPI_REQUISITION_DELETE'
        EXPORTING
          number                      = lv_banfn  "<--PR Number (BANFN)
        TABLES
          requisition_items_to_delete = it_pr_close
          return                      = it_return_close.
    Hope this helps you.
    Regards,
    Tarun

  • Error page not getting cleared

    I have a JSP that calls some java methods some of which might throw an exception. I have a very basic error page identified in the jsp and it seems to be getting called but not working properly. The problem is that the first jsp starts building the output for a page and when the error page gets called then the html from my error page gets appended to the html that was put there by the first jsp. Do I need to clear a buffer or something in my error page? Any help would be greatly appreciated. Thanks.
    I've included the entire contents of my error page below. If I throw an exception very early in the JSP this works fine. I added the call to out.flush() recently and that hasn't helped.
    <%@ page isErrorPage = "true" %>
    <% out.flush(); %>
    <HTML>
    <HEAD>
    <title>Test Error Page</title>
    <LINK rel="stylesheet" href="mainstyle_01.css" type="text/css">
    </HEAD>
    <BODY>
    <h3>Error: <%= exception.getMessage() %> has been reported. </h3>
    </BODY>
    </HTML>

    Hi
    Actuauly the problem is probably because of a filled up buffer. A default JSP page have a buffer of 8kb if you write more HTML than that before you get your exception the buffer will have been flushed and the content sent to the caller before the error page is called. I think there are also some function calls that flush the buffer by default.
    For more information look at "<%@ page ...." syntax in the JSP docs and at the Buffer functions of the javax.servlet.ServletResponse Class.
    Hope this helps
    //Samuel

  • Texts not getting populate in idoc for Purchase Order

    Hi,
    While transfering PO from MM to SRM thru XI texts at the item level n header level are not populating in ithe idoc segments.
    Please let us know the solution.
    Regards,
    Manu

    Hi Acel,
    You will need to check the settings in transaction WE20 - You will be using a Partner Profile to determine the outbound message, either for each vendor or a generic one.
    on the outbound parameters, you will need to ensure that ORDCHG is set up as a message type. If not, add it, ensuring that you use the message ORDCHG, the basic type (or extension) that you are using, usually ORDERS05 and make sure that in message control, you have process code ME02 set up. This should enable the correct message type to be determined.
    Regards,
    Rob

  • Delivery not getting created for Stock Transfer Purchase order

    Hi,
    My user having one issue with stock transfer order. User is not able to generate the delivery for the particular material against stock transfer PO. Here checking rule is not maintained.Kindly advice.

    Hi
    Please, see SAP Note 498143 - FAQ: Stock transfer with delivery in purchasing.
    I hope this helps you
    Regards
    Eduardo

  • JSF: Error Message are not getting cleared

    Hi,
    I am facing some problem with error messages in JSF.
    Here is what I am doing
    1. User submits a form, server validates and sends back the error to the client error message added to Faces Context.
    2. User checks the messages, changes the input and submits. assuming everything is correct now.
    3. On server, it validates and writes data to response for download using the following code.
    FacesContext faces = FacesContext.getCurrentInstance();
        HttpServletResponse response = (HttpServletResponse)faces.getExternalContext().getResponse();
        DownloadResponse.sendDownload( response, is, fileName );
        faces.responseComplete();
      }4. It shows the download popup to download the file. The problem here is that error message are not getting cleared off. User can still see the error message on the screen.
    It seems I am missing something in JSF req-response life cycle. Anyone please point out the mistake.

    SudhirMongia wrote:
    4. It shows the download popup to download the file. The problem here is that error message are not getting cleared off. User can still see the error message on the screen. Wrong. The problem is that the view is not rerendered, which makes sense because you are not sending view content to the browser but your file.
    Your real question probably is: how do I cause a file download and still rerender the view afterwards to show the results? To that I myself do not have the answer unfortunately, but I have seen that question come by a few times already, so doing some searches in these forums may yield you an answer.

  • I am having problems with my outlook 2011. While i am able to check and SEND email on all my other devices ( Ipad, iphone, Macbook), I am unable to do so with my iMac. This problem started suddenly and the error message i get is error 5.7.8. Please Help

    I  am having problems with my outlook 2011. While i am able to check and SEND email on all my other devices ( Ipad, iphone, Macbook), I am unablesend any email with my iMac ( i can recieve email) . This problem started suddenly and the error message i get is error 5.7.8. I have read the threads on line and went into settings, even created a new profile, nothing helps...Please advice..is this something to do with my keychain Access?

    As Outlook is not an Apple product, you will find more helpers familiar with Outlook here:
    Office for Mac forums

  • We get error messages when trying to download in-app purchases on the iPad using an iTunes card.This worked on other ipads.  Just not this particular one.

    We get an error message when trying to download in-app purchases on the iPad using an iTunes card. This worked on other ipads.  Just not this particular one.
    We have tried deleting and re-installing the apps and attempting the in-app purchase again.  Still get error messages. Any suggestions?

    hello Mac.INXS, please [[Clear the cache - Delete temporary Internet files to fix common website issues|clear the cache]] & [[Delete cookies to remove the information websites have stored on your computer|cookies from mozilla.org]] and then try logging into AMO again.

  • Some of the songs I have downloaded onto i tunes won't play when I select it to do so.  The error message I get is "The song could not be used because the original file could not be found.  Would you like to locate it?"  How can I get my songs to play?

    Some of the songs I have downloaded into i tunes won't play when I select it to do so.  The error message I get is "The song can not be used because the original file can not be found.  Would you like to locate it?"  When I select yes I'm sent to a screen that has my i tunes library listed.  When I select the song in question I'm asked if I would like to open the song.  When I select this option I get nothing.  The songs I have downloaded must be somewhere because they are listed in my i tunes library and on the screen I've been sent to.  I can't the songs to play however.  This is not true of all of my songs but it is true of quite a few of them.  Actually, one song is too many.    How do I get my music to play that seems to be locked up somewhere in the computer?

    Presuming they're on your computer, right click on them and then follow the prompts to locate hte file on your computer.

  • I get error message: not enough space to download when I try to buy a tv series on Itunes. It tells me to delete photos or videos to make space, but I have no photos and videos. Help?

    I get error message: not enough space to download when I try to buy a tv series on Itunes. It tells me to delete photos or videos to make space, but I have no photos and videos. Help?

    I would guess that a TV series takes up a fair amount of storage capacity. It is just a standard message I think that may indicate that you are actually running low on storage space.
    If you go to Settings>General>About how many GBs are specified as being available?  If you are low on space maybe deleting some apps may help.

  • I keep getting error message "not enough space on startup disk" on my macbook 10.6, even though I've deleted and compressed many files. Could something else be the problem?

    Somehow 1500 web pages were downloaded into my iphone app! That's when the trouble began Now, I keep gettig error message"not enough  room on your start up disc. "So I deleted most of theml, but when I compress/delete files, it doesn't help. Now i'm unable to back up to a disc, because I get a similar message about lack of room.. I can't download apple updates or printer updates. My computer is almost unusable. When I took it to the Apple store they had no idea what was wrong.
    I bought an external hard drive-Free Agent Go Flex which doesn't seen to function, and has no user interface and apparently little tech support. My cursor is all over the place. No one at Apple seems to be able to fix this computer. Any suggestions for my next move?
    Thank you.

    See Here for Troubleshooting
    Free Disc Space
    http://www.thexlab.com/faqs/freeingspace.html
    See Here for Resolving Startup Issues
    http://support.apple.com/kb/ts1417

Maybe you are looking for

  • Windows 8.1: Printer Offline Issue - POSSIBLE SOLUTION

    Hi all - I came across this extremely annoying problem between my Toshiba Win-spit-dows 8.1 (shudder) laptop and my HP 71197B Photosmart 5510. a) I found out my printer ip using Fing on my mobile - use any method to find this out.  b) I typed this in

  • How can i put the top of index page when i move to my domain?

    might be confusing question, so sorry. just click this page and read the topic again plz. http://bigshouting.cafe24.com/ when you click, you could see not the top of index page but the bottom... how can i fix this? Can you guys explain with procedure

  • 3rd & 4th monitors for fcp setup using an Imac?

    I'd be quite interested to hear about other users who have managed to configure their workstation with 3 or 4 monitors using an Imac (or any mac that doesn't have expansion slots) What additional hardware you have considered and/or purchased. What so

  • Error code: U44M1I210

    Trying to install 12.1 update patch in Windows 8 64bit for Photoshop Elements and stuck on this error.   Tried complete uninstall, reinstall and same problem.

  • Mail slow from icloud?

    mail loads slow on iphone from icloud please help