Skip to Content
author's profile photo Former Member
Former Member

Change Functional Area of an existing FI document

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,

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Nov 12, 2008 at 08:47 AM


    You can try FM CHANGE_DOCUMENT.



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.



      T_BKPF = T_BKPF

      T_BSEC = T_BSEC

      T_BSED = T_BSED

      T_BSEG = T_BSEG

      T_BSET = T_BSET


      if sy-subrc eq 0.

      write: /1 'Success'.


      write: /1 'Failed'.




Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.