Skip to Content
avatar image
Former Member

ERROR MESSAGE

Hi All1

I had added a custom field onto a SAP standard GUI(subscreen).Now my requirement is to issue a error message when ever the user does not input values through list down box into the custom field with message suggesting him to enter values.Also it is required not to forward the transaction until the user inputs the value.

Please advise in which part of the standard program i have to coding to accomplish this.

Regards

Praneeth

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 31, 2006 at 08:47 AM

    Hello Praneeth,

    As u have already touched the SAP screen program, simple make the field mandetory in the screen painter.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks abhijit.

      My problem got resolved.

      Maximum points awarded.

      I am opening another thread on other issue related to this topic.Please view and advise.

      Regards

      Praneeth

  • avatar image
    Former Member
    Mar 31, 2006 at 06:24 AM

    Hello Praneeth,

    How have u added the custome field on the screen? This is needed as the flow logic may be available in the exit itself.

    Usually the check is done in PAI and if u use chain endchain then on giving error it will block all other fields for inputs and open only the relavant fields.

    Please provide the proram name where u have done this change.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi abhijit!

      I had added the field onto the following programs

      SAPLV02Z screen no. 0200

      SAPMV45A screen no. 4309.

      These subscreens are used in various sales transactions and to name a few are va02,xd01,xd02,xd03 etc..

      Regards

      Praneeth

  • Mar 31, 2006 at 08:15 AM

    Hi Praneeth,

    Write the validation for the screen field in the PAI of the screen. Please refer to the code sample below for validation.

    PROCESS AFTER INPUT.

    • Add your validation here

    FIELD zcrmt_0100_btx_ui02-zzcustomer_h0208

    MODULE data_0200_validate ON REQUEST.

    MODULE data_0200_validate INPUT.

    • Validation as required

    IF zcrmt_0100_btx_ui02-zzcustomer_h0208

    GT zcrmt_0100_btx_ui02-zzcustomer_h0206.

    • Display the error message

    MESSAGE e111(zcrm_appl).

    ENDIF.

    ENDMODULE. " data_0200_validate INPUT'

    Please reward some points if it helps you.

    Regards,

    Amit M. Mishra

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 31, 2006 at 08:05 AM

    When u say added in screen 200/4309 how have u added using exit or changed the std SAP program? Also what is the field that u have added. If u can set up check table then it will automatically not allow an invalid value.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      Just make the code in PAI of the screen.

      if the field is initial.

      message e000 with 'Enter a value'.

      leave list-processing.

      ...You have to make it as error message[i.e. message e].Then it won't proceed further.

      endif.