on 11-12-2008 2:40 AM
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,
Hi,
You can try FM CHANGE_DOCUMENT.
Regards,
Eli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.