F How to add page number in SAP ABAP Report | CodeTheta

How to add page number in SAP ABAP Report

August 31, 2019

Code :
REPORT ZVP_PAGE_NUMBER LINE-COUNT 30(5).

TYPESBEGIN OF TY_MARA,
         MATNR TYPE MARA-MATNR,
         ERNAM TYPE MARA-ERNAM,
         MTART TYPE MARA-MTART,
         MATKL TYPE MARA-MATKL,
         MEINS TYPE MARA-MEINS,
       END OF TY_MARA.

DATAIT_MARA  TYPE STANDARD TABLE OF TY_MARA,
      WA_MARA  TYPE TY_MARA,
      LV_MATNR TYPE MARA-MATNR.

SELECT-OPTIONSS_MATNR FOR LV_MATNR.

SELECT MATNR
       ERNAM
       MTART
       MATKL
       MEINS
  FROM MARA INTO TABLE IT_MARA
  WHERE MATNR IN S_MATNR.

LOOP AT IT_MARA INTO WA_MARA.
  WRITE:/ WA_MARA-MATNR,
          WA_MARA-ERNAM,
          WA_MARA-MTART,
          WA_MARA-MATKL,
          WA_MARA-MEINS.
ENDLOOP.

WRITE:'PAGE NUMBER - ',SY-PAGNO.

Output :


IDE Used To Test This Code : SAP Login 730.

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