ABAP Conversion Exits: ALPHA, MATN1, CUNIT and Interface Boundaries
Conversion exits translate between SAP internal values and external/display values for DDIC fields, for example ALPHA zero-padding, MATN1 material-number formatting, CUNIT unit formatting, or ISOLA language codes. They are presentation/interface conversions, not business validation. Use the conversion routine assigned to the DDIC field or a released API, and avoid manual string padding that breaks with extended keys or language-dependent formats.
Practical reference for ABAP Conversion Exits: ALPHA, MATN1, CUNIT and Interface Boundaries, including how the mechanism works, when it is appropriate, where it fits in SAP runtime/architecture, a realistic example, decision guidance, failure patterns, S/4HANA direction and operational ownership.
Reviewed by an ERPClimb SAP consultant on 20 Sept 2026· 781 words
What it is
A conversion exit is a pair of function modules named CONVERSION_EXIT_<name>_INPUT and _OUTPUT attached to a data element/domain. INPUT converts an external representation into the internal form used by ABAP/database keys; OUTPUT converts internal values to user/external display form. ALPHA commonly adds/removes leading zeros; CUNIT/LUNIT resolve unit representations from unit customizing; ISOLA maps SAP and ISO language codes; MATN1 handles material-number formatting. The exit belongs to the field's DDIC semantics, so the correct conversion should come from metadata rather than a developer's guess about how a key looks.
When to use it
Use conversion exits at boundaries where human/external representations meet internal SAP keys: file imports, custom selection screens, generic tools, legacy RFC payloads, or API wrappers whose contract explicitly uses internal format. Do not apply a conversion again if the consuming framework already performs DDIC conversion automatically. For modern OData/CDS/business APIs, inspect the external contract because the service may expose normalized external keys or typed units/languages without requiring manual function-module calls.
How it fits the stack
Conversion exits are part of the ABAP Dictionary/runtime presentation model. Dynpro selection screens, ALV, classic RFC/BAPI interfaces and generic field processing can invoke them automatically or explicitly. They are distinct from quantity conversion, currency conversion, tax calculation and business validation. Material-number extension in S/4HANA is a good example: code that manually pads to 18 characters can corrupt data, while MATNR-typed fields and the proper conversion logic adapt to the configured length.
A worked example
An inbound CSV contains customer number '4711'. The target BAPI expects the internal KUNNR format. A developer concatenates six zeros and the interface works until a different key length or object type is used. A safer implementation derives the DDIC type or uses the ALPHA input conversion for the correct field, then passes the typed result. For material numbers, the team avoids generic ALPHA assumptions and uses MATNR typing/MATN1 semantics because extended material numbers have different rules.
How to choose
- Use the conversion routine assigned to the DDIC field; do not infer one from how a sample value looks.
- Apply conversion once at the external/internal boundary, then keep internal values typed consistently.
- Prefer typed APIs/CDS contracts that already handle external representation.
- Distinguish key formatting from semantic validation and from unit/currency quantity conversion.
- Regression-test conversions when S/4HANA key-length extensions or internationalization are part of the migration.
Common pitfalls
- Manually padding zeros for every SAP key as if all domains used ALPHA.
- Applying OUTPUT conversion and then using the display value as a database key.
- Double-converting data because the screen/framework already ran the DDIC conversion exit.
- Using CUNIT/LUNIT interchangeably without checking the data element's assigned routine.
- Hard-coding legacy material-number lengths in S/4HANA.
ECC, S/4HANA and clean core
Conversion exits remain common in S/4HANA classic ABAP, but modern APIs increasingly hide internal key representation behind released external contracts. Extended material numbers make correct typing especially important. ABAP Cloud code cannot freely call unreleased classic function modules, so use released conversion APIs or language/CDS capabilities where available while preserving the same boundary principle.
Whose problem this is
ABAP/integration developers own correct conversion at interface boundaries. Data-model owners define the DDIC type/routine. Functional teams confirm whether an external value is genuinely a key format issue versus invalid master data. Interface architects should document whether payload keys are internal SAP format or business/display format.
Related SAP objects
Reviewed pages this object connects to in the ERPClimb knowledge graph.
Source: ERPClimb — https://erpclimb.com/sap-technical-topics/abap-conversion-exitsERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.