SAP ABAP Realtime (Scenario based) Interview Questions (21 - 30)

21. A standard SAP program needs a small logic change. Which enhancement technique will you use?

I first check whether there is a BADI, user exit, implicit enhancement, or explicit enhancement point already available. In projects, we should avoid modifying standard SAP code directly, because it creates upgrade and maintenance problems. I choose the enhancement technique based on what SAP has provided in that particular area.

* Example: custom logic inside enhancement implementation
IF sy-tcode = 'VA01'.
  " custom validation
ENDIF.

In interview, you can say: “My first preference is standard enhancement options, not modification.”

22. You need to add a custom field to a standard screen. How will you implement it?

Usually, this involves adding the field in the structure or append structure, then enhancing the screen and moving data between the screen and database/business logic. In many SAP standard transactions, this is done through screen exits, BADIs, or specific enhancement frameworks. The exact method depends on the transaction.

* Example idea
MOVE zfield TO screen_field.

A better answer is: “I check the technical design of the standard transaction first, then use append structure plus enhancement technique.”

23. How will you decide between User Exit, BADI, and Enhancement Spot in a real scenario?

I decide based on what is available in that application area and what flexibility is needed. User exits are older and simple, BADIs are more object-oriented and reusable, and enhancement spots are cleaner in newer designs.

In interview, you can say: “I prefer BADI or enhancement framework when available, because it is cleaner and more maintainable.”

24. A BADI implementation is not triggering. How will you debug it?

First, I check whether the correct BADI is identified and whether the implementation is active. Then I verify the filter values if it is a filtered BADI, and I put breakpoints in both the caller and the implementation. Many times the issue is not ABAP logic, but configuration or inactive implementation.

25. You need to enhance a standard transaction without modifying SAP code. What approach will you take?

I would look for exits, BADIs, enhancement spots, screen exits, or business transaction events depending on the module. The whole idea is to inject custom logic in the supported enhancement framework instead of changing SAP standard code.

In interview, you can say: “I always try enhancement first; modification is my last option.”

26. You are asked to implement logic only for specific company codes. How will you handle it in enhancement?

I would add a condition inside the enhancement implementation and execute the custom logic only for the required company codes. This keeps the enhancement reusable and avoids affecting other business areas.

IF bukrs = '1000' OR bukrs = '2000'.
  " custom logic
ENDIF.

In interview, say: “I keep the logic controlled by business key like company code, plant, or sales org.”

27. You need to create an interactive ALV report with drill-down functionality. How will you design it?

I would first show summary data in the main ALV, and when the user clicks a row, I would display the related detailed report or transaction. This is usually done using hotspot click, user command, or double-click event handling.

28. Users want to export ALV data to Excel with formatting. How will you achieve it?

If standard ALV export is enough, I use the built-in export functionality. If they need custom formatting, custom column headers, or special layout, I generate an Excel file manually or use supported classes based on project standards.

29. You need to highlight specific rows in ALV based on conditions. How will you do it?

In real projects, we often highlight rows to show errors, blocked records, or exceptions. In classic ALV, this can be done using color fields or style fields in the output table. Then based on business logic, I assign the color before displaying the ALV.

IF ls_data-status = 'E'.
  ls_data-color = 'C610'. " example color code
ENDIF.
APPEND ls_data TO lt_data.

In interview, you can say: “Conditional highlighting improves readability for business users.”

30. A report should show different layouts for different users. How will you handle it?

I would use ALV layout variants and allow users to save their own layouts. In many projects, this solves the requirement without writing extra code. If the business wants system-controlled layouts, I can also apply layout settings based on user ID or role.