Skip to content

Instantly share code, notes, and snippets.

View weiserman's full-sized avatar

Warren Eiserman weiserman

View GitHub Profile
@weiserman
weiserman / ZBRF.abap
Created October 29, 2026 14:23
ABAP to read BRF Plus rule
"! BRF+-backed implementation of YIF_MATDET_OFFSET_RULE. The
"! valid-from offset (in days) depends on the record's NEW/SUCCESSOR
"! classification:
"! NEW -> fixed 0 days (effective immediately, no BRF+ lookup)
"! SUCCESSOR -> read from the BRF+ decision table behind function
"! GET_VALID_FROM_OFFSET (application YMDG_MATDET,
"! per Sales Org, maintained in tx BRFPLUS). The
"! predecessor record is auto-end-dated by standard
"! condition maintenance at the successor's start - 1
"! (same condition key).
@weiserman
weiserman / z_custom_error_rate.abap
Created October 11, 2026 04:32
Automation error rate
REPORT z_custom_error_rate.
TABLES: tbtco, apqi, swwwihead.
*----------------------------------------------------------------------*
* Selection Screen
*----------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
" Default to the last 30 days to prevent full table scans
SELECT-OPTIONS: s_date FOR tbtco-enddate OBLIGATORY DEFAULT sy-datum - 30 TO sy-datum.
@weiserman
weiserman / zcl_prc_ntf_provider.abap
Created October 10, 2026 19:53
ABAP Process Center: Notification Provider
CLASS zcl_prc_ntf_provider DEFINITION
PUBLIC FINAL
CREATE PUBLIC.
PUBLIC SECTION.
INTERFACES /iwngw/if_notif_provider.
CONSTANTS c_provider_id TYPE /iwngw/if_notif_provider=>ty_s_provider-id VALUE 'ZPRC_NOTIF_PROVIDER'.
CONSTANTS c_type_version TYPE /iwngw/if_notif_provider=>ty_s_notification-type_version VALUE '1'.
@weiserman
weiserman / ABAP PRC.md
Created September 28, 2026 12:21
ABAP Processing Errors - Issues and Workarounds

ABAP-PRC on s4-2025: installation findings and fixes

System: S/4HANA 2025 (SAP_BASIS 816), client 100. Repository: https://github.com/brandeis-consulting/abap-prc (v0.1.0 + commit e6d006f "Improved jobs"). Status on 2026-09-28: core + demo installed and working; one open issue (#15).


A. Installation problems and how they were solved

@weiserman
weiserman / zcl_equip_scan.abap
Created August 22, 2026 09:31
Equipment Scan
CLASS zcl_equip_scan DEFINITION PUBLIC.
PUBLIC SECTION.
INTERFACES z2ui5_if_app.
TYPES:
BEGIN OF ty_s_issue,
issue_id TYPE string,
problem_text TYPE string,
severity TYPE string,
@weiserman
weiserman / YVB11_MAT_SUB_LOADER.abap
Created June 17, 2026 11:34
Condition Record Save (ABAP)
*&---------------------------------------------------------------------*
*& Report YVB11_MAT_SUB_LOADER
*&---------------------------------------------------------------------*
*& Material determination (VB11) loader using RV_MAT_SUB_SAVE.
*&
*& What this does:
*& - Allocates a fresh KNUMH from number range object KOND
*& - Builds VAKEDB (variable key) for condition table KOTD001
*& - Builds KONDDVB (substitution material + reason) row
*& - Builds KONDDPVB (additional substitution materials) — empty in
@weiserman
weiserman / ABAP Trial
Created April 7, 2026 11:53
SAP_Developer_Edition_Setup_Guide.md
# SAP ABAP Cloud Developer Trial 2023 — Docker Setup Guide
**Image:** `sapse/abap-cloud-developer-trial:2023`
**Add-on:** ABAP Accelerator MCP Server (AI-assisted development via Amazon Q Developer / Kiro)
**Environment:** Mac Studio → Docker Desktop (macOS) + SAP GUI for Windows via Parallels
**Last updated:** April 2026
---
## Prerequisites
_schema-version: 3.3.0
ID: dbtest
version: 1.0.0
description: "A simple CAP project."
parameters:
enable-parallel-deployments: true
deploy_mode: html5-repo
build-parameters:
before-all:
- builder: custom
@weiserman
weiserman / annotation
Created February 3, 2026 04:48
annotation example
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/UI.xml">
<edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="UI" />
</edmx:Reference>
<edmx:Reference Uri="/sap/opu/odata4/sap/zap_comm_ui_v4/srvd/sap/zap_comm_ui/0001/$metadata">
<edmx:Include Namespace="com.sap.gateway.srvd.zap_comm_ui.v0001" Alias="SAP__self" />
</edmx:Reference>
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="local">
<Annotations Target="SAP__self.EmailType">
@weiserman
weiserman / zgoog_cl_qs_address_validation
Created January 15, 2026 08:03
Check Address Data - ABAP Cloud with Google SDK
CLASS zgoog_cl_qs_address_validation DEFINITION
PUBLIC FINAL
CREATE PUBLIC.
PUBLIC SECTION.
INTERFACES if_oo_adt_classrun.
ENDCLASS.
CLASS zgoog_cl_qs_address_validation IMPLEMENTATION.