Working with Check box (Module pool programming)

...Previous

Push button: Display

 

Push button: Cancel

3) Go to SE38.

 

Enter the following code:

*&---------------------------------------------------------------------*
*& Report  ZSCREEN_NEXTSCREEN                                          *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&                                                                     *
*&---------------------------------------------------------------------*

REPORT  ZSCREEN_NEXTSCREEN .
DATA : KUNNR TYPE KUNNR,
       NAME TYPE C,
       CITY TYPE C,
       ADDRESS TYPE C,
       OK_CODE LIKE SY-UCOMM.

DATA : NAME1 TYPE NAME1,
       ORT01 TYPE ORT01,
       ADRNR TYPE ADRNR.
DATA : W_NAME1 TYPE NAME1,
       W_ORT01 TYPE ORT01,
       W_ADRNR TYPE ADRNR.

CALL SCREEN 100.

*&---------------------------------------------------------------------*
*&      Module  CHECK_VALUES  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE CHECK_VALUES INPUT.
  IF OK_CODE EQ 'DISPLAY'.
  LEAVE TO LIST-PROCESSING.
SELECT SINGLE NAME1 ORT01 ADRNR  FROM KNA1 INTO (W_NAME1, W_ORT01, W_ADRNR)  WHERE KUNNR = KUNNR.
      IF NAME EQ 'X'.
      WRITE : W_NAME1.
      NAME1 = W_NAME1.
      ENDIF.
      IF CITY EQ 'X'.
      WRITE : W_ORT01.
      ORT01 =  W_ORT01.
      ENDIF.
      IF ADDRESS EQ 'X'.
     ADRNR = W_ADRNR.
     WRITE : W_ADRNR.
      ENDIF.
    ELSEIF OK_CODE EQ 'CANCEL' OR OK_CODE EQ 'BACK'.
      LEAVE PROGRAM.
      ENDIF.
  ENDMODULE.                 " CHECK_VALUES  INPUT
            " PBO  OUTPUT

Execute the program 

 

 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image