Customer error message in sales order on save

Hi Friends,
as per requirement i have to raise the error message and system should enable the field to change values. This should happen when condition is not met on Saving of Sales order.
For this, i have used the user exit USEREXIT_SAVE_DOCUMENT_PREPARE. But the problem is system throwing error message and all r in display mode only. as per my requirement system should allow to change the error value field.
i have verified many posting in this SDN, but nothing is working out.
Please guide me, how to raise the error message and system should enable that filed.
My doubt is where should i raise the error message in sales order (MV45AFZZ)??? if any badi to raise the error message also fine for me. I tried many ways like... message with display like..... and set / get parameters and badis....  but not able to find the correct solution.
Thanks in Advance.
Bala

Hi
You need to use check for enahcement spot, which will be help to you.
Bcz you are throwing custom error message in the standard transaction, once the error is display, you could not able to change the values. your prob can be solved by using the enhancement sport.
This is include name (Include:MV45AF0B_BELEG_SICHERN).
In the above include, you need to create a enhancement spot after this spot (ENHANCEMENT 16  OI0_COMMON_SAPMV45A.)  
write your custom code and while displaying an error message. set flag = 'x', then use below code. It will display error message once you press ENTER, you will get the sale order in change mode, you change the values.
  IF flag = 'X'.
          fcode = fcode_gleiche_seite.
          perform fcode_bearbeiten.
          ch_subrc = 4.
          exit.
        ENDIF.

Similar Messages

  • Set error message in sale order

    Hi,
    I want to put set the error message for given fields in sale order.So that order can not be save without filling the given fields.
    Fields are -
    Shipping type
    Personnel Number
    Material freight grp
    Net value
    Pricing
    Harsh

    Hi Harsha,
    My thoughts item 2,4 & 5-
    1.Shipping type
    2.Personnel Number - Since this is partner function coming from your customer master, am not sure if it can be covered with incompletion log - if not you would need a piece of abap code in save_document_userexit to check if the partner function was filled.
    3.Material freight grp
    4.Net value - If the sales order item category needs to be priced, then this field is already marked required for sales document completion. No change needed
    5.Pricing - If the sales order item category needs to be priced, then this field is already marked required for sales document completion.No change needed
    regards
    sadhu kishore

  • Error message in Sales Order entry

    Hi All
    I get the following error while saving the sales order. "Material 40 already exists"
    It says that the material already exists and then it allows for further processing with out making any problems. Please let me know how I can get rid of this message.
    Regards

    Hi
    You could do the next:
    1) Transaction V/30 -> there you select the interlocutor functions for your message (you could obtain the technical name of your message clicking F1 in the popup of the message)
    2) Then delete the interlocutor functions related with your message.
    Edited by: nidalap on Jun 15, 2010 6:44 PM

  • Error message in sales order against target value contract

    Hi experts
    I have value contracts scenario, when I create a Release Orders thatu2019s exceeds the value of the contract the system raise a message error, but in this case the decimal expression in wrong.
    The decimal expression of the country is 1.234.567,89
    The decimal expression of my user is 1.234.567,89
    Example:
    The contract value is 10.000
    I create a release order for 15.000
    The message error is "Target value in contract &1, item &2 is exceeded by 50.00", the correct messages should be: "Target value in contract &1, item &2 is exceeded by 5.000,00"
    I release two errors, the decimal expression according to my user and country doesn't match or the validation is doing some conversion.
    Do you have any idea was wrong??
    Thanks in advanced any input is really appreciated
    Susana

    Hi Susan.
    Just select the error message in the log  and click technical info . In the performance assistant it will show like :
    Technical Data
    Message type__________ E (Error)
    Message class_________ ZCRM_CSI_UI (Messages for UI of Leasing)
    Message number________ 022
    Message variable 1____ 
    Message variable 2____ RK78
    Message variable 3____ 0000001000
    Message variable 4____ 185124 020(Task:0000003105)
    Message Attributes
    Level of detail_______ 
    Problem class_________ 1 (very important)
    Sort criterion________ 
    Number________________ 1
    Environment Information
    Object Type___________ 15
    Logical Key___________ 
    Object GUID___________ DE3B1C475098F9F187E4002264F648B2
    Object Type___________ A
    Message class_________ 
    Save message__________ X
    Message no longer erro
    This will give you details of what  internal values are getting used for calculation . If you can give the error message class and error message number probably i can help u out.
    Regards
    Apoorva

  • Error while crating Sales Order using ALE-IDoc?

    Hi all,
    I have developed an ALE-Idoc interface to create Sales Order automatically When the user created a purchase order. It is working fine since past two months.
    But now one  SO is not created and the error message in Inound idoc is 'Sales Area not defined'  message no V1316.
    The material used in Po creation is created recently and using first time .  i am expecting the problem is with in this material  because the PO's created based on other materials is still creating the SO successfully.
    Please help me in solving this problem?
    Thanks,
    Vamshi.

    Hi shan ,
    Thanks for you reply. The sales area for customer and vendor  is maintained in VOE2 and taking correctly for other materials except for the new material.
    Also in Inbound IDoc which contains the error is having correct sales area in it's segment  . But showing that in the error message as 'sales area & & & is not defined' here the sales area is wrong one it is dispalying.
    so please help me on identifying the problem?
    Thanks,
    vamshi.

  • Sales order line item delete error for MTO sales order

    Dear Experts
    iam facing below error for MTO sales order line item deletion
    "For reasons of cost management, item 000040 cannot
    be deleted"
    Please help
    Regards,
    KEdar

    It looks you try to delete the sales order line item and you get this error message.
    Try to put reason for rejection for the line item and save the order. This is equal to deleting the line item.
    You can also refer the OSS note 14097 - Order item cannot be deleted/overwritten for further information.
    Regards,

  • Component level display of the Custom Error Message in 11g

    Iam using custom error handler that extends the default DCErrorHandlerImpl class to handle the Custom exceptions thrown from the service layer, and able to see the exception displayed in the ADF UI in a popup window.
    How can we do Customization in order to display the Custom error message inline with a component (i.e. associated with a specific UI component with the arrow mark look and feel ) instead of the global level message displayed as a pop up window on the ADF UI page? Please suggest.
    Thanks,
    Kayal.
    Edited by: user11217416 on Feb 15, 2012 6:07 AM
    Edited by: user11217416 on Feb 15, 2012 6:14 AM

    Hi,
    Try as follows
      final static int MSG_FATAL = 1;
      final static int MSG_ERROR = 2;
      final static int MSG_WARN = 3;
      final static int MSG_INFO = 4;
          public static void showMsgForRelevantComponentAll(int iSeverity, String sMsg, UIComponent uIComponent) {
              FacesMessage msg = null;
              switch (iSeverity) {
              case MSG_FATAL:
                  msg = new FacesMessage(FacesMessage.SEVERITY_FATAL, null, sMsg);
                  break;
              case MSG_ERROR:
                  msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, sMsg);
                  break;
              case MSG_WARN:
                  msg = new FacesMessage(FacesMessage.SEVERITY_WARN, null, sMsg);
                  break;
              case MSG_INFO:
              default:
                  msg = new FacesMessage(FacesMessage.SEVERITY_INFO, null, sMsg);
              FacesContext facesContext = FacesContext.getCurrentInstance();
              facesContext.addMessage(uIComponent.getClientId(facesContext), msg);
          }

  • Catch datetime exception and custom error message in SSRS

    I currently working on create report by using SSRS. I have 2 parameters: [Start date] and [End date] to filter data from database and show it on report. I want to validate 2 datetime parameter as describe above. Please tell me a solution to do this.
    For example:
    When user type the text like: 4/15/2014mmm => System validation thrown a message: [The From Date not correct type]
    But in my case, I want to receive a custom error message by myself.(Look like: [Date Invalid!])

    Hi Brain,
    According to your description, you have a report with two parameters for user to input. Now you want to validate these two parameters and display custom error message when the date is invalid. Right?
    In Reporting Service, it doesn’t provide any interference for us to modify the system error message (the text in grey color). That means we can’t modify the system message when error occurs. However we can create a textbox in this report, use custom code
    and expression to display the custom error message. But this all based on the report is successfully running. So if error occurs during report processing, all the custom code and expression will not work. In this scenario, we find a workaround for you. We
    use custom code to judge if the date is valid, if the users type an invalid date, we return a default value to make sure this report can successfully run. Then we use expression to control the visibility of tablix in this report and create a textbox to show
    the custom error message. Your case has been tested in our local environment. Here are steps and screenshots for your reference:
    Go to Report Properties. Put the code below into custom code:
    Public Shared a As Integer=0
    Public Shared Function IsDate(d1 As String,d2 As String) as Integer
            Try
               FormatDateTime(d1)
               FormatDateTime(d2)
            Catch ex As Exception
                       a=1
            End Try
    return a
    End Function
    Create two parameters. One is StartDate, the other is EndDate. Set the data type of these two parameters Text.
    Create a filter for StartDate, put the expression below into Value:
    =IIF(Code.IsDate(Parameters!StartDate.Value,Parameters!EndDate.Value)=0,CDate(IIF(Code.IsDate(Parameters!StartDate.Value,Parameters!EndDate.Value)=0,Parameters!StartDate.Value,"1/1/2012")),CDate("1/1/2012"))
    Create a filter for EndDate, put the expression below into Value:
    =IIF(Code.IsDate(Parameters!StartDate.Value,Parameters!EndDate.Value)=0,CDate(IIF(Code.IsDate(Parameters!StartDate.Value,Parameters!EndDate.Value)=0,Parameters!EndDate.Value,"1/1/2013")),CDate("1/1/2013"))
    Ps: In step3 and step4, the date(“1/1/2012”, “1/1/2013”) in the expression are the default we set to make sure the report can successfully process. You can set any date existing in your dataset.
    Use the expression below to set the visibility of the tablix:
    =IIF(Code.IsDate(Parameters!StartDate.Value,Parameters!EndDate.Value)=0,false,true)
    Create a textbox, put the expression below into it:
    =IIF(Code.IsDate(Parameters!StartDate.Value,Parameters!EndDate.Value)=0,"","Date invalid")
    Save and preview. It looks like below:
    Reference:
    SSRS Calendar and Date Restriction
    Errors and Events Reference (Reporting Services)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou
      

  • Custom Error message in Login Page

    Hi,
    I am using MVC framework for my project. I want to display custom error messages to the user in the Login page(JSP).
    For eg: invalid password, password has been expired etc. How do I pass these messages from Java to my login page & display it?

    This is a sample action class for login page in struts : -
    package xxx;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import LoginForm.java;
    public class Action extends org.apache.struts.action.Action
    public ActionForward execute(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response)
    throws Exception {
    ActionErrors errors = new ActionErrors();
    ActionForward forward = new ActionForward(); // return value
    String username;
    String password;
    try {
    LoginForm lf = new LoginForm;
    username =lf.getUserName();
    password = lf.getPassword();
    if( username== null)
    forward=mapping.getInputForward();
    if( (username == "admin" ) && ( password="admin"))
    // do something here
    } catch (Exception e) {
    // Report the error using the appropriate name and ID.
    //Errors will be caught here.
    errors.add("name", new ActionError("id"));
    // If a message is required, save the specified key(s)
    // into the request for use by the <struts:errors> tag.
    if (!errors.isEmpty()) {
    saveErrors(request, errors);
    // Forward control to the appropriate 'failure' URI (change name as desired)
    //     forward = mapping.findForward("failure");
    } else {
    // Forward control to the appropriate 'sucuess' URI (change name as desired)
    forward = mapping.findForward("success");
    // Finish with
    return (forward);
    You need to have LoginForm.java as Model and Login.jsp as View . Action.java will be your controller.

  • Error while create sales order

    Hi,
    Please help.
    I am facing error while create sales order.
    No item category available (Table T184 OR VERP  )
    Message no. V1320
    Diagnosis
    No item category could be determined for the combination OR VERP .
    System Response
    The system does not allow further processing of this item.
    Procedure
    Check the entries in table T184 by means of which item category determination is controlled.
    If you do not have the authorization to do this yourself, contact your system administrator.

    Hi,
    Check in spro whether Item categorygroup VERP is assigned to sales document type.if not assign.
    Path
    SPRO-SD-sales-sales douments-sales document item-assign item categories.

  • Commit error while transferring Sales order Document to GTS

    Hello,
    We faced a transfer error while transferring sales order document to GTS.
    When I debugged the code function /SAPSLL/API_6800_SYNCH is called. In this function, /SAPSLL/CUHD_MAINTAIN_SINGLE is called with parameter lv_no_commit = 'X'. When I checked why its value is 'X', I saw that if the RFC destination and the current system are the same, then lv_no_commit = 'X', (means if the R3 and the GTS are in the same server, same client.) In debug mode I set the value of lv_no_commit to space, and then it works. It creates the GTS document.
    We are also transferring billing documents and it works fine. When I checked what is the difference between transferring sales order document and transferring Billing document, I saw that in the transferring billing document there is another function is called /SAPSLL/API_6800_CSD_SYNCH, and it's calling parameters(in background, as seperate unit) are different from calling parameters of /SAPSLL/API_6800_SYNCH. You can see the difference below.
    For sales document transfer :
        CALL FUNCTION '/SAPSLL/API_6800_SYNCH'
          DESTINATION cs_transfer-rfc_dest
    For billing document transfer :
        CALL FUNCTION '/SAPSLL/API_6800_CSD_SYNCH'
          IN BACKGROUND TASK
          DESTINATION cs_transfer-rfc_dest
          AS SEPARATE UNIT
    So my question is, do you think is it a sap standard program error, or is there any suitable settings in the customizing or SM59 to fix this error?
    Thanks in advance
    Serhat
    Edited by: Serhat Dirihan on Jan 22, 2009 11:46 AM

    Dear Serhat,
    I don't think this is an RFC problem or an error. But you wrote:
    When I checked why its value is 'X', I saw that if the RFC destination and the current system are the same, then lv_no_commit = 'X', (means if the R3 and the GTS are in the same server, same client.)
    It is impossible to have GTS and R/3 on the same system and same client. At least the client should be different. So try to check why the call is performed like that.
    Balazs

  • Custom error message for Back Button Error

    I am using JDeveloper 9. I have tried to create a custom error message to handle a "Back button" press.
    But the error message is usually ignored and the system's regular "Stale data" message appears. Is there a way to prevent the system's message from appearing and to raise a custom error message?

    Do the following coding in your processRequest() of the Create or udpate page.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    // If isBackNavigationFired = false, we're here after a valid navigation
    // (the user selected the Create button) and we should proceed
    // normally and initialize a new employee.
    if (!pageContext.isBackNavigationFired(false))
    // We indicate that we are starting the create transaction (this
    // is used to ensure correct Back button behavior). Note that you
    // can assign whatever name you want to your transaction unit.
    TransactionUnitHelper.startTransactionUnit(pageContext, "empCreateTxn");
    // This test ensures that we don't try to create a new employee if
    // we had a JVM failover, or if a recycled application module
    // is activated after passivation. If these things happen, BC4J will
    // be able to find the row that you created so the user can resume
    // work.
    if (!pageContext.isFormSubmission())
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    // Call your method to handle creating the new row.
    am.invokeMethod("createEmployee", null);
    else
    if (!TransactionUnitHelper.isTransactionUnitInProgress(pageContext, "empCreateTxn", true))
    // Get the purchase order number from the request.
    String orderNumber = pageContext.getParameter("headerId");
    MessageToken[] tokens = { new MessageToken("PO_NUMBER", orderNumber)};
    OAException message = new OAException("ICX", "FWK_TBX_T_PO_UPDATE_CONFIRM", tokens,
    OAException.CONFIRMATION, null);
    // We got here through some use of the browser "Back" button, so we
    // want to display a state loss error and disallow access to the page.
    // If this were a real application, we would probably display a more
    // context-specific message telling the user they can't use the browser
    // "Back" button on the "Create" page. Instead, we wanted to illustrate
    // how to display the Applications standard NAVIGATION_ERROR message.
    OADialogPage dialogPage = new OADialogPage(message);
    pageContext.redirectToDialogPage(dialogPage);
    } // end processRequest()
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Custom error message in SAP application log

    Is there a way to add a custom error message to the SAP application log without passing the message variables MSGV1, MSGV2, MSGV3, MSGV4 and the Message class and number. 
    We want to pass a custom message from the BAPIRET2-MESSAGE without giving it a Message class and number.  The reason for this is that  we are using class based exceptions instead of the traditional message class with errors.  When we catch the class based exception, we take the error text of the exception and put in in the BAPIRET2-message and set the BAPIRET2-TYPE as 'E'.  Now we want to add this to the SAP application log.
    The call to 'BAL_LOG_MSG_ADD' takes a structure BAL_S_MSG which is just like BAPIRET2.  However this function builds the entry to the application log use the message variables MSGV1, MSGV2, MSGV3, MSGV4.  There is no provision to pass in the BAPIRET2 message.
    Add message to application log
      CALL FUNCTION 'BAL_LOG_MSG_ADD'
        EXPORTING
         i_log_handle              = app_log_handle
         i_s_msg                   = log_message
    Thanks,
    Jay

    Hi Jay,
    Did you see <b>BAL_LOG_EXCEPTION_ADD</b>?
    This FM is represented by the structure <b>BAL_S_EXC</b>. This can have various versions as described below:
    <b>Data of BAL_S_EXC Structure  /     Use</b>
    <b>EXCEPTION</b>  /                              Exception class from which an exception text 
                                                       is added to the log. This field must be filled.
    <b>MSGTY</b>  /                                     Message type (MSGTY) of a T100 message.
                                                       This field must also be filled for exceptions.
    <b>PROBCLASS,
    DETLEVEL,
    ALSORT, TIME_STMP</b>  /                Message or exception attributes, such as
                                                        problem class (PROBCLASS, for
                                                        example, "very important"), level of detail
                                                        (DETLEVEL, from 1 to 9), sort criterion
                                                        (ALSORT, unrestricted) and timestamp
                                                        (TIME_STMP). These fields can be displayed
                                                        in the log (except TIME_STMP).
    <b>MSG_COUNT</b>   /                            This attribute is not used for exceptions.
    Follow the link below for more details:
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/d6/5d7f38f52f923ae10000009b38f8cf/frameset.htm">SAP Help DOc</a>
    Hope this helps.
    Thanks
    Sanjeev

  • ICI - How to display custom error messages in SAP CRM

    Hello,
    we are working on a custom Contact Center which interfaces with SAP CRM Version 7 with Enhancement Package over ICI.
    The basic call functions like accepting, hanging up, holding and retrieving are fully implemented and are working already.
    Our goal is to display error messages in the CRM so that clients know there is something wrong, for example why he can't be log in successfully (e.g. the telephony server isn't reachable).
    We already found the ICI Documentation file which provides us the CRM SOAP error codes and tried to send SOAP Fault messages, but never got
    them to screen.
    Please find an attached example screenshot what we mean exactly, reproduced by trying to make a call with CRM user while BCM CDT isn't
    running in the background.
    Regarding to this topic we've the following questions:
    - Is it possible to display custom error messages on the CRM or is this functionality limited to SAP?
    - Could you provide us some further information on how to use this feature exactly (implementation details?) and how the SOAP XML should look like to get it work?
    Thank you in advance!
    Best regards
    René Holy

    NewUser7 wrote:
    Please correct me if I am wrong
    I need to create an entity adapter and attach an error handler with the adapter? or can i handle that in the event handler itself. I coulnt find any api for handling errorsYou can do it both ways but since we are talking about event handler now, then in 9.x you need to extend com.thortech.xl.client.events.tcBaseEvent class for creating a event handler. In tcBaseEvent class there are various flavors of handleError method. So use that as per my note earlier and you should be good.
    HTH

  • How to create Custom error message in SharePoint 2013

    Hi,
    I have created one document library.On uploading the same file SharePoint throws error as"server error.The same file exit".
    But my requirement is not to show the SharePoint default message.I wanted to create custom message and show the pop up for the same file upload.
    Is there any way to create any custom error page or can I manipulate SharePoint default error page?
    Any help?
    Thank you

    Hi,
    You can create an event receiver to set the validation error messages.  One such post to redirect the custom error page is as follows
    https://social.msdn.microsoft.com/Forums/office/en-US/2bc851f6-e04b-4550-b87f-9b874a290482/sharepoint-event-receivers-and-custom-error-messages?forum=sharepointdevelopmentlegacy
    Create custom error page for SharePoint event receiver
    Please mark it answered, if your problem resolved or helpful.

Maybe you are looking for