Code :
REPORT ZVP_PRACTICE.
TYPES: BEGIN OF ST_EKKO,
EBELN TYPE EKKO-EBELN,
BUKRS TYPE EKKO-BUKRS,
BSART TYPE EKKO-BSART,
END OF ST_EKKO.
DATA: IT_EKKO TYPE STANDARD TABLE OF ST_EKKO,
WA_EKKO TYPE ST_EKKO,
LV_VAR TYPE I.
SELECT EBELN
BUKRS
BSART
FROM EKKO INTO TABLE IT_EKKO UP TO 10 ROWS WHERE BUKRS = '3000'.
IF SY-SUBRC = 0.
LOOP AT IT_EKKO INTO WA_EKKO.
WRITE:/ WA_EKKO-EBELN, '|',
WA_EKKO-BUKRS, '|',
WA_EKKO-BSART, '|'.
ULINE.
ENDLOOP.
ENDIF.
DESCRIBE TABLE IT_EKKO LINES LV_VAR.
WRITE: 'TOTAL ROWS ARE :',LV_VAR.
Output :
IDE Used To Test This Code : SAP Login 370.
Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.
REPORT ZVP_PRACTICE.
TYPES: BEGIN OF ST_EKKO,
EBELN TYPE EKKO-EBELN,
BUKRS TYPE EKKO-BUKRS,
BSART TYPE EKKO-BSART,
END OF ST_EKKO.
DATA: IT_EKKO TYPE STANDARD TABLE OF ST_EKKO,
WA_EKKO TYPE ST_EKKO,
LV_VAR TYPE I.
SELECT EBELN
BUKRS
BSART
FROM EKKO INTO TABLE IT_EKKO UP TO 10 ROWS WHERE BUKRS = '3000'.
IF SY-SUBRC = 0.
LOOP AT IT_EKKO INTO WA_EKKO.
WRITE:/ WA_EKKO-EBELN, '|',
WA_EKKO-BUKRS, '|',
WA_EKKO-BSART, '|'.
ULINE.
ENDLOOP.
ENDIF.
DESCRIBE TABLE IT_EKKO LINES LV_VAR.
WRITE: 'TOTAL ROWS ARE :',LV_VAR.
Output :
IDE Used To Test This Code : SAP Login 370.
Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.
Post a Comment