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'.