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
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…