Skip to Content
0
Former Member
May 23, 2007 at 08:35 AM

0fi_gl_4 enhancement

79 Views

Hi Experts,

I tried to enhance GL extractor. But once done, the FI doc number (BKPF -BELNR) is replaced by RBKP- BELNR. Not really able to figure out whats wrong in the code..

I am attaching the code...Can anyone please help..very urgent..

(Coding done based on suggestions by Olivier Cora in one other threads...Many thanks to him).

WHEN '0FI_GL_4'. " General Ledger

LOOP AT c_t_data INTO ls_figl_4.

lv_idx = sy-tabix.

SELECT SINGLE awkey INTO l_awkey

FROM bkpf

WHERE belnr = ls_figl_4-belnr

AND gjahr = ls_figl_4-gjahr

AND bukrs = ls_figl_4-bukrs.

IF sy-subrc = 0.

l_awkey = l_awkey(10).

SELECT SINGLE rmwwr wmwst1 belnr gjahr

INTO (ls_figl_4-zzgrossamt, ls_figl_4-zztaxamt, ls_figl_4-belnr, ls_figl_4-gjahr)

FROM rbkp

WHERE belnr = l_awkey.

IF sy-subrc EQ 0.

MODIFY c_t_data FROM ls_figl_4 INDEX lv_idx.

  • ENDIF.

*

  • IF sy-subrc = 0.

SELECT SINGLE mwskz wrbtr ebeln

INTO (ls_figl_4-zztaxcode, ls_figl_4-zznetamt, ls_figl_4-zzebeln)

FROM rseg

WHERE gjahr = ls_figl_4-gjahr

AND belnr = ls_figl_4-belnr

AND bukrs = ls_figl_4-bukrs.

IF sy-subrc EQ 0.

MODIFY c_t_data FROM ls_figl_4 INDEX lv_idx.

ENDIF.

ENDIF.

ENDIF.

ENDLOOP.