cancel
Showing results for 
Search instead for 
Did you mean: 

Change Functional Area of an existing FI document

Former Member
0 Kudos

A GL account was created without a functional area by mistake and posting were made to this account. Since, our P&L statement is based on functional area, this G/L account does not show on the P&L. The problem has been fixed going forward, but I don't know how to update the documents that were posted prior to the fix. It doesn't seem like I can just edit the document and update the functional area. Is there some ABAP program or transaction that I can run to update the functional area on FI documents?

Thank you,

Accepted Solutions (0)

Answers (1)

Answers (1)

iklovski
Active Contributor
0 Kudos

Hi,

You can try FM CHANGE_DOCUMENT.

Regards,

Eli

Former Member
0 Kudos

I tried that and it worked for the FI document (BSEG and BSIS). However, it did not affect the balance sheet and P&L reports. These reports are pointing to the Special Purpose Ledger posting. Is there a way to change the Functional Area in a Special Purpose Ledger document?

Thanks,

Former Member
0 Kudos

Post a local document (Tcode: GB01) in Special Ledger to adjust the posting out of the blank FA and assign it a desired FA.

Former Member
0 Kudos

Hi Tony,

We have a document posted to a Cost Center with no functional area and the costs doesn't reflect in P&L. How can we correct this posting so that it shows in the right functional area and ultimately show in P&L.

Former Member
0 Kudos

Here is what I did to fix the problem:

1. Identify FI document that are missing the functional area.

2. Write an ABAP program to call FM 'CHANGE_DOCUMENT' and update the functional area

3. Run GCDE to delete FI-SL postings by CCode, FYear and G/L Account

4. Re-post FI-SL docs from step 1 using GCU1

The key part of the configuration that was missing was in GCL2. The posting indicator needed to be 3 for each activity.

Here is the ABAP code:

select * from bkpf

where bukrs eq p_bukrs and

belnr eq p_belnr and

gjahr eq p_gjahr.

clear: T_BKPF. refresh: T_BKPF.

move-corresponding bkpf to T_BKPF.

append T_BKPF.

select * from bseg where

bukrs eq bkpf-bukrs and

belnr eq bkpf-belnr and

gjahr eq bkpf-gjahr and

buzei eq p_buzei.

bseg-fkber = p_fkber.

clear: T_BSEG. refresh: T_BSEG.

move-corresponding bseg to T_BSEG.

append T_BSEG.

CALL FUNCTION 'CHANGE_DOCUMENT'

TABLES T_BKDF = T_BKDF

T_BKPF = T_BKPF

T_BSEC = T_BSEC

T_BSED = T_BSED

T_BSEG = T_BSEG

T_BSET = T_BSET

EXCEPTIONS OTHERS = 4.

if sy-subrc eq 0.

write: /1 'Success'.

else.

write: /1 'Failed'.

endif.

endselect.

endselect.