REPORT ZSAPN_EXIT.
DATA: IT_MARA TYPE TABLE OF MARA,
      WA_MARA TYPE MARA.
PARAMETERS: P_MATNR TYPE MARA-MATNR.

START-OF-SELECTION.
  SELECT SINGLE * FROM MARA INTO WA_MARA WHERE MATNR = P_MATNR.

  IF WA_MARA IS INITIAL.
    EXIT. “exit program
  ENDIF.
  WRITE:/ WA_MARA-MATNR, WA_MARA-MTART, WA_MARA-MATKL.
 
 
 
Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP MM SD Consultant
Contact : serkurumsal@yandex.com