Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Header line

* Validation of Sales Organization
  CLEAR vbak.
  IF NOT s_vkorg-low IS INITIAL.
    SELECT vkorg FROM vbak UP TO 1 ROWS
    INTO vbak-vkorg
    WHERE vkorg IN s_vkorg.
    ENDSELECT.
    IF sy-subrc NE 0.
      MESSAGE e009(zabc). " Invalid Sales Organization
    ENDIF.
  ENDIF.


* Validation of Distribution Channel
  CLEAR vbak.
  IF NOT s_vtweg-low IS INITIAL.
    SELECT vtweg FROM tvtw UP TO 1 ROWS
    INTO vbak-vtweg
    WHERE vtweg IN s_vtweg.
    ENDSELECT.
    IF sy-subrc NE 0.
      MESSAGE e010(zabc). " Invalid Distribution Channel
    ENDIF.
  ENDIF.

In this code when i give wrong input for sales organisation,it shows the message "invalid sales organisation",but when i give wrong input for distribution channel also,then also it shows the same message instead of "Invalid distribution channel".Can u plz tell me what to do.it's urgent.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question