Skip to Content
0
Jan 10, 2018 at 01:23 AM

Logic to derive Offsetting Account in GL

373 Views Last edit Jan 15, 2018 at 09:29 AM 2 rev

Hi,

I am trying to understand the FM GET_GKONT to derive Offseting account from GL.

The below code seems to be the logic but doesn't give the correct output as compared to the GL_14 extractor for BW. What am I missing here? I need to create this logic in HANA using the base tables like BSEG, BKPF, FAGLFLEXA and can't use the datasource.

Please let me know. Thanks.

CASE BSEG-KOART.
 WHEN 'D'.
 GKONT_S = BSEG-KUNNR.
 Ghkon_S = BSEG-hkont.
 KOART_S = BSEG-KOART.
 WHEN 'K'.
 GKONT_S = BSEG-LIFNR.
 Ghkon_S = BSEG-hkont.
 KOART_S = BSEG-KOART.
 WHEN OTHERS.
 GKONT_S = BSEG-HKONT.
 Ghkon_S = BSEG-hkont.
 KOART_S = 'S'.