Untitled
Coder2828
plain_text
a month ago
9.5 kB
5
Indexable
Technical Specification
Punchout Catalog – UNSPSC to SAP Material Mapping
1. Technical Object Details
Object Type
Object Name
Custom Table
ZTM_PUNCH_MAP
Enhancement Spot / BAdI
ME_CATALOG_INTERFACE_CUST
Module
SAP MM – Punchout Catalog Integration
Process
OCI Catalog → Purchase Requisition Creation
Purpose
Map Vendor UNSPSC Codes to SAP Material Numbers during Punchout cart transfer
2. Business Requirement
The business requirement is to enable automatic determination of SAP Material Numbers during Punchout catalog shopping cart transfer from external vendor catalogs into SAP Purchase Requisition creation.
The vendor catalog sends UNSPSC category codes and item descriptions through OCI integration. SAP should identify the corresponding SAP Material Number using a custom mapping table and populate the PR item accordingly.
Additionally:
Vendor item description should be retained
Long text should be populated in PR
Informational text indicating Punchout source should be added
Error handling and fallback logic should be implemented when mapping is unavailable
3. Technical Design Overview
During OCI cart checkout, the BAdI implementation of ME_CATALOG_INTERFACE_CUST will intercept the incoming catalog item data before Purchase Requisition creation.
The implementation will:
Read Vendor Catalog Service ID
Read UNSPSC code received from OCI catalog
Fetch corresponding SAP Vendor and Material Number from custom table ZTM_PUNCH_MAP
Populate PR item material number
Preserve vendor description
Populate long text
Handle mapping failures with appropriate validations and messages
4. Custom Table Design
Table Name
ZTM_PUNCH_MAP
Description
Punchout Catalog UNSPSC to SAP Material Mapping Table
Table Fields
Field Name
Data Element / Reference
Data Type
Length
Key
MANDT
MANDT
CLNT
3
X
VENDOR_CATALOG
SERVICE_ID
CHAR
20
X
LIFNR
LIFNR
CHAR
10
X
UNSPSC_CODE
ZUNSPSC_CODE
CHAR
10
X
MATNR
MATNR
CHAR
40
MAKTX
MAKTX
CHAR
40
ERDAT
ERDAT
DATS
8
ERNAM
ERNAM
CHAR
12
AEDAT
AEDAT
DATS
8
AENAM
AENAM
CHAR
12
Primary Key
MANDT
VENDOR_CATALOG
LIFNR
UNSPSC_CODE
5. Table Maintenance
Maintenance Generator
Table Maintenance Generator will be created for ZTM_PUNCH_MAP.
Custom Transaction Code
A custom transaction code will be created for maintaining mapping entries.
Example: ZPUNCH_MAP
Validations
The following validations will be implemented:
Duplicate Entry Prevention
System should prevent duplicate combinations of:
Vendor Catalog
Vendor
UNSPSC Code
Vendor Validation
System should validate:
Vendor exists in SAP
Vendor is active
Material Validation
System should validate:
Material exists in SAP
Material is not flagged for deletion
6. BAdI Implementation
BAdI Name
ME_CATALOG_INTERFACE_CUST
Implementation Name
ZIMP_PUNCHOUT_MAPPING
7. Processing Logic
Step 1 – OCI Cart Transfer
When user checks out items from vendor Punchout catalog, OCI data is transferred into SAP.
The incoming OCI structure contains:
Vendor catalog Service ID
Vendor item description
UNSPSC code (NEW_ITEM-MATGROUP)
Quantity
Price
Other OCI parameters
Step 2 – Read Mapping Table
System will:
Read Vendor Catalog Service ID
Read Vendor Number
Read UNSPSC Code
Query table ZTM_PUNCH_MAP
Sample Logic
Abap
SELECT SINGLE matnr
maktx
INTO (lv_matnr, lv_maktx)
FROM ztm_punch_map
WHERE vendor_catalog = lv_service_id
AND lifnr = lv_lifnr
AND unspsc_code = lv_unspsc.
Step 3 – Populate PR Item
If mapping exists:
Populate Material Number in PR item
Populate Vendor Number
Preserve vendor item description
Populate PR line item text
8. Handling Item Description and Long Text
Standard SAP Behavior
When Material Number is populated during PR creation, SAP standard logic derives description from Material Master (MAKT-MAKTX) and overwrites vendor description.
Custom Handling Logic
To preserve vendor catalog description:
Store incoming vendor description in local variable
Populate Material Number
Reassign vendor description back to PR item short text
Populate complete vendor description in Long Text
Short Text Logic
SAP short text field allows maximum 40 characters
If vendor description exceeds 40 characters:
Truncate to first 40 characters
Populate remaining/full text in Long Text
Long Text Population
Long text will contain:
Full vendor item description
Informational message
Example
Plain text
This PR/PO is created via Punchout Catalog
Vendor Description:
High Pressure Industrial Oxygen Cylinder – Medical Grade
9. Error Handling and Fallback Logic
Scenario 1 – Mapping Not Found
If no matching entry exists in ZTM_PUNCH_MAP:
System Behavior
Reject PR line item processing
Display error message
Error Message
Plain text
Item "<Vendor Item>" from Vendor "<Vendor Name>" could not be matched to a SAP Material.
Please contact catalog administrator.
Scenario 2 – Multiple Invalid Items
If cart contains unmapped items:
Error Message
Plain text
Your cart contains items that could not be mapped to SAP Material.
Please contact catalog administrator.
Scenario 3 – Successful Mapping
Success Log Message
Plain text
Item "<Vendor Item>" from Vendor "<Vendor Name>" mapped successfully to SAP Material "<MATNR>"
10. Logging
Application logging will be implemented using SAP Application Log framework (SLG1).
Log Object
ZPUNCH
Subobject
MAPPING
Logs will capture:
OCI Service ID
Vendor
UNSPSC Code
Material Number
Processing status
Error details
11. Authorization Considerations
Authorization for table maintenance transaction will be restricted to authorized support users only.
Authorization object:
S_TABU_DIS
12. Performance Considerations
Table access will use primary key fields
SELECT SINGLE statement will be used
Proper buffering may be enabled if required
No nested database access inside item loops
13. Technical Objects List
Object Type
Object Name
Custom Table
ZTM_PUNCH_MAP
Table Maintenance Generator
ZTM_PUNCH_MAP
Transaction Code
ZPUNCH_MAP
BAdI Implementation
ZIMP_PUNCHOUT_MAPPING
Message Class
ZPUNCH_MSG
Application Log Object
ZPUNCH
14. Testing Scenarios
Scenario
Expected Result
Valid UNSPSC mapping
PR created with Material Number
Invalid UNSPSC mapping
Error message displayed
Long vendor description
Truncated short text + full long text
Deleted material
Validation error
Duplicate table entry
Save prevented
Multiple cart items
All valid items mapped correctly
15. Assumptions
Vendor catalog sends valid UNSPSC code
OCI integration is already configured
Vendor Service ID is available during cart transfer
SAP Material Master already exists for mapped materials
16. Dependencies
OCI Punchout Catalog Configuration
Vendor Catalog Connectivity
SAP MM Purchase Requisition Process
Material Master Data AvailabilityEditor is loading...
Leave a Comment