Page tree
Skip to end of metadata
Go to start of metadata

Reset cleared items (FBRA)
 
After executing the data in FBRA, the accounting document will be moved from BSAK table to BSIK, after executing the below function module one can check in these table. Never try to select accounting document from BSEG table, it's a cluster table. Try to use key fields when firing query on BASK table. *---Declaration for fun mod
DATA:  d_bukrs       LIKE rf05r-bukrs,
       d_belnr       LIKE rf05r-augbl,
       d_gjahr       LIKE rf05r-gjahr,
       it_rf05r_acct LIKE rf05r_acct OCCURS 0 WITH HEADER LINE.
LOOP AT it_bsak.
       CLEAR: d_bukrs, d_belnr, d_gjahr.
       d_bukrs  = it_bsak-bukrs.
       d_belnr  = it_bsak-augbl.
       d_gjahr  = it_bsak-gjahr.
*---Fuction module to run FBRA
       CALL FUNCTION 'CALL_FBRA'
         EXPORTING
           i_bukrs      = d_bukrs
           i_augbl      = d_belnr
           i_gjahr      = d_gjahr
         TABLES
           t_accnt      = it_rf05r_acct
         EXCEPTIONS
           not_possible = 1
           OTHERS       = 2.

Endloop.