Fonction SAP BAPI_EXPENDITUREPROGTREE_REASS - Reassign Program Sub-Tree

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
APPROVALYEAR BAPIPROGPOSID-APPROVALYEAR N 4 Approval Year of Program
PARENT_NEW BAPIPROGAUX-PARENTNEW C 24 X New ID of Parent Position
POSITION BAPIPROGPOSID-POSITION C 24 Position ID
PREDECESSOR_NEW BAPIPROGAUX-PREDECESSORNEW C 24 ' ' X New ID of Predecessor
PROGRAM BAPIPROGPOSID-PROGRAM C 8 Program Name
SUPPL_RET_INDIC BAPIPROGAUX-SUPPL_RET_INDIC C 1 'X' X 'Budget Adjustment as Supplement or Return' Indicator
TEST_RUN BAPIPROGAUX-TEST_RUN C 1 ' ' X Test Run

Paramètre Reférence Long. Facultatif Description
RETURN BAPIRET2 548 X Return Messages

Function
Using this method, you can reassign the program sub-tree to a point ofentry position you enter. You can reassign sub-trees only within thetree to which they belong. It is not possible, for example, for thesub-tree to become a separate tree with the point of entry position asits top position.
When you reassign a sub-tree that has positions that already havebudget or plan values, the method automatically ensures that thesevalues are transferred consistently within the tree.
If you set the TEST_RUN
indicator, the system checks if the sub-tree can be reassignedwithout errors. However, the sub-tree is not reassigned.

Notes
You control the position, to which the sub-tree should be assigned,using these fields:

  • PARENT_NEW

  • PREDECESSOR_NEW

  • The consistent transfer and correlation of the values of the sub-treewith the values of those positions that already have plan or budgetvalues is ensured as described below. Assume the following scenario:
    X is the top position of the sub-tree being reassigned, and X hasposition A as the next position directly above it in the hierarchybefore the reassignment. After the reassignment, the position directlyabove X in the hierarchy is B. Then the following takes place:
    • The budget/plan values of A and all higher-level positions in the
    • hierarchy anbove A are reduced by the budget/plan value of X.
      • The budget/plan values of B and all higher-level positions in the
      • hierarchy above B are increased by the budget/plan value of X.
        This reduction/increase of budget/plan values takes place up to thefirst higher-level position that is common to both A and B.
        The new parent position, to which the sub-tree is supposed to bereassigned, is not permitted to have measures. Measures are onlyallowed on end node positions. If the new parent position was an endnode position before the reassignment, then it is no longer an end nodeafter the reassignment.
        If the TEST_RUNindicator is set, the system merely tests if the sub-tree can bereassigned without errors.
        INCLUDE IM_APPROVALYEAR OBJECT DOKU ID TX

        Meaning
        Position ID of the position, to which the reassigned sub-tree should beassigned (on the next lowest level). This position thereby becomes theparent position of the point of entry position of the sub-tree.
        Making an entry in this field is optional. However, you have to make anentry either in the PARENT_NEW field or in thePREDECESSOR_NEWfield.
        If thePREDECESSOR_NEWfield has an entry, but the PARENT_NEW field does not, the systemautomatically determines the position ID of the parent position.
        INCLUDE IM_POSITION OBJECT DOKU ID TX

        Meaning
        Position ID of the position, which should be directly before (to theleft of) the reassigned sub-tree on the same level.
        Making an entry in this field is optional. However, you have to make anentry either in the PREDECESSOR_NEW field or in thePARENT_NEW field.
        If the PREDECESSOR_NEW field does not have an entry, the point of entryposition of the sub-tree becomes the first position in the hierarchylevel that is directly below the parent position.
        INCLUDE IM_PROGRAM OBJECT DOKU ID TX
        INCLUDE IM_TEST_RUN OBJECT DOKU ID TX

        Meaning
        Overview of the most important return messages (TYPE.ID.NUMBER):
        INCLUDE IM_AP003 OBJECT DOKU ID TX
        INCLUDE IM_AP005 OBJECT DOKU ID TX
        INCLUDE IM_AP015 OBJECT DOKU ID TX
        INCLUDE IM_AP063 OBJECT DOKU ID TX
        INCLUDE IM_AP076 OBJECT DOKU ID TX
        INCLUDE IM_AP091 OBJECT DOKU ID TX
        INCLUDE IM_AP120 OBJECT DOKU ID TX
        INCLUDE IM_AP154 OBJECT DOKU ID TX
        INCLUDE IM_APBAPI002 OBJECT DOKU ID TX(PREDECESSOR_NEW field)
        INCLUDE IM_APBAPI028 OBJECT DOKU ID TX(PARENT_NEW and PREDECESSOR_NEW fields)
        INCLUDE IM_APBAPI044 OBJECT DOKU ID TX(PARENT_NEW field)
        INCLUDE IM_APBAPI045 OBJECT DOKU ID TX(PARENT_NEW field)
        INCLUDE IM_APEO023 OBJECT DOKU ID TX