I have two tables in SAP ERP, BSEG and BKPF, can we identify which transactions came from BSIS, BASS, BAUD, BSAD, BSIK or BSAK? If yes then how? which columns and filters should we use?
You can use the account type field (BSEG-KOART):
BSEG-KOART = 'S' => G/L postings, index tables are BSIS and BSAS
BSEG-KOART = 'D' => customer postings, index tables are BSID and BSAD
BSEG-KOART = 'K' => vendor postings, index tables are BSIK and BSAK.
Alternatively you can use the posting key field as well (BSEG-BSCHL), however it is a bit more complicated:
BSEG-BSCHL = '40' or '50' => G/L postings
BSEG-BSCHL = '01' - '09' or '11' - '19' => customer postings
BSEG-BSCHL = '21' - '29' or '31' - '39' => vendor postings