title: Automatic filling of NAME_1 when entered a valid KUNNR - SM30
body: <p>I've made a table with three fields: KUNNR, NAME_1 and Z_CLASS. KUNNR has KUNNR as data element, NAME_1 has NAME1_GP and Z_CLASS has a data element that I made with 3 values (1, 2 or 3). I've made the table maintenance generator and put some data in with SM30. Now, I need to make the name of the client show automatically (NAME_1) when I enter a client number (KUNNR) and press enter; and need to make sure that the Z_CLASS is filled and not leaved in blank. I don't really know how to search for the solution because I'm new to SAP. Thank you.</p>
  
  <pre><code>PROCESS BEFORE OUTPUT.
   MODULE LISTE_INITIALISIEREN.
   LOOP AT EXTRACT WITH CONTROL
    TCTRL_Z10FICLASSFICA CURSOR NEXTLINE.
     MODULE LISTE_SHOW_LISTE.
   ENDLOOP.
  *
  PROCESS AFTER INPUT.
   MODULE LISTE_EXIT_COMMAND AT EXIT-COMMAND.
   MODULE LISTE_BEFORE_LOOP.
   LOOP AT EXTRACT.
     MODULE LISTE_INIT_WORKAREA.
     CHAIN.
      FIELD Z10FICLASSFICA-KUNNR .
      FIELD Z10FICLASSFICA-NAME1 .
      FIELD Z10FICLASSFICA-Z_CLASS .
      MODULE SET_UPDATE_FLAG ON CHAIN-REQUEST.
     ENDCHAIN.
     FIELD VIM_MARKED MODULE LISTE_MARK_CHECKBOX.
     CHAIN.
      FIELD Z10FICLASSFICA-KUNNR .
      MODULE LISTE_UPDATE_LISTE.
     ENDCHAIN.
   ENDLOOP.
   MODULE LISTE_AFTER_LOOP.
  </code></pre>