Skip to Content
author's profile photo Former Member
Former Member

Prevent follow-up transaction on Web UI if mandatory fields are not entered

Hi Experts,

I want to prevent the creation of follow-up on the Web UI (lead->opportunity) (opportunity->quotation) (quotation->sales order) if the values are not entered in even one of the standard or non-standard mandatory fields. (i.e if there is even a single error message on the overview page) How can this be achieved?

P.S: I am new to the SAP CRM field, please take this into consideration.

Regards,

Yaseen

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Sep 22, 2011 at 12:20 PM

    Hi Yaseen

    If there are mandatory fields which are not filled in the document, then there should be an error message triggered requesting that data be entered into the mandatory field. And as long as a document has errors, in general it should not be possible to create a follow-up document until the errors have been removed (mandatory fields are filled).

    So are there errors in the documents that do not have mandatory fields filled? And in that case are you still able to create follow up documents for these? This should not be the case....

    Best Regards

    Gavin

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Gavin,

      Yes, the follow-up transaction is prevented in case a standard mandatory field is not entered. But, if there is a certain field which I made mandatory or I created in AET and made it mandatory, the followup is allowed.

      For e.g :- I renamed standard field 'Opportunity Group' to 'Customer Type' and made it mandatory (It was not mandatory before). Now if I dont enter value in this field, follow up is allowed. Also, the error message which comes on not entering the value ( 'Enter values for Customer Type' ) disappears after the opportunity is saved. (For standard mandatory fields, this kind of error message remains even in overview page)

      In fact, I have two requirements which I think are interrelated :-

      1> I want to prevent follow-up in case custom mandatory fields are not entered.

      2> I also want to display error message (it should not disappear after edit mode is gone) even after the opportunity is saved... that is, error message in overview page as well, like in case of standard mandatory fields.

      Thanks,

      Yaseen

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2011 at 12:22 PM

    Hi,

    If the follow up transaction is created on click of button, then you have to enter some validation in the button click event. The event name you can find out by putting break-point in the do_handle_event method of the overview page..

    inside the button event, you can add some code like in the beginning, this code will exit the button event in case of any error message..

    data: lcl_msgsrv TYPE REF TO cl_bsp_wd_message_service,

    lcl_msgsrv = cl_bsp_wd_message_service=>get_instance( ).

    IF lcl_msgsrv IS BOUND.

    CALL METHOD lcl_msgsrv->get_number_of_messages

    EXPORTING

    iv_message_type = lcl_type " type E'

    RECEIVING

    rv_result = lv_no.

    if lv_no is GT 0.

    exit.

    endif.

    endif.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      If you go to the configuration of the view, you can made those fields mandatory by checking the mandatory check box in the field property section. Then it won't allow you to proceed without entering those non standard fields.. The other option is to raise message in the methods like DO_VALIDATE_INPUT etc..

  • author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2011 at 06:39 AM

    in eh_onfollowup, i checked if the fields are initial.. if they are, i exited the program.....

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.