Skip to Content

Error Message

Hi Folks,

Hi Folks,

I am getting the error message as a pop up and with no selection-screen.But I want the error message to be displayed in the status bar and with the selection-screen.Can anyone here please let me know how.

START-OF-SELECTION.

AT SELECTION-SCREEN OUTPUT.

PERFORM GETDATA.

IF P_MATNR IS NOT INITIAL.

UOM = T_MEINS.

ENDIF.

IF SY-SUBRC = 0.

  • To write the data

LOOP AT ITAB1.

IF ITAB1-MRPVAL IS INITIAL.

MESSAGE E004(ZKK).

ELSE.

MOVE ITAB1-MRPVAL TO C_KBETR.

ENDIF.

ENDLOOP.

Thanks,

K.Kiran.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 08, 2007 at 03:25 AM
    START-OF-SELECTION.
    *AT SELECTION-SCREEN OUTPUT.
    PERFORM GETDATA.
    IF P_MATNR IS NOT INITIAL.
    UOM = T_MEINS.
    ENDIF.
    
    IF SY-SUBRC = 0.
    * To write the data
    LOOP AT ITAB1.
    IF ITAB1-MRPVAL IS INITIAL.
    MESSAGE E004(ZKK).
    ELSE.
    MOVE ITAB1-MRPVAL TO C_KBETR.
    ENDIF.
    ENDLOOP.
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 08, 2007 at 03:21 AM

    Comment line AT SELECTION-SCREEN OUTPUT.

    This is not required in Start of selection.

    Make above change and it should work.

    Else you can move the validation to the At selection-screen event.

    At selection-screen.

    AT SELECTION-SCREEN OUTPUT.

    PERFORM GETDATA.

    IF P_MATNR IS NOT INITIAL.

    UOM = T_MEINS.

    ENDIF.

    IF SY-SUBRC = 0.

    • To write the data

    LOOP AT ITAB1.

    IF ITAB1-MRPVAL IS INITIAL.

    MESSAGE E004(ZKK).

    ELSE.

    MOVE ITAB1-MRPVAL TO C_KBETR.

    ENDIF.

    ENDLOOP.

    Start-of-selection

    • Put your logic here.

    ashish

    Message was edited by:

    Ashish Gundawar

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Kiran K

      Check this out

      AT SELECTION-SCREEN OUTPUT.

      • Here you are getting UoM.

      PERFORM GETDATA.

      IF P_MATNR IS NOT INITIAL.

      UOM = T_MEINS.

      ENDIF.

      start-of-selection

      • Here add validation, i feel you are populating internal table with data ITAB1 in AT SELECTION SCREEN OUTPUT EVENT.

      If this is blank, display error message "No data found for selection criteria.".

      • To write the data

      LOOP AT ITAB1.

      IF ITAB1-MRPVAL IS INITIAL.

      MESSAGE E004(ZKK).

      ELSE.

      MOVE ITAB1-MRPVAL TO C_KBETR.

      ENDIF.

      ENDLOOP.