Fonction SAP BAPI_EXPENDITUREPROGTREE_CHG - Change Program Sub-Tree

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
APPROVALYEAR BAPIPROGPOSID-APPROVALYEAR N 4 Approval Year of Program
LANGUAGE BAPIPROGAUX-LANGU C 1 X Logon Language in SAP Format
LANGUAGE_ISO BAPIPROGAUX-LANGU_ISO C 2 X Logon Language in ISO Format
POSITION BAPIPROGPOSID-POSITION C 24 Position ID
PROGRAM BAPIPROGPOSID-PROGRAM C 8 Program Name
TEST_RUN BAPIPROGAUX-TEST_RUN C 1 ' ' X Test Run

Paramètre Reférence Long. Facultatif Description
PROGPOS_NEW BAPIPROGSTRUCNEW 363 Detail Specif. for New Program Position
PROGPOS_OLD BAPIPROGSTRUCOLD 363 Detail Specif. for Old Program Position
RETURN BAPIRET2 548 X Return Messages

Function
Using this method, you can change the master data of program positionsof the sub-tree entered. It is not possible to change the hierarchy ofthe sub-tree itself.
The system only considers those fields that have different entries.That is, you only have to enter the field to be changed in the tablerecords of the sub-tree position, while the other fields remain empty.
Before making the change to the program positions, the systemautomatically checks the consistency of the data in the local andexternal systems. If there are no errors, the changes are made. Thesystem changes either all positions or no positions.
Set the TEST_RUNindicator to have the system check if changing the data is possiblewithout errors. You receive a list showing any errors. In this way, youavoid the situation in which multiple errors cause the change of datato be interruped each time. The change itself is not made when thisindicator is set.

Notes
You specify the subtree by entering these parameters:

  • PROGRAM

  • APPROVALYEAR

  • POSITION

  • The transfer of the data to be changed takes place using thePROGPOS_OLD andPROGPOS_NEW tables.PROGPOS_OLD contains the unchanged data, as it was in the externalsystem before the change. Table PROGPOS_NEW contains the changed data.
    During the consistency check, the unchanged data of the fields to bechanged contained in the PROGPOS_OLD table is compared with the data inthe local system. The change is allowed only if the data is the same.
    The PROGPOS_OLD and PROGPOS_NEW tables only need to contain the programpositions that are to be changed. It is not necessary to transfer thecomplete sub-tree with all of its positions. The sequence of thepositions to be changed within the tables does not matter, but thepositions have to belong to the sub-tree entered.
    INCLUDE IM_APPROVALYEAR OBJECT DOKU ID TX
    INCLUDE IM_LANGUAGE OBJECT DOKU ID TX
    INCLUDE IM_LANGUAGE_ISO OBJECT DOKU ID TX
    INCLUDE IM_POSITION OBJECT DOKU ID TX
    INCLUDE IM_PROGRAM OBJECT DOKU ID TX
    INCLUDE IM_TEST_RUN OBJECT DOKU ID TX
    INCLUDE IM_PROGTREE OBJECT DOKU ID TX
    INCLUDE IM_PROGTREE OBJECT DOKU ID TX