SAP ABAP Report Programming
SAP ABAP Report Programming
TABLES: GFG.
INITIALIZATION.
gv_count = 0.
START-OF-SELECTION.
SELECT * FROM GFG INTO TABLE @lt_GFG WHERE matnr = @pv_material.
END-OF-SELECTION.
WRITE: / 'Total Materials Found:', gv_count.
TOP-OF-PAGE.
WRITE: / 'Material Report for:', pv_material.
Output:
Assuming you run the report with a valid material number, the output will
look something like this:
Material Report for: [Your Input Material Number]
Total Materials Found: [Number of Materials Found for the Given
Material Number]
Replace [Your Input Material Number] with the material number you
provided as a parameter, and [Number of Materials Found for the Given
Material Number] with the actual count of materials in the GFG table for the
specified material number.
For example, if you run the report with pv_material set to ‘1000000001’, and
there are three records with this material number in the GFG table, the output
might look like:
Material Report for: 1000000001
Total Materials Found: 3