Skip to Content

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

report validations

Hi frnds,

i m giving my selection screen validations code, but its not giving error statement.

can anyone correct me where i am wrong or what more shuld i write in the code to do the exact validations.

<code>

PERFORM VALID_CUST.

PERFORM VALID_SALES.

FORM VALID_CUST.

IF SO_CUST[] IS NOT INITIAL.

SELECT SINGLE KUNNR FROM KNA1 INTO V_KNA1 WHERE KUNNR IN SO_CUST.

IF SY-SUBRC EQ 0.

ELSE.

MESSAGE E000(ZRAJ) WITH 'PLZ ENTER VALID CUSTOMER DOCUMENT NUMBER'.

ENDIF.

ENDIF.

ENDFORM.

FORM VALID_SALES.

IF SO_SALES[] IS NOT INITIAL.

SELECT SINGLE VBELN FROM VBAK INTO V_VBAK WHERE VBELN IN SO_SALES.

IF SY-SUBRC EQ 0.

ELSE.

MESSAGE E001(ZRAJ) WITH 'PLZ ENTER VALID SALES DOCUMENT NUMBER'.

ENDIF.

ENDIF.

ENDFORM.

</code>

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