REPORT ZJHSOFTECH_KNA1_REP.

tables: KNA1.

TYPES: BEGIN OF ST_KNA1,
         KUNNR TYPE KUNNR,
         NAME1 TYPE NAME1_GP,
         ORT01 TYPE ORT01_GP,
         PSTLZ TYPE PSTLZ,
         LAND1 TYPE LAND1_GP,
       END OF ST_KNA1.

DATA: IT_KNA1 TYPE STANDARD TABLE OF   ST_KNA1,
      W_KNA1 TYPE ST_KNA1.

SELECT-OPTIONS: S_KUNNR FOR KNA1-KUNNR.
PARAMETERS: P_LAND1 TYPE LAND1_GP.

SELECT KUNNR NAME1 ORT01 PSTLZ LAND1
       FROM KNA1 INTO TABLE IT_KNA1
      WHERE KUNNR IN S_KUNNR
        AND LAND1 EQ P_LAND1.

LOOP AT IT_KNA1 INTO W_KNA1.
  WRITE: / W_KNA1-KUNNR,
           W_KNA1-NAME1,
           W_KNA1-ORT01,
           W_KNA1-PSTLZ,
           W_KNA1-LAND1.
ENDLOOP.



Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP S/4 HANA Logistics Team Lead
Contact : serkurumsal@yandex.com