All CORE ABAP interview questions in one place, grouped by topic. Each group is copied from the "Interview questions" part of its page – read the page when an answer needs more depth. HANA, CDS, RAP and Clean Core questions are on the ABAP on HANA section's interview page.
How to practise: cover the answer, say yours out loud in 30–60 seconds, then compare.
01 · SAP & ABAP Basics
1. Explain the SAP 3-tier architecture.
Presentation (SAP GUI / browser) only displays screens; the application layer (one or more AS ABAP instances with dispatcher and work processes) runs all ABAP code; the database stores data and programs. Scale by adding application server instances; there is one database per system.
2. What is the role of the dispatcher?
It receives every request of an instance, queues it and passes it to a free work process; it also starts and monitors the work processes, gateway and ICM and talks to other instances through the message server.
3. Name the work process types.
Dialog (DIA), update V1 (UPD), update V2 (UP2), background (BTC), spool (SPO) and – in older set-ups – enqueue (ENQ); today locks are handled by the standalone enqueue server in the central services. Monitor with SM50/SM66.
4. What is the difference between SID, instance and client?
SID = 3-character ID of the whole system; instance = one application server with a 2-digit number; client = a self-contained business unit inside the system with its own users and data (field MANDT).
5. Client-dependent vs client-independent – give examples.
Client-dependent: master data, transaction data, most customizing, users – table has MANDT as first key field. Client-independent: programs, DDIC objects, classes, cross-client customizing such as T000 – visible in all clients.
6. Workbench request vs customizing request?
Workbench requests carry repository objects (and cross-client customizing); customizing requests carry client-specific customizing. Both are released in SE09/SE10 (tasks first) and imported with STMS. Objects in $TMP are local and cannot be transported.
7. Why does SAP use an update work process?
So a dialog user does not wait for database writes: changes registered with CALL FUNCTION … IN UPDATE TASK are collected and written together at COMMIT WORK – the whole SAP LUW succeeds or is rolled back.
8. What does RICEFW stand for? Interface vs conversion?
Reports, Interfaces, Conversions, Enhancements, Forms, Workflow. An interface is a continuous exchange with another system (RFC, IDoc, OData); a conversion is a one-time data load at go-live (Migration Cockpit, BAPIs, LSMW/BDC in older systems). RICEFW is still used in S/4HANA projects; only the technology changes – CDS and Fiori analytics for reports, released APIs / OData / Integration Suite for interfaces, Migration Cockpit for conversions, released BAdIs, extension points and side-by-side extensions for enhancements, Adobe Forms for forms, Flexible Workflow for workflows.
9. Can a variable of type I hold 2.5? Which type do you use for amounts?
No – I holds whole numbers; 2.5 is rounded to 3. Use type P with decimals (or the DDIC types CURR/DEC) for amounts; never F, because binary floating point has rounding errors.
10. TYPE vs LIKE?
TYPE refers to a data type (built-in, DDIC or local TYPES); LIKE refers to an existing data object. Both are valid modern ABAP.
11. What is ADT and why is it required?
ABAP Development Tools = Eclipse-based IDE. CDS views, AMDP, RAP behavior definitions and service bindings can only be edited there, and ABAP Cloud development is ADT-only. SE80 remains for classic objects like dynpros and Smart Forms.
12. Which methodology do S/4HANA projects use, and what are greenfield/brownfield?
SAP Activate: Discover, Prepare, Explore, Realize, Deploy, Run (ASAP is the legacy method). Greenfield = new implementation; brownfield = system conversion of an existing ECC; bluefield = selective data transition.
02 · Data Dictionary (DDIC)
1. Domain vs data element?
Domain = technical attributes (type, length, value range, conversion routine, lowercase). Data element = semantic attributes (field labels, F1 help, search help, parameter ID) and refers to a domain. One domain can serve many data elements.
2. What is a conversion routine and when does it run?
Two function modules CONVERSION_EXIT_xxxxx_INPUT/OUTPUT assigned in the domain, converting between display and internal format. They run on screen fields, WRITE, ALV and SE16 – not on assignments or ABAP SQL, so data from files or code must be converted explicitly (ALPHA = IN or the function module).
3. Explain delivery class and data class.
Delivery class (A, C, L, G, E, S, W) controls how table data is treated in installation, upgrade, client copy and transport – A for application data, C for customer customizing. Data class (APPL0 master, APPL1 transaction, APPL2 organisation/customizing) is the logical storage area in the database.
4. Types of table buffering? Is buffering still used in S/4HANA?
Single-record, generic area (left part of the key) and full buffering. Yes – app-server memory is faster than any database call, so small read-mostly tables are still buffered on HANA. Bypassed by BYPASSING BUFFER, FOR UPDATE, aggregates, DISTINCT, joins, native SQL.
5. Check table vs value table?
The check table is the table referenced by a foreign key; its key defines allowed values and gives F4. The value table is set in the domain and is only the proposal for the check table when you create the foreign key – it checks nothing.
6. Are foreign keys checked when a program inserts data?
No. Foreign keys and domain fixed values are checked only on screens (dynpro, selection screen, SM30). ABAP SQL writes any value, so programs and RAP validations must check.
7. Append structure vs include structure?
An append structure is created by the customer for one SAP table to add ZZ/YY fields without a modification and survives upgrades. An include structure is a reusable group of fields inserted with .INCLUDE into many tables or structures. Customizing includes (CI_*) are empty includes prepared by SAP.
8. Structure vs table type vs work area vs internal table?
Structure and table type are types (no memory): a structure describes one row, a table type an internal table (line type, table kind, key). A work area is a data object of a structure type; an internal table is a data object of a table type.
9. Database view vs maintenance view vs help view? What replaces them?
Database view: inner join, read-only for several tables, used in programs. Maintenance view: tables linked by foreign keys, maintained in SM30 via a generated TMG. Help view: left outer join, only for search helps. For new read scenarios use CDS view entities.
10. Elementary vs collective search help, and what is a search help exit?
Elementary = one selection method with its parameters (IMP/EXP, LPOS, SPOS) and dialog type; collective = several elementary helps as tabs. A search help exit is a function module with the interface of F4IF_SHLP_EXIT_EXAMPLE that changes the F4 process at steps like SELECT and DISP.
11. How do lock objects work? Which lock modes exist?
A lock object (EZ…) generates ENQUEUE_/DEQUEUE_ function modules that write entries to the enqueue server's lock table (SM12). Locks are logical – every program must call them. Modes: S shared, E exclusive cumulative, X exclusive non-cumulative, O optimistic. FOREIGN_LOCK tells you who holds it.
12. How do you let users maintain a custom table?
Allow maintenance in the table, generate a TMG in SE54 (authorization group, function group, one/two-step), add events if needed (e.g. 05 to fill created-by), and create a parameter transaction for SM30 with VIEWNAME and UPDATE = X and skip initial screen.
03 · Report Programming & ALV
What is the order of events in a report, and which one is the default?
LOAD-OF-PROGRAM → INITIALIZATION → AT SELECTION-SCREEN OUTPUT → (screen) → AT SELECTION-SCREEN ON … / AT SELECTION-SCREEN → START-OF-SELECTION → END-OF-SELECTION; TOP-OF-PAGE / END-OF-PAGE during list output; AT LINE-SELECTION / AT USER-COMMAND after the list is shown. The default event is START-OF-SELECTION.
What is the difference between INITIALIZATION and AT SELECTION-SCREEN OUTPUT?
INITIALIZATION runs once before the first display – set default values. AT SELECTION-SCREEN OUTPUT runs before every display (also after Enter or an error) – change screen attributes with LOOP AT SCREEN.
AT SELECTION-SCREEN vs AT SELECTION-SCREEN ON field?
Both validate input. After an E message in ON field only that field is ready for input; after an E message in AT SELECTION-SCREEN all fields are open again. ON BLOCK / ON RADIOBUTTON GROUP work the same per group.
PARAMETERS vs SELECT-OPTIONS? What is a range table?
PARAMETERS = one input field and variable. SELECT-OPTIONS = multiple values, intervals and exclusions; it creates a range table with SIGN, OPTION, LOW, HIGH, used with IN in SQL. An empty select-option selects everything. A range without screen field is TYPE RANGE OF (old: RANGES).
Standard, sorted and hashed tables – when do you use which?
Standard: index access, small tables, appending in order (linear key search). Sorted: always sorted by key, binary search, good for partial keys and LOOP … WHERE on the key. Hashed: unique key only, constant access time, best for big lookup tables read by the full key.
What is the difference between SY-TABIX and SY-INDEX?
SY-TABIX is the current row index of an internal table (LOOP AT, READ TABLE). SY-INDEX counts the passes of DO and WHILE loops.
What does COLLECT do? What is the default of SORT?
COLLECT inserts a row or, if a row with the same key exists, adds up its numeric fields. SORT without BY sorts ascending by the primary table key (standard key = all character-like fields); use SORT … BY and STABLE to be explicit.
What are the rules for FOR ALL ENTRIES?
Check the driver table is not empty (otherwise all rows are read), select the full key (duplicates are removed from the result), compare fields of the same type, and remove duplicate driver entries for speed. On HANA prefer a join or CDS view.
What are control break statements and what do you need to watch?
AT FIRST, AT NEW f, AT END OF f, AT LAST inside a LOOP. The table must be sorted by the control fields; AT NEW / AT END OF also react to changes in fields left of f; fields to the right are initial inside the block; SUM gives totals. ON CHANGE OF is obsolete and not a control level.
How do you pass data from the basic list to a secondary list?
HIDE stores field values per list line and restores them in AT LINE-SELECTION; GET CURSOR returns the clicked field and value; SY-LISEL holds the line text; SY-LSIND tells the list level (max 20).
ABAP memory vs SAP memory?
ABAP memory (EXPORT/IMPORT … MEMORY ID) is shared by the internal sessions of one call chain and holds any data incl. tables. SAP memory (SET/GET PARAMETER ID) is shared by all sessions of the user's logon, holds only flat character values and prefills screen fields.
Which ALV would you use today, and what is a field catalog?
CL_SALV_TABLE for read-only lists, CL_GUI_ALV_GRID (in a container) for editable grids, ALV with IDA for huge HANA tables; REUSE_ALV_* only in old code. The field catalog describes each column (name, heading, position, colour, totals, edit); it can be generated automatically, semi-automatically or built manually.
04 · Modularization & Debugging
What modularization techniques are there in ABAP, and which do you use today?
Includes, subroutines, function modules, macros and methods (plus event blocks and dialog modules). New code: methods of classes; function modules where they are required (RFC, BAPIs, update tasks); includes only for structure. Subroutines are obsolete; macros only in exceptional cases (not in ABAP Cloud).
What is the difference between an include and a subroutine?
An include is copied into the program at compile time – no interface, no call, not runnable alone. A subroutine is called with PERFORM at runtime and has parameters.
Explain pass by reference, pass by value and pass by value and result.
By reference: the formal parameter uses the caller's memory, changes are visible at once (default). By value: a copy, the caller's value never changes. By value and result (CHANGING VALUE): a copy that is written back only when the routine ends normally – not after an error message.
Subroutine vs function module?
A FORM belongs to one program, has a weak positional interface and no exceptions. An FM is stored centrally in a function group, has a named interface with optional parameters and exceptions, can be remote-enabled or an update module, and can be called from any program.
What is a function group, and why does its TOP include matter?
The container (program type F, main program SAPL<fg>) for related FMs. The whole group is loaded once per internal session; global data in the TOP include is shared by all its FMs and keeps its values between calls – useful for buffers, a source of bugs if forgotten.
What are the parts of an FM interface? Which are obsolete?
Import, Export, Changing, Tables, Exceptions. TABLES is obsolete (use table types). Exports are always optional; imports and changings can be optional with defaults. Parameters are by reference unless Pass Value is ticked; RFC FMs must pass by value.
How are FM exceptions handled?
Classic: the FM raises with RAISE or MESSAGE … RAISING, the caller lists EXCEPTIONS name = n OTHERS = m and checks SY-SUBRC; an unhandled exception dumps. Class-based: RAISING zcx_… in the FM, TRY … CATCH at the caller. The two kinds can't be mixed in one FM.
Why should macros be avoided?
They are text replacement: hard to read, can't be stepped through in the debugger (one step), no type check of the call, not allowed in ABAP Cloud. Use a method.
What message types exist and how does E behave in different places?
A, E, W, I, S, X. E in PAI or AT SELECTION-SCREEN keeps the user on the screen to correct the input (fields reopened via FIELD/CHAIN/ON f); E in START-OF-SELECTION ends the program; in a background job E cancels the job. X always dumps.
What breakpoint types do you know?
Debugger breakpoints, session breakpoints (current logon), external/user breakpoints (all sessions of the user incl. HTTP and RFC, 2 hours), static BREAK-POINT / BREAK user, checkpoint groups (BREAK-POINT ID, SAAB), dynamic /h, plus breakpoints at statement / FM / method / exception and watchpoints.
How do you debug a background job, an update module and a popup?
Background job: SM37 + JDBG (finished/scheduled) or SM50 → Program → Debugging (running). Update module: switch on Update Debugging before COMMIT WORK. Popup: drag & drop a text file with Command=/H and Type=SystemCommand onto it.
How do you find a user exit or BAdI with the debugger?
Start the transaction with /h and set breakpoints at the statements CALL CUSTOMER-FUNCTION, GET BADI and CALL BADI (and method CL_EXITHANDLER=>GET_INSTANCE for classic BAdIs), then continue with F8 – every stop is a possible enhancement point (page 10).
05 · Dialog Programming (Module Pool)
What is the difference between an executable program and a module pool?
A report (type 1) is driven by runtime events, starts with F8/SUBMIT and can run as a background job. A module pool (type M) is driven by user actions on its own screens, can only be started with a dialog transaction code and runs in background only via batch input.
What are the components of a module pool?
The ABAP program (global data, PBO/PAI modules), screens (attributes, layout, element list, flow logic), GUI status and GUI title (SE41), and the transaction code (SE93) that names the first screen.
Which flow logic events exist?
PBO before the screen is shown, PAI after a user action, POH on F1 and POV on F4. PBO and PAI are created with every screen.
How do you handle the OK_CODE and why do you clear it?
Declare an OK field (type OK) in the element list and a global ok_code TYPE sy-ucomm, copy it to save_ok, CLEAR ok_code, then CASE on save_ok. Without CLEAR, pressing Enter on the next screen would repeat the old function code.
CALL SCREEN vs SET SCREEN vs LEAVE TO SCREEN?
CALL SCREEN starts a new screen sequence on top of the current one and returns after it. SET SCREEN only sets the next screen; the current PAI continues. LEAVE TO SCREEN = SET SCREEN + LEAVE SCREEN, it replaces the current screen immediately. LEAVE TO SCREEN 0 returns to the caller.
What is AT EXIT-COMMAND used for?
To leave a screen (Back, Exit, Cancel) without the automatic input checks. The function codes get function type E, and the module MODULE … AT EXIT-COMMAND runs before all checks and other PAI modules.
Why do you need CHAIN … ENDCHAIN?
After an E or W message in PAI the screen comes back without PBO and only fields linked to the check are ready for input. CHAIN groups several fields with their check module so exactly these fields reopen for correction (single field: FIELD f MODULE m). ON CHAIN-REQUEST runs the check only if a field changed.
What types of validations are there in dialog programs?
Automatic checks (required, format, DDIC foreign keys and fixed values), flow-logic checks with FIELD … VALUES / SELECT (obsolete), and module checks with FIELD … MODULE and CHAIN.
How do you use a subscreen, and what happens if you forget CALL SUBSCREEN in PAI?
Draw a subscreen area, create a screen of type Subscreen and call it with CALL SUBSCREEN area INCLUDING sy-repid nnnn in PBO and CALL SUBSCREEN area in PAI. Without the PAI call the subscreen's PAI modules and data transport never run, so its input is lost.
How does a table control work?
Declared with CONTROLS … TYPE TABLEVIEW. In PBO, LOOP AT itab … WITH CONTROL fills the visible rows; in PAI, LOOP AT itab returns each row and a module writes it back with MODIFY … INDEX tc-current_line. Set tc-lines for scrolling.
How is a tabstrip built and what are the two paging methods?
CONTROLS … TYPE TABSTRIP; each tab title has a function code and a subscreen area that shows a subscreen. Paging at the SAP GUI: one area per tab, all subscreens loaded in PBO, function type P, no PAI. Paging at the application server: one shared area, PAI on each click sets activetab and the subscreen number.
How do you program your own F4 help?
PROCESS ON VALUE-REQUEST with FIELD f MODULE m; in the module read the values and call F4IF_INT_TABLE_VALUE_REQUEST (retfield, dynpprog, dynpnr, dynprofield, value_org = 'S'). Read other screen fields with DYNP_VALUES_READ because POV has no data transport. Prefer DDIC search helps when possible.
06 · Data Migration (BDC, LSMW, BAPI)
LSMW (Legacy System Migration Workbench), transaction LSMW, is a migration tool (not part of the ABAP Workbench) that loads files with little or no coding. It was popular for master data in ECC.
Structure: Project (can hold several subprojects) → Subproject (any number of objects) → Object (one business object, e.g. material master or customer master).
Q1. What is the difference between data migration and data transfer?
Migration is a one-time load from an old system at go-live (RICEFW Conversion). Transfer is a recurring exchange while both systems run (an Interface).
Q2. What are the BDC methods?
Three: Call Transaction and Session (together: batch input) and Direct Input. Call Transaction posts immediately; Session stores the data and posts it later in SM35; Direct Input writes without screens.
Q3. Call Transaction vs Session – when do you use which?
Call Transaction: small/medium volumes, immediate result, you code the error handling. Session: large or scheduled loads, built-in log and reprocessing, update always synchronous.
Q4. What are the processing and update modes of CALL TRANSACTION?
Processing: A all screens, E errors only, N no screens. Update: A asynchronous (default), S synchronous (waits – use when records depend on each other), L local.
Q5. What is CTU_PARAMS?
A structure passed with OPTIONS FROM: DISMODE, UPDMODE, DEFSIZE (fixed window size for table controls), RACOMMIT, NOBINPT, NOBIEND. It replaces MODE/UPDATE and gives more control.
Q6. How do you handle errors in Call Transaction?
Use MESSAGES INTO a BDCMSGCOLL table, check sy-subrc, turn E/A messages into text (MESSAGE … INTO or FORMAT_MESSAGE), log them, and optionally write failed records into a session for SM35.
Q7. What is BDCDATA and what are BDC_OKCODE and BDC_CURSOR?
The table of screens and field values: PROGRAM, DYNPRO, DYNBEGIN for a screen; FNAM, FVAL for fields. BDC_OKCODE holds the function code (Enter, Save), BDC_CURSOR the cursor position.
Q8. Can you use GUI_UPLOAD in a background job?
No – it needs SAP GUI. Read the file from the application server with OPEN/READ/CLOSE DATASET instead (logical file name from transaction FILE).
Q9. What are the access types and modes of OPEN DATASET?
Access: INPUT, OUTPUT, APPENDING, UPDATE. Mode: TEXT MODE (with mandatory ENCODING), BINARY MODE, LEGACY TEXT/BINARY MODE. READ DATASET returns sy-subrc 4 at end of file.
Q10. Why prefer a BAPI over BDC for uploads?
No dependency on screens, faster, stable released interface, structured RETURN messages, works in S/4HANA. Remember BAPI_TRANSACTION_COMMIT – BAPIs don't commit.
Q11. What are the LSMW steps and methods – and do you use LSMW in S/4HANA?
Methods: standard batch/direct input, recording, BAPI, IDoc. Steps: attributes, source structures and fields, relations, mapping, files, read, convert, create and run session. In S/4HANA it is not recommended.
Q12. What replaces LSMW in S/4HANA?
The S/4HANA Migration Cockpit (app "Migrate Your Data") with staging tables or direct transfer from an SAP system, predefined objects, mapping, simulation – and LTMOM for custom objects or fields.
07 · Interfaces (RFC, BAPI, ALE/IDoc)
Q1. What is the difference between inbound and outbound interfaces?
Inbound: data comes into SAP from any system. Outbound: data leaves SAP to any system – SAP or non-SAP.
Q2. What is RFC, and is it only for SAP-to-SAP?
A call of a remote-enabled function module in another system via an SM59 destination. No – non-SAP programs use RFC through JCo, NCo, the NW RFC SDK or PyRFC.
Q3. Explain the RFC types.
sRFC waits for the result; aRFC runs in parallel with a callback; tRFC is sent at COMMIT WORK, exactly once, no result (SM58); qRFC adds order via queues (SMQ1/SMQ2); bgRFC is the modern successor of tRFC/qRFC.
Q4. Which rules apply to a remote-enabled function module?
Remote-enabled attribute, pass by value, no generic types, no dialogs, handle SYSTEM_FAILURE and COMMUNICATION_FAILURE on the client side.
Q5. RFC vs BAPI?
A BAPI is an RFM that implements a method of a BOR business object, with a released stable interface, RETURN parameter and no commit. Every BAPI is an RFM, not every RFM is a BAPI; both serve SAP and non-SAP callers.
Q6. Why must you call BAPI_TRANSACTION_COMMIT?
BAPIs never commit, so several BAPI calls can form one LUW. Commit with wait = 'X' after checking RETURN; roll back if there is an E or A message.
Q7. What are ExtensionIn and ExtensionOut?
BAPIPAREX tables for custom fields: ExtensionIn passes custom field values into SAP (create/change), ExtensionOut returns them from SAP (read). Fields go into structures like BAPE_VBAP/BAPE_VBAPX.
Q8. Message type vs IDoc type vs extension?
Message type = meaning (MATMAS); IDoc (basic) type = structure of segments (MATMAS05); extension = extra custom segments added to a basic type. One message type can have several IDoc types.
Q9. What are the three record types of an IDoc?
Control record (EDIDC, one), data records (EDID4, one per segment, data in SDATA) and status records (EDIDS, processing history).
Q10. Which ALE configuration steps do you need?
Logical systems (BD54) and client assignment (SCC4), RFC destination (SM59), port (WE21), distribution model (BD64), partner profiles (WE20) in both systems, process code (WE42) on the receiver.
Q11. What are change pointers?
A log of master data changes that BD21 (RBDMIDOC) turns into IDocs. Activate with BD61 (global) and BD50 (per message type), choose fields in BD52; stored in BDCP2.
Q12. An inbound IDoc is in status 51 – what do you do?
Read the status message in WE02, fix the cause (master data, customizing, mapping), then reprocess in BD87; test fixes with WE19. Status 53 means posted.
Q13. How does tRFC guarantee "exactly once"?
The call is stored in the sender (ARFCSSTATE/ARFCSDATA) under a transaction ID and sent only after COMMIT WORK. If the target is down, RSARFCSE retries with the same TID; the target records executed TIDs in ARFCRSTATE and skips a TID it has already processed. After the confirmation the sender deletes its entries.
Q14. A tRFC or qRFC call is stuck – where do you look and what do you do?
tRFC: SM58 shows the LUW and its error; fix the cause and execute it again (RSARFCEX for many). qRFC: SMQ1 (outbound) or SMQ2 (inbound) – the failed LUW blocks only its own queue; fix it and restart the queue; check the schedulers in SMQS/SMQR. Also check SM59 (connection test) and ST22 in the target.
Q15. tRFC, qRFC or bgRFC for a new S/4HANA interface – and why?
bgRFC: SAP calls it the successor of tRFC and qRFC and recommends it for new developments. Type t when order does not matter, type q with a queue per business object when it does. It scales better, is configured in SBGRFCCONF and monitored in SBGRFCMON.
Q16. What must be set up before the first bgRFC call?
An SM59 destination for the target (outbound; not shared with classic tRFC/qRFC), a supervisor destination in SBGRFCCONF whose user has role SAP_BC_BGRFC_SUPERVISOR, an inbound destination in SBGRFCCONF for inbound units, optionally scheduler settings – then units appear in SBGRFCMON.
08 · OData (SAP Gateway)
Q1. What is OData, and how is it different from plain REST?
REST is an architectural style. OData is a standardised REST protocol (OASIS, V4 also ISO) that adds a data model ($metadata), standard URI conventions, CRUD-Q semantics and query options ($filter, $expand …), so any client can use any service the same way.
Q2. What are MPC, DPC and the _EXT classes?
MPC defines the model (metadata), DPC provides the data (CRUD-Q methods). Both are regenerated by SEGW, so you redefine methods only in MPC_EXT (deep structures, content type) and DPC_EXT (business logic).
Q3. Which method runs for GET /CarrierSet, GET /CarrierSet('LH'), POST, PUT, PATCH, DELETE?
GET_ENTITYSET, GET_ENTITY, CREATE_ENTITY, UPDATE_ENTITY, PATCH_ENTITY (default → GET_ENTITY + UPDATE_ENTITY), DELETE_ENTITY. Function imports → EXECUTE_ACTION; $value on media → GET_STREAM.
Q4. Which query options need code, and how do you implement paging?
$filter, $orderby, $top, $skip, $inlinecount, $skiptoken and search. Read them from io_tech_request_context and push them into the SELECT (WHERE, ORDER BY, UP TO n ROWS OFFSET m). $skip/$top = client-side paging; $skiptoken = server-side paging with a next link.
Q5. $expand vs navigation – and why redefine GET_EXPANDED_ENTITYSET?
Navigation (/Header('1')/Items) returns only the related entities; $expand returns header and items together. Generic $expand calls the item query once per header (N+1); GET_EXPANDED_ENTITYSET reads all items in one SELECT and sets et_expanded_tech_clauses.
Q6. What is a deep insert?
One POST that creates a header with its items (nested JSON). Bind a deep structure in MPC_EXT DEFINE, redefine CREATE_DEEP_ENTITY, read the payload, post with a BAPI, return the result via copy_data_to_ref.
Q7. Explain $batch and change sets. Where is the COMMIT?
$batch sends many requests in one HTTP call. Write operations go into change sets; each change set is one LUW, all or nothing. Never commit in the CRUD methods – the framework commits in CHANGESET_END. Redefine CHANGESET_BEGIN to allow more than one operation; defer mode uses CHANGESET_PROCESS.
Q8. How does Gateway handle concurrent updates?
Optimistically with an ETag (e.g. ChangedAt marked as ETag property). GET returns it, the client sends it in If-Match; if the record changed meanwhile the update gets 412 Precondition Failed. Missing If-Match → 428. Enqueue locks don't fit stateless OData.
Q9. What is the CSRF token and when do you get 403?
A token fetched with X-CSRF-Token: Fetch on any GET and sent back on every modifying request. Without a valid token Gateway answers 403 "CSRF token validation failed". GET_ENTITYSET is not required for POST.
Q10. Hub vs embedded deployment – which does SAP recommend for S/4HANA?
Embedded (Fiori front-end server inside S/4HANA) is the recommendation since 2020: simpler, no RFC hop. A central hub is for special cases such as one launchpad over many back ends.
Q11. How do you raise errors, and where do you look when a call fails?
Business errors: /IWBEP/CX_MGW_BUSI_EXCEPTION, technical: /IWBEP/CX_MGW_TECH_EXCEPTION, both with the message container. Analyse in /IWFND/ERROR_LOG (hub), /IWBEP/ERROR_LOG (back end), ST22, /IWFND/TRACES, and replay in /IWFND/GW_CLIENT.
Q12. Three ways to expose a CDS view as OData – which is current?
(1) @OData.publish: true – obsolete; (2) SEGW Map to Data Source / Reference Data Source – legacy; (3) RAP service definition + service binding (V2/V4) – the current way. V2 vs V4: V4 is JSON-only, $count=true instead of $inlinecount, actions/functions instead of function imports.
09 · Web Services (SOAP & REST)
Q1. What is a web service, and what are WSDL and UDDI?
A standards-based interface for applications to exchange data over HTTP. WSDL is the XML contract (operations, messages, endpoint). UDDI was the registry standard for publishing/finding services – obsolete; the public registries were shut down around 2006.
Q2. SOAP vs REST?
SOAP is an XML protocol with a strict WSDL contract and WS-* standards. REST is an architectural style using URLs and HTTP verbs, usually with JSON – lighter and easier for web/mobile clients.
Q3. How do you expose a function module as a SOAP service?
RFC-enabled FM in SE37 → Utilities → More Utilities → Create Web Service → From the Function Module (service definition) → SOAMANAGER: Web Service Configuration → Create Service (binding, authentication) → copy the WSDL URL and test.
Q4. How do you consume a SOAP service in ABAP?
Generate a consumer proxy from the WSDL (SE80 Enterprise Services → Service Consumer, or SPROXY), create a logical port in SOAMANAGER, then instantiate the proxy class with the logical port and call its method, catching cx_ai_system_fault / cx_ai_application_fault.
Q5. Inside-out vs outside-in?
Inside-out: generate the service from existing ABAP (FM/BAPI). Outside-in: start from a WSDL or ESR interface and generate the ABAP proxy, then implement or call it.
Q6. What is a logical port and what happens without one?
The runtime configuration of a consumer proxy (endpoint URL, credentials, security) in SOAMANAGER. Without it the proxy call raises cx_ai_system_fault.
Q7. How do you build a REST service in ABAP without OData?
Class implementing IF_HTTP_EXTENSION, logic in HANDLE_REQUEST (method, form fields, body → JSON response and status), registered as handler of a service node in SICF and activated. For many resources use CL_REST_HTTP_HANDLER + CL_REST_ROUTER + CL_REST_RESOURCE.
Q8. How do you call an external REST API from ABAP?
SM59 destination type G + cl_http_client=>create_by_destination, set method and URI, send, receive, read status and body, deserialize the JSON. In ABAP Cloud: cl_http_destination_provider + cl_web_http_client_manager.
Q9. What is a CSRF token and when is it needed?
A token that proves a modifying request comes from the real client session. Fetch it with X-CSRF-Token: Fetch on a GET, send it on POST/PUT/PATCH/DELETE; missing → 403. GETs don't need it.
Q10. Where do you analyse failing SOAP calls?
SRT_UTIL (error log, traces), SRT_MONI (message monitor), SOAMANAGER Logs and Traces, ST22 for dumps, and a test with SoapUI / the WS Navigator.
Q11. When would you choose SOAP, plain REST or OData?
OData (RAP) for Fiori apps and new APIs; SOAP when a partner/middleware requires WSDL contracts or WS-Security; plain REST for small technical endpoints and when calling third-party JSON APIs.
10 · Enhancements
1. What is the difference between an enhancement and a modification?
An enhancement adds your own objects at hooks SAP prepared (exits, BAdIs, enhancement options) – no access key, survives upgrades. A modification changes SAP's own code, needs an access key (SSCR) and has to be adjusted in SPDD/SPAU at every upgrade.
2. Name the enhancement techniques in historical order.
User exits (SD includes such as MV45AFZZ) → customer exits (SMOD/CMOD) → classic BAdIs (4.6) → Enhancement Framework with new BAdIs, enhancement points and sections (NW 7.0 / ECC 6.0) → key user extensibility and released BAdIs in S/4HANA.
3. User exit vs customer exit?
A user exit is an empty FORM in an SAP include (mainly SD) – changing it needs the object key once. A customer exit is a call to an SAP exit FM whose Z include you fill in a CMOD project – no access key, activated with the project.
4. How do you implement a customer exit?
Find the enhancement (SMOD), create a project in CMOD, assign the enhancement, open the component, create the ZX include, write the code, activate it and activate the project. One enhancement can belong to one project only.
5. How do you find the exits and BAdIs of a transaction?
Customer exits: main program → package → SMOD/SE84, or search for CALL CUSTOMER-FUNCTION. Classic BAdIs: breakpoint in CL_EXITHANDLER=>GET_INSTANCE. New BAdIs: debugger breakpoint at statement GET BADI / CALL BADI, or SE84 → Enhancements. ANST shows the enhancements that already run.
6. Classic BAdI vs new (kernel) BAdI?
Classic: SE18/SE19 objects, one character filter, CL_EXITHANDLER reads the DB at runtime, no fallback. New: defined in enhancement spots, several filters, GET BADI/CALL BADI resolved at load time (faster), fallback class, Switch Framework.
7. What are multiple use and filter-dependent BAdIs? In which order do implementations run?
Multiple use allows many active implementations; filter-dependent means each implementation has filter values and only matching ones run. The order of several implementations is undefined – sort with BADI_SORTER if it matters.
8. What is a fallback class?
A default implementation of a new BAdI, executed only when no active implementation exists for the filter value. Without it, a single-use BAdI with no implementation raises CX_BADI_NOT_IMPLEMENTED at GET BADI.
9. Enhancement point vs enhancement section? Implicit vs explicit?
A point adds code (any number of implementations); a section replaces SAP's code (one active implementation). Implicit options exist automatically at fixed positions (begin/end of FMs, methods, forms; end of includes, structures); explicit ones were placed by SAP with ENHANCEMENT-POINT/-SECTION or as BAdIs in a spot.
10. What are an enhancement spot and an enhancement implementation?
The spot is the container of BAdI definitions and explicit points/sections (provider side). The enhancement implementation is the container of your BAdI implementations and source plug-ins (consumer side) – transported separately from SAP's code.
11. Validation vs substitution in FI – tcodes and order?
A validation checks data (prerequisite + check + message, GGB0, activated in OB28); a substitution changes field values (prerequisite + substitution, GGB1, activated in OBBH). Both run at callup points (0001 header, 0002 line item, 0003 document); the substitution runs first. Complex rules use user exits in ZRGGBR000/ZRGGBS000 (GCX2).
12. How do you extend SAP in S/4HANA with a clean core?
Key user extensibility (Custom Fields, Custom Logic with released cloud BAdIs), developer extensibility with ABAP Cloud (released APIs, RAP, custom CDS), side-by-side on SAP BTP. Modifications and implicit enhancements are avoided; old exits are kept only where no released alternative exists.
11 · Forms (SAPscript, Smart Forms, Adobe)
1. Compare SAPscript, Smart Forms and Adobe Forms.
SAPscript (SE71): client-dependent, no generated FM, logic in the print program, limited layout. Smart Forms (SMARTFORMS, 4.6C): client-independent, graphical, generates an FM, Smart Styles. Adobe Forms (SFP, NW 2004): separate interface + form, PDF output via ADS, LiveCycle Designer, interactive forms; the standard in S/4HANA.
2. How is a print program linked to an output type?
In NACE: application → output type → processing routines, stored in table TNAPR (print program, FORM routine such as ENTRY, form name per medium). When the document is saved, output determination creates a NAST record; at dispatch time the system calls the FORM routine of the print program.
3. What is stored in NAST?
Output records (messages): document key, output type, partner, medium, dispatch time and processing status. Output type definitions are in T685, processing programs in TNAPR.
4. What window types exist in SAPscript?
MAIN (one per form, flowing text, page break when full, can be placed up to 99 times per page), CONST (processed like VAR – use VAR) and VAR (re-formatted on every page, e.g. page numbers).
5. Which function modules does a SAPscript print program use?
OPEN_FORM and CLOSE_FORM (required), WRITE_FORM for each text element, optionally START_FORM/END_FORM for several forms in one job, plus WRITE_FORM_LINES and CONTROL_FORM.
6. Why do you call SSF_FUNCTION_MODULE_NAME instead of the generated FM directly?
The generated name (/1BCDWB/SF…) differs between systems and can change when the form is regenerated; SSF_FUNCTION_MODULE_NAME returns the current name. The Adobe equivalent is FP_FUNCTION_MODULE_NAME.
7. Main window vs final window in Smart Forms? Table vs template?
The main window holds flowing output like item tables; the final window is processed at the end, so it can show totals anywhere. A table has a variable number of rows (header, main area, footer); a template has a fixed grid for static layout.
8. How do you convert a Smart Form to PDF and send it by e-mail?
Set getotf = 'X' and no_dialog = 'X', call the FM, convert job_output_info-otfdata with CONVERT_OTF (format 'PDF'), convert the xstring to SOLIX, then send with CL_BCS/CL_DOCUMENT_BCS and COMMIT WORK.
9. What are the parts of an Adobe Form and which interface types exist?
An interface (separate, reusable) and a form (context + layout). Interface types: ABAP Dictionary-based, Smart Forms-compatible and XML Schema-based.
10. What is ADS and how do you check it?
Adobe Document Services – the Java service that merges layout and data and renders the PDF. Without it no Adobe output is possible. Test with report FP_TEST_00 (destination ADS in SM59).
11. FormCalc vs JavaScript? Positioned vs flowed subform?
FormCalc is the default, fast, for short calculations; JavaScript is for complex dynamic logic. Positioned subforms place objects at fixed coordinates; flowed subforms place them one after another – needed for dynamic tables that grow over pages.
12. How does output work in S/4HANA?
The BRF+-based Output Management (OPD) determines output type, recipient, channel and form template; forms are Adobe-based (fragment templates managed in Fiori apps) and rendered by ADS or SAP Forms Service by Adobe. NACE/NAST remains only for some applications and converted systems.
12 · Workflow
Q1. What is SAP Business Workflow and when do you use it?
An engine in the ABAP stack that routes the right work to the right person at the right time in the right sequence. Use it for recurring processes with several people, approvals and a need for tracking.
Q2. Task vs step vs work item?
A task (PFTC) is a reusable activity pointing to one method. A step is a node in a workflow definition; an activity step calls a task. A work item is the runtime instance of a step/task – what lands in the inbox.
Q3. TS vs WS, and standard vs customer task?
TS = single-step standard task, WS = multi-step workflow template; both cross-client without validity. Customer tasks (T) and workflow tasks (WF) are client-specific with validity periods and obsolete.
Q4. BOR object vs class-based workflow?
BOR: SWO1, macros, key up to 70 characters, delegation via SWO6, legacy. Class: SE24 with IF_WORKFLOW (BI_PERSISTENT + BI_OBJECT), normal ABAP OO, key INSTID up to 32 characters, recommended.
Q5. Synchronous vs asynchronous method?
Synchronous returns results and the step ends when the method returns. Asynchronous returns nothing to the step; the work item completes only when a terminating event arrives.
Q6. What is binding, and how is it different from a container operation?
Binding copies data between containers (event → workflow, workflow ⇄ task ⇄ method, workflow → rule). A container operation is a step that assigns or calculates values inside the workflow container.
Q7. Condition vs multiple condition? Loop UNTIL vs WHILE?
Condition = two branches (IF/ELSE). Multiple condition = N branches by the value of one element (CASE). UNTIL runs at least once and stops when true; WHILE checks first and runs while true.
Q8. Possible, responsible, excluded and actual agents?
Possible = may execute (task). Responsible = should get it (step). Excluded = must not get it. Recipients = (possible ∩ responsible) − excluded; the one who executes is the actual agent. No responsible agent → all possible agents; a general task makes everyone possible.
Q9. How do you trigger a workflow from ABAP?
Raise an event: SAP_WAPI_CREATE_EVENT (BOR) or CL_SWF_EVT_EVENT (class), then COMMIT WORK; the type linkage starts the workflow. Or start it directly with SAP_WAPI_START_WORKFLOW.
Q10. Type linkage vs instance linkage?
Type linkage (SWE2): every object of a type + event → receiver, used for start events. Instance linkage (SWE3/SWEINST): one specific object instance, created by the engine for terminating events and wait steps.
Q11. A workflow did not start – how do you analyse it?
SWELS on, repeat, SWEL: no receiver → activate the linkage; check FM exception → start condition; receiver error → SM58, binding, SWU3. If it started but failed: SWI1 / SWI2_DIAG, log, fix, SWPR.
Q12. What replaces classic workflow in S/4HANA?
Flexible Workflow (key users configure SAP scenarios in Manage Workflows; extend via BAdIs), My Inbox, and SAP Build Process Automation on BTP for side-by-side processes. Classic SWDD workflow remains supported on-premise.
13 · BRF+
Q1. What is BRF+ and why use it?
SAP's ABAP-based business rules framework (NetWeaver 7.0 EhP1+). Rules are modelled in a workbench (decision tables, formulas) instead of hard-coded ABAP or Z-tables, can be changed and simulated without code changes, and are called from ABAP through a function.
Q2. Name the main BRF+ objects.
Application (container), data objects (element, structure, table), function (entry point with context and result), ruleset (rules + variables), rule (IF/THEN), expressions (decision table, formula, decision tree, DB lookup …), actions.
Q3. What are context and result?
Context = the input data objects of a function (its import parameters); result = the output data object.
Q4. Explain the storage types.
System (client-independent, delivery class S, workbench transport), customizing (client-dependent, class C, customizing transport), master data (client-dependent, class A, not transportable – changed directly in production).
Q5. Functional mode vs event mode?
Q6. What is an exit condition?
A ruleset entry that stops processing the remaining rules when a condition is met (e.g. result already filled) – first match wins.
Q7. How do you call a BRF+ function from ABAP?
Generate the code template, or call cl_fdt_function_process=>process with the function ID, a timestamp, the context as name/value table and the result parameter; or use cl_fdt_factory → get_function → get_process_context → set_value → process. Catch cx_fdt.
Q8. How do you test a BRF+ function?
Simulation in the workbench: enter values, variant or file; Execute, or Execute and Display Processing Steps for a full trace. In production: lean trace.
Q9. Where is BRF+ used in S/4HANA?
Output management (output parameter determination in OPD), MDG rule-based workflow, FSCM collections/dunning, and customer-specific derivations.
Q10. BRF+ vs a Z-table with a maintenance view?
A Z-table stores values, but the logic stays in ABAP. BRF+ holds values and logic (conditions, formulas, order, exit), has versioning, validity, simulation and trace, and business users can maintain it.
14 · Advanced ABAP & the Technical Consultant Role
Q1. How do you implement parallel processing in classic ABAP?
Split the work into independent packets and call a remote-enabled FM per packet with CALL FUNCTION … STARTING NEW TASK … DESTINATION IN GROUP <RZ12 group> CALLING meth ON END OF TASK. The callback uses RECEIVE RESULTS; the main program waits with WAIT FOR ASYNCHRONOUS TASKS UNTIL …. Alternatives: the SPTA framework (SPTA_PARA_PROCESS_START_2) or several background jobs with separate key ranges.
Q2. What is RESOURCE_FAILURE and how do you handle it?
The exception raised when no dialog work process is free in the server group – only with DESTINATION IN GROUP. Wait until a running task finishes (WAIT FOR ASYNCHRONOUS TASKS with a counter condition and UP TO n SECONDS) and retry. SPBT_INITIALIZE tells you how many work processes are free so you can size packets.
Q3. What are the main pitfalls of parallel processing?
Dependent packets, lock conflicts on the same objects, the dialog time limit per task, each task committing separately (no common rollback), using up all work processes, and lost errors – log per packet so failed packets can be re-run.
Q4. How is parallel and background processing done in ABAP Cloud?
aRFC is not available. CL_ABAP_PARALLEL (released) runs objects implementing IF_ABAP_PARALLEL in parallel tasks via RUN_INST and returns them with their results. bgPF (CL_BGMC_PROCESS_FACTORY, operation interfaces IF_BGMC_OP_SINGLE / IF_BGMC_OP_SINGLE_TX_UNCONTR) runs work asynchronously, exactly once, on top of bgRFC. Scheduled work uses application jobs.
Q5. What are shared memory objects and when do you use them?
Objects stored in the shared objects memory of an application server, readable by all users without a copy. Define a shared-memory-enabled root class and an area in SHMA; write with ATTACH_FOR_WRITE, SET_ROOT, DETACH_COMMIT; read with ATTACH_FOR_READ and DETACH; monitor in SHMM. Use for read-mostly data that is expensive to build and needed by many users.
Q6. Shared objects vs EXPORT TO SHARED BUFFER vs table buffering?
Table buffering caches rows of one DB table and is the first choice for small customizing tables. EXPORT … TO SHARED BUFFER stores a data cluster that is copied on IMPORT and may be displaced. Shared objects store real objects with locks, versions and lifetime and are read in place. All three are per application server.
Q7. What are ABAP Messaging Channels and ABAP Push Channels?
AMC (SAMC, CL_AMC_CHANNEL_MANAGER) is publish/subscribe messaging between ABAP sessions, also across servers. APC (SAPC) makes ABAP a WebSocket server or client. Bound together, a message sent on an AMC channel is pushed to the browser – live dashboards, job-finished notifications. ABAP Daemons (CL_ABAP_DAEMON_EXT_BASE, SMDAEMON) are long-running sessions that react to such messages.
Q8. How do you create change documents for a custom table?
Set the Change Document flag on the data elements, create a change document object in SCDO with the table(s), generate the update program (FM <OBJECT>_WRITE_DOCUMENT), and call it in update task with the old and new images plus UPD_<table> before COMMIT WORK. In ABAP Cloud use the generated …_CHDO class or RAP change documents.
Q9. Where are change documents stored and how do you read them?
CDHDR (header: object class, object ID, change number, user, date, tcode) and CDPOS (field, old and new value), plus CDPOS_UID for long keys and CDPOS_STR for strings. Read with CHANGEDOCUMENT_READ, report RSSCD100 or CL_CHDO_READ_TOOLS – always by object class and object ID.
Q10. How do you create an application log?
Define object and sub-object in SLG0; in code BAL_LOG_CREATE (with external number and expiry date), BAL_LOG_MSG_ADD per message, BAL_DB_SAVE, and BAL_DSP_LOG_DISPLAY for online runs; view in SLG1, delete with SLG2. In ABAP Cloud use CL_BALI_LOG with the CL_BALI_* setters and CL_BALI_LOG_DB to save.
Q11. What is SAP AIF and why do S/4HANA projects use it?
A framework (ECC: add-on · S/4HANA: standard component) to build, monitor and handle errors of interfaces in one place. Interfaces are defined by namespace, raw and SAP structures, structure and value mappings, checks and actions. Business users fix data and restart messages in /AIF/ERR, for IDoc, proxy and web service interfaces alike – instead of developers working in WE02/BD87 and SRT_MONI.
Q12. What do you check in a code review?
Requirement fit, performance (SELECT in loops, FOR ALL ENTRIES with an empty table, SELECT *, missing index use), security (authorisation checks, SQL injection in dynamic SQL), error handling (sy-subrc, exceptions, logs), maintainability (naming, small methods, no hard-coded values), clean core (released APIs), unit tests, a clean ATC run and transport hygiene.
Q13. Name some Clean ABAP rules. What is the Hungarian notation debate?
Descriptive names, small methods that do one thing, few parameters and one RETURNING value, exceptions instead of return codes, OO instead of FORMs, functional constructs, comments for the why. Clean ABAP recommends dropping prefixes like lv_ and lt_; many companies still require them. Follow the project guideline consistently.
Q14. What goes into a technical specification?
Document control and FS reference, overview and trigger, object list, inputs, processing logic with mapping, output, error handling and logging, authorisations, performance and volume, assumptions, unit test cases and transport/deployment notes.
Q15. How do you estimate a RICEFW object?
Classify it as simple, medium or complex by data sources, logic, volume, interfaces and enhancement points, use the project's estimation sheet, and add TS, unit test, review and defect-fixing effort. State the risks and assumptions with the number.
Q16. A P1 ticket arrives in hypercare – what do you do?
Acknowledge within the SLA, analyse with ST22, SM37, SLG1, /AIF/ERR, WE02 or SRT_MONI, find a workaround to unblock the business, reproduce in QAS, fix in DEV, test, move an emergency transport through the landscape, then document the root cause and update the TS.
Q17. Why is FOR ALL ENTRIES with an empty driver table dangerous?
If the driver table is empty, the whole WHERE condition is ignored and the SELECT reads every row of the table. Always check IF itab IS NOT INITIAL first. Also remember that FOR ALL ENTRIES removes duplicate rows (select the full key) and that on HANA a JOIN or CDS view is often faster.
Q18. Code that worked on the old database returns wrong results on HANA. What do you look for?
Missing ORDER BY: HANA returns rows in no fixed order, so UP TO 1 ROWS, SELECT SINGLE without the full key, BINARY SEARCH on an unsorted result or "first row" logic can change. Add ORDER BY or SORT; the ATC variant FUNCTIONAL_DB finds these statements.
Q19. How do you protect dynamic SQL against SQL injection?
Avoid it: use static SQL with host variables. If a condition must be dynamic, never paste user input in as a literal – reference a variable or wrap the value with cl_abap_dyn_prg=>quote( ). Dynamic table or column names are checked against an allow-list (check_allowlist, check_table_name_str). The Code Vulnerability Analyzer in ATC flags the risky statements.
Q20. How would you convert an old custom program to clean core?
Seven steps: decide with usage data (SCMON/SUSG) whether it is still needed or covered by standard; analyse with ATC (S4HANA_READINESS_<release>, ABAP_CLOUD_READINESS), the Custom Code Migration app and the Cloudification Repository; fix the S/4HANA simplification items; choose a target level per object (A rewrite, B classic APIs, C isolated internal call, or retire); redesign with released CDS views, BAPIs or RAP BOs, Fiori and application jobs; prove the output is unchanged; lock it in with the ABAP Cloud language version and ATC at transport release.
Q21. Which S/4HANA simplification items break custom code most often?
MATNR extended to 40 characters; VBUK/VBUP no longer filled (status in VBAK/VBAP); pricing in PRCD_ELEMENTS instead of KONV; material documents in MATDOC (MKPF/MSEG are compatibility views); finance in the universal journal ACDOCA with BSID/BSAK etc. as compatibility views; customers and vendors through business partner and CVI. Reads on compatibility views work, writes do not.