Skip to end of metadata
Go to start of metadata

In several cases it is not possible to reproduce a certain issue in the system. So we have to perform some database checks which table(s) are affected.

"How-to-Scheme"

Find connection SO ó PReq ó PO (item level)
VBEP (Sales Document: Schedule Line Data)
EBKN (Purchase Requisition Account Assignment)
EBAN (Purchase Requisition [item table])
EKKN (Account Assignment in Purchasing Document)
EKET (Scheduling Agreement Schedule Lines)
EKPO (Purchasing Document Item)
VBFA (Sales Document Flow)
Analyse CHANGES documents in SO (VA03)
Available Reports

 Finding wrong orders:

 1. Report SDBANF02
-          Standard report
-          Compares Sales and Purchasing
-          Data inconsistency between sales order items and purchase-requisition/purchase items
-          Result is a list which allows you to jump to the orders, pur. req. and pur. orders
-          example: Sales Order with 10pc, purchase order with 25pc à would be shown in the list
-          report doesn't help in any case, but mostly not needed as customers will give you the order number
 Find connection SO <> PReq <> PO (item  level)
 -       Finding the PReq item number
-       Go to VA03 with SO number, look at status overview
-       Go to VA03 with SO number, then to schedule lines, press 'procurement'
-       In SE16 enter table EBKN and find PReq item with fields VBELN, VBELP
-       If you already know the PO item number go to SE16 with table EKET, enter PO number and PO item number as key and look for fields BANFN, BNFPO.
-       Finding the PO item number
-       Go to VA03 with SO number, look at document flow
-       In SE16 enter table EKKN and find PO item with fields VBELN, VBELP
-       If you already know the PReq item number go to SE16 with table EKPO, enter PReq number and PReq item number as key and look for fields EBELN, EBELP.

 VBEP (Sales Document: Schedule Line Data)

 -       Go to SE 16, enter VBEP as table name, enter the SO number.
-       Check all schedule lines which have third-party (standard: CS) or individual purchase order (standard: CB) schedule line category.
-       Most important: Do you find the PReq number / Preq item number in fields BANFN / BNFPO?
-       Check field WMENG. If > 0 this is the requested schedule line.
-       You must not find the same PReq item number BNFPO in another requested schedule line of this sales order (but in as many purely confirmed schedule lines [WMENG=0, BMENG>0] as there are)
-       The schedule line number ETENR of this record must be found as VETEN in the corresponding Purchase Requisition Account Assignment table EBKN (see below).
-       Field BSART must be filled and is 'NB' in standard.

 EBKN (Purchase Requisition Account Assignment)

 -       Go to SE16, enter EBKN as table name, enter the PReq number.
-       Check all PReq items. In case there is a problem with duplicate PREqs check all PReq items which are account assigned to the sales order.
-       Most important: Do you find the SO number / SO item number in fields VBELN / VBELP?
-       Check field VETEN. Its number must correspond to the schedule line number ETENR of the requested schedule line (not: confirmed schedule line!) of table VBEP (see above).
-       N.B.: Field LOEKZ is not set even if the PReq item is deleted. The deletion indicator is maintained only in table EBAN!

 EBAN (Purchase Requisition [item table])

 -       Go to SE16, enter EBAN as table name, enter the PReq number.
-       Check all PReq items. In case there is a problem with duplicate PREqs check all PReq items which are account assigned to the sales order.
-       Very important: Check field LOEKZ (deletion indicator). If LOEKZ = 'X' the PReq item is deleted.
-       Check field ESTKZ. You must find ESTKZ = 'V'!
-       Check field STATU. If there isn't a purchase order yet (see below) STATU = 'N'. If a PO is already created you'll find STATU = 'B'.
-       Check field PSTYP. In case of third-party (VBEP-ETTYP = 'CS' in standard) you'll find PSTYP = '5'. In case of individual purchase order (VBEP-ETTYP = 'CB' in standard) you'll find PSTYP = '0'(zero).
 -       Check fields EBELN and EBELP. If there is already a purchase order these fields are filled with PO number / PO item number. In case there hasn't been a PO before these fields are both empty.
-       Check field BEDAT. It must be filled with the delivery date of the PO then and only then when EBELN and EBELP are filled.
-       Check field BSMNG. This is the PO quantity. Properties:
-       If EBELN and EBELP are empty BSMNG must be empty as well.
-       If EBELN and EBELN are filled, but BSMNG is empty this means that the PO must be deleted. Keep this in mind when you later check EKPO-LOEKZ.
-       If EBELN and EBELN are filled, but BSMNG is empty a new PO or PO item could be created with reference to this PReq item (unless it's deleted). In this case EBELN/EBELP are overwritten with the new PO number / PO item number. This in turn means that there could be already several PO items attached to this PReq item which are all deleted but the last one.
-       IF EBELN, EBELP and BSMNG are filled then the PO is either active (EKPO-LOEKZ = ' ') or it could be archived (EKPO-LOEKZ = 'L').

 EKKN (Account Assignment in Purchasing Document)

 -       Go to SE 16, enter EKKN as table name, enter the PO number.
-       Check all PO items which are account assigned to the sales order, even those which are already deleted.
-       Most important: Do you find the SO number / SO item number in fields VBELN / VBELP?
-       Check field VETEN. Its number must correspond to the schedule line number ETENR of the requested schedule line (not: confirmed schedule line!) of table VBEP (see above).
-       N.B.: Field LOEKZ is not set even if the PO item is deleted. The deletion indicator is maintained only in table EKPO!

 EKET (Scheduling Agreement Schedule Lines)

 -       Go to SE 16, enter EKET as table name, enter the PO number or all PO numbers which are assigned to the sales order.
-       There must be only one schedule line per PO item (same EBELN / EBELP).
-       Most important: Do you find the PReq number / Preq item number in fields BANFN / BNFPO?
-       Check field ESTKZ. It's always 'R' ('realtime').

 EKPO (Purchasing Document Item)

 -       Go to SE 16, enter EKPO as table name, enter the PO number or all PO numbers which are assigned to the sales order.
-       Very important: Check field LOEKZ (deletion indicator). If LOEKZ = 'L' the PO item is deleted.
-       Check field STATU. You must find STATU = 'V' (i.e. created from sales order)!
-       Do you find the PReq number / Preq item number in fields BANFN / BNFPO? It doesn't matter if these fields are empty. I haven't yet figured out when these fields are filled and when they are empty.
-       Check field PSTYP. In case of third-party (VBEP-ETTYP = 'CS' in standard) you'll find PSTYP = '5'. In case of individual purchase order (VBEP-ETTYP = 'CB' in standard) you'll find PSTYP = '0'(zero).

 VBFA (Sales Document Flow)

 -       Go to SE 16, enter VBFA as table name, enter the SO number in field VBELV and 'V' as VBTYP_N (purchase order). You will get all purchase order document flow records attached to the sales order
-       Depending on the case it could be necessary to enter the PO number in field VBELN and 'C' as VBTYP_V (order). You will get all sales order document flow records attached to the purchase order. Please keep in mind that this search can take quite a while.
-       Check VBELV/POSNV vs. VBELN/POSNN. Is this relation the same as for instance in EKKN (see above)?
-       Check fields RFMNG, MEINS, RFWRT WAERS.
-       If the PO is not deleted they must be filled.
-       If the PO is deleted you should find MEINS still set to the order unit, RFMNG and RFWRT set to 0, and WAERS being empty.
-       A good way to check creation date and time of the purchase order is to check fields ERDAT (date) and ERZET (time) in the VBFA record because it is almost simultaneously created with the PO.

 Analyse CHANGES documents in SO (VA03)

 -       The changes documents are a protocol where many of the later changes to a sales order (like dates, schedule lines, credit blocks ...) are written to. Checking them might give some useful insight to the history of the sales order.
-       Keep in mind that you'll only find changes done in VA02. Manual entries or changes directly made on creation time of the sales order are never protocolled.
-       Go to VA03, enter sales order number an choose "environment - changes" in menu path.
-       You are on the „Display Document Changes" screen. If you only want to focus on a single item enter the item number. Tick ‚overview' and ‚additional infos' and choose ‚Time of change'. Then press F8.
-       You have now an overview of all changes. Doubleclick on any line for more details like old and new value of a field.
-       Very valuable informations could be user and transaction of a change as well as date and time.

  • No labels

1 Comment

  1. Former Member

    wonderful doc. ty