Project Goal
Build a simple report that displays material data:
- ABAP version using ALV
- Python version using pandas + Bokeh
This is the moment where things click. You're building something real.
ABAP Version
DATA: lt_materials TYPE TABLE OF mara.
SELECT matnr, mtart, matkl
FROM mara
INTO TABLE lt_materials
UP TO 100 ROWS.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
TABLES
t_outtab = lt_materials.
Python Version (Step by Step)
Step 1: Install Dependencies
pip install pandas bokeh
Step 2: Sample Data (CSV)
matnr,mtart,matkl
1001,FERT,001
1002,HALB,002
1003,FERT,003
Step 3: Python Script
import pandas as pd
from bokeh.models import ColumnDataSource, DataTable, TableColumn
from bokeh.io import show
# Load data
df = pd.read_csv("materials.csv")
# Convert to Bokeh source
source = ColumnDataSource(df)
# Define columns
columns = [
TableColumn(field="matnr", title="Material"),
TableColumn(field="mtart", title="Type"),
TableColumn(field="matkl", title="Group")
]
# Create table
table = DataTable(source=source, columns=columns, width=800)
# Show result
show(table)