Fonction SAP BAPI_BUS2054_CREATE_MULTI - Create WBS Elements Using BAPI

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
I_PROJECT_DEFINITION BAPI_BUS2001_NEW-PROJECT_DEFINITION C 24 Project Definition

Paramètre Reférence Long. Facultatif Description
ET_RETURN BAPIRET2 548 X Return Parameter
EXTENSIONIN BAPIPAREX 990 X Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
EXTENSIONOUT BAPIPAREX 990 X Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
IT_WBS_ELEMENT BAPI_BUS2054_NEW 618 Data Structure: Create WBS Element

Functionality
WBS elements can be created for a project with BAPI"BAPI_BUS2054_CREATE_MULTI". To do this, parameter"I_PROJECT_DEFINITION" must contain the project definition for whichthe WBS elements are to be created. The individual WBS elements withall required values must be entered in table "IT_WBS_ELEMENT_TABLE".
The WBS elements are created next to each other, in the same sequenceas in table "IT_WBS_ELEMENT_TABLE". A WBS element under which the newWBS elements are to be created can be specified in parameter"I_WBS_UP". A WBS element that is to be located directly to the left ofthe new WBS elements can be specified with parameter "I_WBS_LEFT". If"I_WBS_LEFT" is not specified, the new WBS elements are added on theleft-hand side. If I_WBS_UP is also not specified, the new WBS elementsare added on the left and on the first level.
Before anything is created, the following is checked:

  • Is another project already being processed in the LUW (Logical Unit of
  • Work)?
    • Can the project be locked?

    • If one check was not successful, nothing is created. Otherwise, eachWBS element is changed individually in "IT_WBS_ELEMENT_TABLE", althoughthe following is checked first:
      • Is the data consistent?

      • If all checks were succussful, the individual WBS element is created inthe document tables. Afterwards, the hierarchy is updated, that is thenew elements are added in the appropriate place as described above. Ifan error occurs while this is being carried out, the new elements arecreated on the right-hand side, on the first level, and an errormessage is generated in the return table. An error can occur if the WBSelement in I_WBS_UP and I_WBS_LEFT does not exist in the specifiedproject, or I_WBS_UP is not directly above I_WBS_LEFT if both arespecified, or because an inconsistency occurs in the hierarchy foranother reason.
        As soon as a LUW (Logical Unit of Work) is completed with BAPIBAPI_PS_PRECOMMIT and COMMIT WORK, the WBS elements are finallychanged.
        Only one project or WBS element from a project can be processed at atime in a LUW.
        The return parameter RETURN displays first an error or success messagethat shows whether the WBS elements could be created. The first messagevariable contains the object type, the second contains the object ID,and the fourth contains the GUID (if it could be read). All relatedmessages that were generated during processing are listed underneaththe error or success messages. The parameters of the individualmessages are filled with the object ID.

        Notes
        INCLUDE CNIF_PI_BAPI_HINTS OBJECT DOKU ID TX

        Further information
        For more information, refer to the SAP Library under Project System ->Structures -> Project System Interfaces -> PS-EPS Interface to ExternalProject Management Systems.

        Description
        Number that uniquely identifies a project definition within a client.

        Description
        Data for customer enhancements is imported using the container"ExtensionIn", as described in the BAPI Programming Guide. Furtherprocessing of the data takes place in the corresponding BAdI.

        Description
        Customer enhancement data is exported using the container"ExtensionOut", as described in the BAPI Programming Guide. Procurementof the data takes place in the corresponding BAdI.

        Description
        Table containing all WBS elements, including related data, that are tobe created.

588124Setting up/changing hierarchy leads to online mssges in BAPI