ABAP Interview Questions
ABAP Interview Questions
In General PR->PO->GR->INVOICE
Invoice
RBKP-header
RSEG-Item
Accounting doc
BKPF--header
BSEG—Item
Created a report to display BATCH material details for a material using MCH1
tables and checked the batch deletion indicator LVORM to be displayed in the
output.
Developed a report to display the list of production orders from AFKO and AFPO
to display the production order related details in the ALV report.
Created Idoc extension for MATMAS01 and populated the logic in custom
segment through an inbound function module exit to update fields in material
master.
Worked on Smartforms to send the EKKO and EKPO PO details in print output.
Flow:
MRP run daily and check the material every day based on the inventory / open PO
and sales.
MD13 and MD16 used to display planned orders. PLAF is the table.
CO03 to display production orders. AFKO/ AFPO tables for production order.
Question repository:
Reports:
Events in ABAP report – LOAD of program
Initialization – first event to trigger
Top of page – used for displaying header.
At selection screen – where validations take place.
At selection screen output – validate and modify the selection
screen
At selection screen on – validate field level selection
Start of selection – it will execute the list of select statements. It
will be called even if not declared it in the report.
End of selection – States that the event start of selection has ended.
Logics can be written after end of selection.
At user command – used for handling, push buttons
At line selection – interactive list. SY-LSIND is used here to check
the first row.
HIDE statement holds the data to be displayed in the secondary list.
Also we can capture what field we have selected using GET
CURSOR FIELD fieldname VALUE fieldvalue.
Field name selected in basic list is captured in the above statement
and we can use it to fetch the secondary list details.
TOP-OF-PAGE DURING LINE-SELECTION : top of page event for
secondary list.
endcase.
endform.
Smart forms:
IDOC:
Inbound 50-75. Outbound 0-49.
EDID4 – Data records. EDIDC – Control records. EDIDS – status records.
Creating Segment : Tcode - WE31
Create extension tcode : WE30
Creating Message Type : Tcode - we81
Assigning Message type to Idoc type: Tcode - we82
BD56 – to filter segments – like only 2 segments should be displayed for this
condition instead of 5.
BD55 to use conversion routines or BD79
BD64 to filter the idocs coming inside/ going outside the system.
There are two filtering in IDoc.
Segment Filtering:
Segment filtering can be achieved using transaction BD56. Here you can
suppress a whole segment irrespective of data inside it . You have to give
Message Type / Sender Partner / Receiver Partner.
Data Filtering:
Data filtering can be done in distribution model (BD64) where you can
restrict whole IDOCS or partials IDOCS to be send based on data in fields
inside IDOC depending on whether the segment in which you filter is at the
highest level or at a lower level. For example in MATMAS if you put a filter
of E1MARCM for a particular plant, only data for this plant will go and
other plants will be ignored.
BDC :
BDCDATA : DYNPRO/DYNBEGIN/FNAM/FVAL/PROGRAM.
BDC_OPEN_GROUP, BDC_INSERT, BDC_CLOSE_GROUP
KEEP keeps the session even after processed successfully. Will be deleted
by BASIS.
Table control : using counter and P+ inside the loop.
Call transaction both asynchronous and synchronous updates. Session
only synchronous update. A E N mode in call transaction.
Bdc for table maintenance generator can be created.
CK11 cost estimate : For single amterial there are various prices. All prices will be provided in
excel. We need to add this and do a BDC for CK11. Then created BDC to mark and release the
material price for costing.
Worked on incident where multiple output types are being created for shipments whenever it
was created using TMS. Expected is only one output. After lot of debugging, we found out there
was some incorrect READ statement written inside a routine.
Need to split APO sales order into multiple sales order based on quantity. For eg : if sales order
has 112 quantity, we need to split it into 2 orders. Lot size were determined by functional. Here
it was 56 per lot.
BADI :
How to find BADI : Using class CL_EXIT_HANDLER.
Using SE80 repository and package name.
BADI can have multiple implementations. User exit cannot have multiple
implementations. You have to change the code in the same area.
Multiple implementation button is checked for Multiple implementation
BADI.
Filter check box is ticked for filter dependent BADI. We can restrict the
BADI logic for different country specific values. FLT_VAL is the parameter
created in method.
for eg for specific country codes we can have separate logics.
SE18 – BADI def / SE19 – BAID implementation
ME_PROCESS_PO_CUST used for change item details of BADI. In process
item method.
COMMIT WORK should not be used inside BADI or user exit.
For multiple implementations there is no sequence control because at the
time of BADI definition it does not know which implementation will be
active. Badi with filter is different.
BAPI :
Dictionary:
A type group/pool is sort of like an INCLUDE program which you use to put
all of your TYPES statements into, mostly it is used for reuse, so you
define your TYPES there
TYPE-POOLS pool. TYPE-POOLS : SLIS is common example.
This statement allows you to use all the data types and constants defined
in the type group pool in your program. You can use several type groups in
the same program.
Collective search help adds multiple values to the search help field. That
is it will have two tabs to select the values. But in elementary it will have
only one tab. For eg: Name is the only field in collective search help. You
can populate the values for name in F4 from 3 differrent elementary search
helps in 3 different tabs when u click F4.
CONVERSION routines are written at domain level and we can create
custom conversion routines.
Routines:
Miscellaneous:
SELECT SINGLE * ---> It selects the First Matcing row satisfying the Where
Condition.
while
SELECT * UP TO 1 ROW ---> selects all the Records satisfying the given
Condition and then it applies aggregation as well as orders and returns the
First Record according to these Records.