Error in BAPI_BUS2054_CREATE_MULTI

Dear Experts,
I am getting following errors while creating WBS elements thru BAPI_BUS2054_CREATE_MULTI.
004   Individual check for creating the object WBS Element S/10/001/004 required (Type S)
76     Hierarchy reference element 2 for WBS element (WBS No.)does not exist (Type E)
74     Hierarchy structure for WBS element (WBS No.)not possible.(Type E)
IF i dont take WBS_UP field thn it is updating but not considering any level.
Please help me in this.
Thanks in Advance.

Hello Sameer,
Can you please share as how you resolved the hierarchical issue?Even I am facing the same issue.
Regards,
Bijoya

Similar Messages

  • Error while Creating WBS element using BAPI 'BAPI_BUS2054_CREATE_MULTI'

    Hi Expert,
    I've a requirement to create WBS elements using BAPI. And I am using BAPIs in the following manner.
    CALL FUNCTION 'BAPI_PS_INITIALIZATION'
      CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
        EXPORTING
          i_project_definition = g_pdwbs
      TABLES
        it_wbs_element             = it_wbs_element
       et_return                  = it_return
      EXTENSIONIN                =
      EXTENSIONOUT               =
        CALL FUNCTION 'BAPI_PS_PRECOMMIT'
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    When I do so I am getting the below errors. Please suggest.
    "Individual check for creating the object WBS Element C-497082 required ".
    "Individual check for creating the object WBS Element C-497082-0001 required".
    Please suggest how to correct this error. 
    <REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
    Edited by: Alvaro Tejada Galindo on Aug 18, 2008 5:25 PM

    I am getting the same error, but I cannot figure it out how to detect it and fix it.  Will you please share your solution?
    Thanks,

  • Error in creating WBS element BAPI_BUS2054_CREATE_MULTI

    Hi
    I am calling BAPI_BUS2054_CREATE_MULTI  for creating WBS elements for the blocked project . I am passing the detailed project definitiion with level ( like A5/01/01) . I am getting error that WBS element for the object could not be created  error 076 that BAPI is not initialized .
    Now to solve this I called BAPI_PS_INITIALIZATION first then am calling BAPI_BUS2054_CREATE_MULTI then its throwing dump  and if I want to run thru se37 then still giving the same error mentioned above
    Please let me know what should I need to do to remove the error .
    Helpful answer will definetly ..
    Thanks a  lott in advance

    Hi ,
    I want to create a WBS element using the BAPI's  BAPI_BUS2054_CREATE_MULTI .
    I did this sequence of test  :
    BAPI_PS_INITIALIZATION
    BAPI_BUS2054_CREATE_MULTI
    And I have this return
    S    CNIF_PI              004     Individual check for creating the object WBS Element U008-F033-001 required    
    CAn you tell me what to do in order to resolve this problem ( calling a commit after this sequence leads to 'DUMP' bacause no precommit is called before )
    can u send me a code Plz...
    Thanks in advance

  • BAPI_BUS2054_CREATE_MULTI error while creating WBS Element

    Hi Gurus,
    I am trying to create WBS element by using    BAPI_BUS2054_CREATE_MULTI
    but bapi raise an error that I can not understand.
    in return table I got the following error with the error code CJ - 021
    " XXXX-YYYY-ZZZZ WBS Element does not exist "
    But I try to create already? What does 'Does not exist' mean?
    By the way I am using
    CALL FUNCTION 'BAPI_PS_INITIALIZATION'. before using  BAPI_BUS2054_CREATE_MULTI
    thanks in advance, it is an very important
    Mehmet Ali

    Hi.
    I have the same problem. Have you solved?
    Thanks.
    Angie

  • BAPI_BUS2054_CREATE_MULTI - error CNIF_PI - 076

    Hi,
    I'm using BAPI BAPI_BUS2054_CREATE_MULTI to create new WBS elements and sudenly it has started to trow me errors CNIF_PI(076) and CNIF_PI(074).
    Can anyone help me?
    thanks
    Juraj

    I found where the error was ... the wbs_up attribute was filled with an incorrect value.
    thanks

  • Issue creating WBS using BAPI_BUS2054_CREATE_MULTI

    Hi All,
    I am trying to create WBS elements under existing project (CJ20N) using “BAPI_BUS2054_CREATE_MULTI”. I am I am getting “ET_RETURN” with message type ‘S-W-I’, even after commit no WBS created. Type ‘S’ message says “Individual check for creating the object WBS Element XXX required”. Please find my code for more info. I am I using correct BAPI? Any hint or suggestion welcome. Thanks in advance.
    Regards,
    Trim
    LOOP AT gt_wbs_element .
        MOVE-CORRESPONDING gt_wbs_element to gt_wbs_element_bapi.
        MOVE : gt_wbs_element-mims_id    to gt_wbs_element_bapi-USER_FIELD_CHAR20_1.
        MOVE : gt_wbs_element-PROJECT_DEFINITION to gv_proj.
    *** Conert all dates
        split_date gt_wbs_element-WBS_BASIC_START_DATE gt_wbs_element_bapi-WBS_BASIC_START_DATE.
        split_date gt_wbs_element-WBS_BASIC_FINISH_DATE gt_wbs_element_bapi-WBS_BASIC_FINISH_DATE.
        split_date gt_wbs_element-WBS_FORECAST_START_DATE gt_wbs_element_bapi-WBS_FORECAST_START_DATE.
        split_date gt_wbs_element-WBS_FORECAST_FINISH_DATE gt_wbs_element_bapi-WBS_FORECAST_FINISH_DATE.
    *   split_date gt_wbs_element-WBS_ACTUAL_START_DATE gt_wbs_element_bapi-WBS_ACTUAL_START_DATE.
    *   split_date gt_wbs_element-WBS_ACTUAL_FINISH_DATE gt_wbs_element_bapi-WBS_ACTUAL_FINISH_DATE.
        APPEND gt_wbs_element_bapi.
    ****   Update Custome 'Z' Fields
        clear : BAPI_TE_WBS_ELEMENT, gv_error.
        BAPI_TE_WBS_ELEMENT-WBS_ELEMENT    = gt_wbs_element-WBS_ELEMENT.
        BAPI_TE_WBS_ELEMENT-ZZCP_APPRBUD   = gt_wbs_element-ZZCP_APPRBUD.
        BAPI_TE_WBS_ELEMENT-ZZCP_ELECT     = gt_wbs_element-ZZCP_ELECT.
        BAPI_TE_WBS_ELEMENT-ZZCP_AREA      = gt_wbs_element-ZZCP_AREA.
        BAPI_TE_WBS_ELEMENT-ZZCP_PROG      = gt_wbs_element-ZZCP_PROG.
        BAPI_TE_WBS_ELEMENT-ZZCP_SUBPR     = gt_wbs_element-ZZCP_SUBPR.
    **    BAPI_TE_WBS_ELEMENT-ZZCP_FINALDAT  = gt_wbs_element-ZZCP_FINALDAT.
        BAPI_TE_WBS_ELEMENT-ZZCP_TOTBUD    = gt_wbs_element-ZZCP_TOTBUD.
    **    BAPI_TE_WBS_ELEMENT-ZZCP_DADHC_REG = gt_wbs_element-ZZCP_DADHC_REG.
    **    BAPI_TE_WBS_ELEMENT-ZZCP_DADHC_CEP = gt_wbs_element-ZZCP_DADHC_CEP.
        BAPI_TE_WBS_ELEMENT-ZZCP_PREDBUD   = gt_wbs_element-ZZCP_PREDBUD.
        BAPI_TE_WBS_ELEMENT-ZZCP_CLIENT    = gt_wbs_element-ZZCP_CLIENT.
        BAPI_TE_WBS_ELEMENT-ZZCP_PM_NAME   = gt_wbs_element-ZZCP_PM_NAME.
        GT_EXTENSION_IN-STRUCTURE = 'BAPI_TE_WBS_ELEMENT'.
        GT_EXTENSION_IN-VALUEPART1 = BAPI_TE_WBS_ELEMENT+0(199).
        GT_EXTENSION_IN-VALUEPART2 = BAPI_TE_WBS_ELEMENT+199(171).
        APPEND GT_EXTENSION_IN.
        MOVE-CORRESPONDING gt_wbs_element to wa_wbs_elem.
        AT END OF PROJECT_DEFINITION.
    *** Inalise BAPI
          CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
          clear gt_return[].
          CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
            EXPORTING
              I_PROJECT_DEFINITION       = gv_proj
            TABLES
              IT_WBS_ELEMENT             = gt_wbs_element_bapi
              ET_RETURN                  = gt_return
              EXTENSIONIN                = gt_extension_in
    *         EXTENSIONOUT               =
            EXCEPTIONS
              error_message              = 1
              others                     = 2.
    *** Check GT_RESULT for success
          LOOP AT gt_return where type co 'EA'.
            gv_error = 'X'.
          ENDLOOP.
          IF gv_error is initial.
            CALL FUNCTION 'BAPI_PS_PRECOMMIT'
              TABLES
                ET_RETURN = gt_return_pre.
            LOOP AT gt_return_pre where type co 'EA'.
              gv_error = 'X'.
            ENDLOOP.
          ENDIF.
          IF gv_error is INITIAL.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
              EXPORTING
                WAIT   = '1'
              IMPORTING
                RETURN = GT_RETURN_COMMIT.
            clear gv_write.
            format color 4.
            CONCATENATE 'Success: WBS Attached to Project' gv_proj '-'
                   into  gv_write.
            WRITE / gv_write. CLEAR gv_write.
            move-corresponding wa_wbs_elem to gt_wbs_suc.
            gt_wbs_suc-message      = gv_write.
            gt_wbs_suc-message_type = 'S'.
            append gt_wbs_suc.
            format reset.
          else.
            clear gv_write.
            format color 6.
            CONCATENATE 'Error: Attaching WBS to Project' space '-' space gv_proj
                    into  gv_write.
            WRITE / gv_write. CLEAR gv_write.
            move-corresponding wa_wbs_elem to gt_wbs_suc.
            gt_wbs_suc-message      = gv_write.
            gt_wbs_suc-message_type = 'E'.
            append gt_wbs_suc.
            format reset.
          ENDIF.
          CLEAR: gv_proj, gt_wbs_element_bapi, gt_extension_in, gt_return_pre, GT_RETURN_COMMIT.
          refresh: gt_wbs_element_bapi, gt_extension_in, gt_return_pre, GT_RETURN_COMMIT.
        endat.
      ENDLOOP.

    Hi Trim
    The message comes from (It is S004) in the BAPI_BUS2054_CREATE_MULTI (see below bold).  I would be placing a breakpoint at the point where the BAPI is calling the function PS_BAPI_PREPARE to see if the lv_subrc variable is being set at this stage.
    Cheers
    Gareth
          call function 'CJ2054_CREATE'
               exporting
                    i_pspid             = i_project_definition
                    i_wbs_element       = ls_wbs_element
               tables
                    extensionin         = extensionin
               exceptions
                    element_not_created = 1
                    dates_not_created   = 2.
        endif.
        if sy-subrc <> 0 or lv_subrc <> 0.
          message e007(cnif_pi) with text-wbs ls_wbs_element-wbs_element
                                into null.
          lv_error = con_yes.
        else.
    <b>      message s004(cnif_pi) with text-wbs ls_wbs_element-wbs_element
                                into null.</b>

  • Error Individual check for creating the object WBS Element required

    Hi Expert,
    I've a requirement to create WBS elements using BAPI. And I am using BAPIs in the following manner.
    CALL FUNCTION 'BAPI_PS_INITIALIZATION'
    CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
    EXPORTING
    i_project_definition = g_pdwbs
    TABLES
    it_wbs_element = it_wbs_element
    et_return = it_return
    EXTENSIONIN =
    EXTENSIONOUT =
    CALL FUNCTION 'BAPI_PS_PRECOMMIT'
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    When I do so I am getting the below errors. Please suggest.
    "Individual check for creating the object WBS Element C-497082 required ".
    "Individual check for creating the object WBS Element C-497082-0001 required".
    Please suggest how to correct this error.

    Hi Karthikeya,
    I think the project profile which you are using has a different mask and the WBS element you are passing is different to the BAPI.
    Are you able to create manually from CJ01 using the same WBS element?
    Create a project manually and it will give the list of the mandatory fields set in the config. Using that list populate the BAPI struture accordingly.
    Hope this helps.
    Thanks
    Lakshman.

  • Problem with bapi BAPI_BUS2054_CREATE_MULTI

    I am trying to create multiple wbs elements for a given definition
    using the bapi BAPI_BUS2054_CREATE_MULTI as per the documentation i have used BAPI_PS_INITIALIZATION
    first to initialize,then followed by BAPI_BUS2054_CREATE_MULTI  and ending with BAPI_PS_PRECOMMIT and BAPI_TRANSACTION_COMMIT
    it says the definition is o.k but its giving error with wbs element.
    that to enter all required fields.
    could any body please  tell what are all the required fields that i have to enter for it_wbs.

    Hi Aravind,
    I am having same problem. Can you pelase explain me how you solved your issue.
    Please help?
    thanks,
    Venkat.

  • WBS element creation error

    Hi All,
    I am trying to create WBS element using BAPI BAPI_BUS2054_CREATE_MULTI. The sequence is as follows:
    BAPI_PS_INITIALIZATION
    BAPI_BUS2054_CREATE_MULTI
    BAPI_PS_PRECOMMIT
    The error while creating element is :
    Final check of the project definition and the WBS elements: Error
    Any pointers on this why I am getting this error and what needs to be done?
    Thanks,
    Seema

    Hi Seema,
    After the BAPI BAPI_PS_PRECOMMIT you have to call explicitily
    COMMIT WORK AND WAIT.
    You can have those details in the documentation of the BAPI "BAPI_BUS2054_CREATE_MULTI".
    Regards,
    Smart Varghese

  • BAPI_BUS2054_CREATE_MULTI - Populating custom fields

    Hi,
    I am using BAPI BAPI_BUS2054_CREATE_MULTI for creating WBS Elements.
    We have 18 custom fields at WBS element level.
    I am trying to populate the data for those 18 custom fields through EXTENSIONIN table parameter. 
    I am passing BAPI_TE_WBS_ELEMENT to the structure name & values to VALUEPART1. But after the BAPI call,
    its not creating any error or saving the data for WBS Element. 
    Note: i am passing WBS Element at starting position i.e., 0(24)  .  My custom fields starts from 25(3) position onwards.
    Below is the code how i am populating the data to the EXTENSIONIN tables.
    data: lwa_extin       TYPE bapiparex.
    MOVE 'BAPI_TE_WBS_ELEMENT' TO lwa_extin-structure.
      lwa_extin-valuepart1+0(24) = wa_data-posid.
      lwa_extin-valuepart1+25(3) = '1'.
      lwa_extin-valuepart1+28(4) = 'BSUB'.
      lwa_extin-valuepart1+32(4) = 'CONT'.
      lwa_extin-valuepart1+36(3) = '132'.
      lwa_extin-valuepart1+39(6) = 'AUTH'.
      lwa_extin-valuepart1+45(6) = '301'.
      lwa_extin-valuepart1+51(26) = '1'.
      lwa_extin-valuepart1+77(5) = '1'.
      lwa_extin-valuepart1+82(21) = '1'.
      lwa_extin-valuepart1+103(11) = '1'.
      lwa_extin-valuepart1+114(15) = 'IL'.
      lwa_extin-valuepart1+129(50) = '1'.
      lwa_extin-valuepart1+179(50) = '1'.
      lwa_extin-valuepart1+229(11) = '1'.
      lwa_extin-valuepart2+0(10) = 'C'.
      lwa_extin-valuepart2+10(8) = sy-datum.
      lwa_extin-valuepart2+18(8) = sy-datum.
      lwa_extin-valuepart2+26(4) = '1'.
    APPEND lwa_extin TO li_extin.
        CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
          EXPORTING
            i_project_definition = lwa_pspid
          TABLES
            it_wbs_element       = li_wbsele_data
            et_return            = li_return
            extensionin          = li_extin
            extensionout         = li_extout.
    Can any one help me about this issue.
    Regards,
    Kris.

    Hi,
    Are you using 'BAPI_TRANSACTION_COMMIT' after BAPI call?
    If not then try to use as below,
    data: lwa_extin TYPE bapiparex.
    MOVE 'BAPI_TE_WBS_ELEMENT' TO lwa_extin-structure.
    lwa_extin-valuepart1+0(24) = wa_data-posid.
    lwa_extin-valuepart1+25(3) = '1'.
    lwa_extin-valuepart1+28(4) = 'BSUB'.
    lwa_extin-valuepart1+32(4) = 'CONT'.
    lwa_extin-valuepart1+36(3) = '132'.
    lwa_extin-valuepart1+39(6) = 'AUTH'.
    lwa_extin-valuepart1+45(6) = '301'.
    lwa_extin-valuepart1+51(26) = '1'.
    lwa_extin-valuepart1+77(5) = '1'.
    lwa_extin-valuepart1+82(21) = '1'.
    lwa_extin-valuepart1+103(11) = '1'.
    lwa_extin-valuepart1+114(15) = 'IL'.
    lwa_extin-valuepart1+129(50) = '1'.
    lwa_extin-valuepart1+179(50) = '1'.
    lwa_extin-valuepart1+229(11) = '1'.
    lwa_extin-valuepart2+0(10) = 'C'.
    lwa_extin-valuepart2+10(8) = sy-datum.
    lwa_extin-valuepart2+18(8) = sy-datum.
    lwa_extin-valuepart2+26(4) = '1'.
    APPEND lwa_extin TO li_extin.
    CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
    EXPORTING
    i_project_definition = lwa_pspid
    TABLES
    it_wbs_element = li_wbsele_data
    et_return = li_return
    extensionin = li_extin
    extensionout = li_extout.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        WAIT = 'X'.

  • Using function module BAPI_BUS2054_CREATE_MULTI

    Hello All,
    in PS we are using above function module to create WBS elements. The scenario is that we generate projects and WBS in reference to a sales order with copying texts and partners etc. After some manuel work of the users an other reports the status of the project will be set from CREATE to FREE. After this status change, we need it to assign costs to WBS elements, we want to add other WBS elements to the project.
    This is only possible by manuel work of the users but not by using the function module BAPI_BUS2054_CREATE_MULTI. In that process we get the error code BS 014 and CNIF_PI 074. In BAPI_PS_PRECOMMIT we get a dump as consequence.
    We are on patch SAPKH47025 and SAP note 664666 is still in the system.
    Is there any idea in the community?
    Regards
    Norbert

    Hi,
    please, I am with the same problem
    BAPI_PS_PRECOMMIT dump
    Did you solve this problem???
    Thanks.

  • Creating WBS Element BAPI_BUS2054_CREATE_MULTI

    hello all
    in my zrfc to create WBS element
    i have called following BAPIs
          CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
          CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
            EXPORTING
              i_project_definition = temp_pspid
            TABLES
              it_wbs_element       = it_wbs_element_new
              et_return            = it_return.
         CALL FUNCTION 'BAPI_PS_PRECOMMIT'.
         CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    I have return the zreport to call above RFC
    The values that i am passing to wbs internal table are
    WA_WBS-ZI_PSPID = '1-4275/P'.
    WA_WBS-ZI_POSID = 'T-01117'.
    WA_WBS-ZI_POST1 = 'TEST WBS FROM REPORT'.
    Append WA_WWBS to IT_WBS
    then i pass IT_WBS to my ZRFC
    but i am getting error message at BAPI_BUS2054_CREATE_MULTI
    my question is am I passing parameters in right manner?
    do the hardcoded parameters need some conversion and if yes what do i need to de?
    thanks
    sheetal

    Hi ,
    I want to create a WBS element using the BAPI's  BAPI_BUS2054_CREATE_MULTI .
    I did this sequence of test  :
    BAPI_PS_INITIALIZATION
    BAPI_BUS2054_CREATE_MULTI
    And I have this return
    S    CNIF_PI              004     Individual check for creating the object WBS Element U008-F033-001 required    
    CAn you tell me what to do in order to resolve this problem ( calling a commit after this sequence leads to 'DUMP' bacause no precommit is called before )
    can u send me a code Plz...
    Thanks in advance

  • BAPI_BUS2054_CREATE_MULTI customer fields

    Hello, I'm having trouble using bapi  BAPI_BUS2054_CREATE_MULTI.
    I added some customer fields in EXTENSIONIN but I keep getting the error messages CJ726 and CJ 727 for those fields, they are not availabke for input.
    After debug I found that this error is generated in th FM CJCK_PRPS_FIELD_ATTR_INIT, where for the customer fields they have to start by Z, Y, USR. USE or '/'.
    But this is not the clients case. Is there anyway to validate these fields?
    I might add that in this SAP system, some of these customer fields are obligatory, (it's a Public Administration system, so it has an add-on for this).

    Hi,
    Looking at the Code, it looks like you will need to modify the standard SAP code in the FM to accomodate the fieldnames as per the requirement.
            IF i_fieldname(3) = 'USR' OR
             i_fieldname(3) = 'USE' OR
             i_fieldname(1) = '/'   OR
             i_fieldname(1) = 'Z'   OR
             i_fieldname(1) = 'Y'.
    Thanks and Regards,
    Varshal Kachole

  • Regarding BAPI BAPI_BUS2054_CREATE_MULTI

    Hi All,
    I am using this BAPII BAPI_BUS2054_CREATE_MULTI  to create the WBS structure automatically in PS for all the service material line items in the Individual contract and will assign the relevant WBS back to the contract line item.
    When i am using this BAPI for first Contract no its working fine. When i am giving second contract no its throwing error message.
    Please tell me how cdan i hadle it,
    Reagrds
    Subhaskar

    Have you called the FM in following orders.
    BAPI_PS_INITIALIZATION
    BAPI_BUS2054_CREATE_MULTI
    BAPI_PS_PRECOMMIT
    BAPI_TRANSACTION_COMMIT
    Please read the documentation also for more details.
    Nabheet

  • Clarification on 'BAPI_BUS2054_CREATE_MULTI'

    Hi Frnds,
      I need some clarification in         Bapi   'BAPI_BUS2054_CREATE_MULTI' :
       1. Whether BAPI_PROJECT_MAINTAIN can be used to create a WBS Elemnt in CJ02 with Custom fields Value ?If Yes, then How can we do?
       2. I know 'BAPI_BUS2054_CREATE_MULTI'  can be used to change the WBS Element.My Doubt is whether we can create a Project and WBS Element with this Bapi? .If Yes, then How can we do?.
       3. I want to upload the Custom field in Transaction CJ02.? How Can I do. Give me an Example?
      4. I heard that, to use the    BAPI 'BAPI_BUS2054_CREATE_MULTI'  SAP Note 637345 should be apllied. Whether this is true ?
        Please clarify my Doubts .
    Thanks in Advance.

    Anand,
    FU BAPI_BUS2054_CREATE_MULTI
    Short Text
    Create WBS Elements Using BAPI
    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 which the WBS elements are to be created. The individual WBS elements with all required values must be entered in table "IT_WBS_ELEMENT_TABLE".
    The WBS elements are created next to each other, in the same sequence as in table "IT_WBS_ELEMENT_TABLE". A WBS element under which the new WBS 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 of the 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 the left-hand side. If I_WBS_UP is also not specified, the new WBS elements are 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, each WBS element is changed individually in "IT_WBS_ELEMENT_TABLE", although the following is checked first:
    Is the data consistent?
    If all checks were succussful, the individual WBS element is created in the document tables. Afterwards, the hierarchy is updated, that is the new elements are added in the appropriate place as described above. If an error occurs while this is being carried out, the new elements are created on the right-hand side, on the first level, and an error message is generated in the return table. An error can occur if the WBS element in I_WBS_UP and I_WBS_LEFT does not exist in the specified project, or I_WBS_UP is not directly above I_WBS_LEFT if both are specified, or because an inconsistency occurs in the hierarchy for another reason.
    As soon as a LUW (Logical Unit of Work) is completed with BAPI BAPI_PS_PRECOMMIT and COMMIT WORK, the WBS elements are finally changed.
    Only one project or WBS element from a project can be processed at a time in a LUW.
    The return parameter RETURN displays first an error or success message that shows whether the WBS elements could be created. The first message variable contains the object type, the second contains the object ID, and the fourth contains the GUID (if it could be read). All related messages that were generated during processing are listed underneath the error or success messages. The parameters of the individual messages are filled with the object ID.
    Notes
    1. Definition "Processing Unit"
    In the following, the term "processing unit" refers to a series of related processing steps.
    The first step in a processing unit is initialization, which is done by calling the BAPI BAPI_PS_INITIALIZATION.
    Afterwards, the individual BAPIs listed below can be used several times, if required.
    The processing unit ends when the final precommit (call BAPI BAPI_PS_PRECOMMIT) is executed with a subsequent COMMIT WORK (for example, the statement COMMIT WORK, the BAPI "BAPI_TRANSACTION_COMMIT" or the BapiService.TransactionCommit method).
    After the final COMMIT WORK, the next initialization opens a new processing unit via the BAPI "BAPI_PS_INITIALIZATION".
    In principal, the following applies to each individual processing unit.
    2. Creation of a Processing Unit
    Each processing unit must be initialized by calling the BAPI "BAPI_PS_INITIALIZATION" once.
    Afterwards, the following individual BAPIs can be used within a processing unit - they can also be used more than once, taking into account the "One-Project-Principle" explained below. This also means that an object created in the current processing unit by a CREATE-BAPI can be changed by a CHANGE-BAPI or STATUS-BAPI.
    Except for the BAPIs explicitly named below, you can only call up BAPIs that execute GET methods or READ methods only. In particular, the BAPIs for confirming a network may not be used with the individual BAPIs named below!
    Business Object ProjectDefinitionPI
    BAPI Method
    BAPI_BUS2001_CREATE ProjectDefinitionPI.CreateSingle
    BAPI_BUS2001_CHANGE ProjectDefinitionPI.Change
    BAPI_BUS2001_DELETE ProjectDefinitionPI.Delete
    BAPI_BUS2001_SET_STATUS ProjectDefinitionPI.SetStatus
    BAPI_BUS2001_PARTNER_CREATE_M ProjectDefinitionPI.PartnerCreateMultiple
    BAPI_BUS2001_PARTNER_CHANGE_M ProjectDefinitionPI.PartnerChangeMultiple
    BAPI_BUS2001_PARTNER_REMOVE_M ProjectDefinitionPI.PartnerRemoveMultiple
    Business Object WBSPI
    BAPI Method
    BAPI_BUS2054_CREATE_MULTI WBSPI.CreateMultiple
    BAPI_BUS2054_CHANGE_MULTI WBSPI.ChangeMultiple
    BAPI_BUS2054_DELETE_MULTI WBSPI.DeleteMultiple
    BAPI_BUS2001_SET_STATUS WBSPI.SetStatus
    Business Object NetworkPI
    BAPI Method
    BAPI_BUS2002_CREATE NetworkPI.CreateFromData
    BAPI_BUS2002_CHANGE NetworkPI.Change
    BAPI_BUS2002_DELETE NetworkPI.Delete
    BAPI_BUS2002_ACT_CREATE_MULTI NetworkPI.ActCreateMultiple
    BAPI_BUS2002_ACT_CHANGE_MULTI NetworkPI.ActChangeMultiple
    BAPI_BUS2002_ACT_DELETE_MULTI NetworkPI.ActDeleteMultiple
    BAPI_BUS2002_ACTELEM_CREATE_M NetworkPI.ActElemCreateMultiple
    BAPI_BUS2002_ACTELEM_CHANGE_M NetworkPI.ActElemChangeMultiple
    BAPI_BUS2002_ACTELEM_DELETE_M NetworkPI.ActElemDeleteMultiple
    BAPI_BUS2002_SET_STATUS NetworkPI.SetStatus
    The processing unit must be finished by calling the BAPIs BAPI_PS_PRECOMMIT and BAPI_TRANSACTION_COMMIT (in that order).
    3. One-Project Principle
    For technical reasons, only the project definition and the WBS elements of one project can be processed in a processing unit.
    More than one project is used, for example, if
    You create or change more than one project
    You have changed a project and want to change a network to which WBS elements from a different project are assigned
    You want to change various networks to which WBS elements from different projects are assigned
    You create or change a WBS assignment in a network so that a WBS element from a second project is used
    WBS elements from different projects are already assigned to a network (note: this type of network cannot be processed with the network BAPIs named above).
    If you define a report for calling BAPIs, this means that:
    The report may use a maximum of one project per processing unit. The individual BAPI calls must be distributed between more than one processing unit, which use a maximum of one project per processing unit.
    4. All-Or-Nothing Principle
    If an error occurs in a processing unit in an individual BAPI or in the BAPI "BAPI_PS_PRECOMMIT" (that is, the return table ET_RETURN contains at least one message of the type "E" (error), "A" (abnormal end) or "X" (exit), posting is not possible.
    If an error occurs in an individual BAPI and despite this you call the BAPI "BAPI_PS_PRECOMMIT", message CNIF_PI 056 is issued with message type I (information).
    If an error occurs in an individual BAPI or in the BAPI "BAPI_PS_PRECOMMIT", but despite this you execute a COMMIT WORK, the program that is currently in process is terminated and message CNIF_PI 056 is issued with message type X.
    This is to ensure data consistency for all objects created, changed, and/or deleted in the processing unit.
    Note that the processing unit to which this happens can no longer be successfully closed and therefore, no new processing unit can be started.
    However, you can set the current processing unit back to an initialized status by using a rollback work (for example, statement ROLLBACK WORK, the BAPI "BAPI_TRANSACTION_ROLLBACK" or the method BapiService.TransactionRollback). Technically speaking, this means that the previous LUW is terminated and a new LUW is started in the current processing unit.
    Note that in this case, the current processing unit does not have to be re-initialized.
    Also note that the rollback also takes place according to the "all-or-nothing" principle, that therefore all individual BAPIs carried out up to the rollback are discarded. After a rollback, you can, therefore, no longer refer to an object that was previously created in the current processing unit using a CREATE-BAPI.
    However, you can close the processing unit again after a rollback, using a PRECOMMIT and COMMIT WORK, as long as all individual BAPIs, and the precommit carried out after the rollback, finish without errors.
    You can carry out several rollbacks in a processing unit (technically: start a new LUW several times).
    5. Procedure in the Case of Errors
    As soon as an error occurs in an individual BAPI or in the BAPI "BAPI_PS_PRECOMMIT", you have the following options:
    Exit the report or the program that calls the BAPIs, the PRECOMMIT and the COMMIT WORK.
    Execute a rollback in the current processing unit.
    6. Rules for Posting
    After you have successfully called the individual BAPIs of a processing unit, you must call the PRECOMMIT "BAPI_PS_PRECOMMIT".
    If the PRECOMMIT is also successful, the COMMIT WORK must take place directly afterwards.
    In particular, note that after the PRECOMMIT, you cannot call other individual BAPIs again in the current processing unit.
    It is also not permitted to call the PRECOMMIT more than once in a processing unit.
    7. Recommendation "COMMIT WORK AND WAIT"
    If an object created in a processing unit is to be used in a subsequent processing unit (for example, as an account assignment object in a G/L account posting) it is recommended to call the commit work with the supplement "AND WAIT" or to set the parameters for the BAPI "BAPI_TRANSACTION_COMMIT" accordingly.
    8. Field Selection
    The field selection is a tool for influencing the user interface (that is, for the dialog). In the BAPIs, the settings from the field selection (for example, fields that are not ready for input or required-entry) are not taken into account.
    9. Using a date in the BAPI interface
    The BAPI must be provided with the date in the internal format YYYYMMDD (year month day). No special characters may be used.
    As a BAPI must work independent of user, the date cannot and should not be converted to the date format specified in the user-specific settings.
    10. Customer Enhancements of the BAPIs
    For the BAPIs used to create and change project definitions, WBS elements, networks, activities, and activity elements, you can automatically fill the fields of the tables PROJ, PRPS, AUFK, and AFVU that have been defined for customer enhancements in the standard system.
    For this purpose, help structures that contain the respective key fields, as well as the CI include of the table are supplied. The BAPIs contain the parameter ExtensionIN in which the enhancement fields can be entered and also provide BAdIs in which the entered values can be checked and, if required, processed further.
    CI Include Help Structure   Key
    CI_PROJ BAPI_TE_PROJECT_DEFINITION   PROJECT_DEFINITION
    CI_PRPS BAPI_TE_WBS_ELEMENT   WBS_ELEMENT
    CI_AUFK BAPI_TE_NETWORK   NETWORK
    CI_AFVU BAPI_TE_NETWORK_ACTIVITY   NETWORK ACTIVITY
    CI_AFVU BAPI_TE_NETWORK_ACT_ELEMENT   NETWORK ACTIVITY ELEMENT
    Procedure for Filling Standard Enhancements
    Before you call the BAPI for each object that is to be created or changed, for which you want to enter customer-specific table enhancement fields, add a data record to the container ExtensionIn:
    STRUCTURE:    Name of the corresponding help structure
    VALUEPART1:   Key of the object + start of the data part
    VALUEPART2-4: If required, the continuation of the data part
    VALUPART1 to VALUPART4 are therefore filled consecutively, first with the keys that identify the table rows and then with the values of the customer-specific fields. By structuring the container in this way, it is possible to transfer its content with one MOVE command to the structure of the BAPI table extension.
    Note that when objects are changed, all fields of the enhancements are overwritten (as opposed to the standard fields, where only those fields for which the respective update indicator is set are changed). Therefore, even if you only want to change one field, all the fields that you transfer in ExtensionIn must be filled.
    Checks and Further Processing
    Using the methods ...CREATE_EXIT1 or. ...CHANGE_EXIT1 of the BAdI BAPIEXT_BUS2001, BAPIEXT_BUS2002, and BAPIEXT_BUS2054, you can check the entered values (and/or carry out other checks).
    In the BAdI's second method, you can program that the data transferred to the BAPI is processed further (if you only want to transfer the fields of the CI includes, no more action is required here).
    For more information, refer to the SAP Library under Cross-Application Components -> Business Framework Architecture -> Enhancements, Modifications ... -> Customer Enhancement and Modification of BAPIs -> Customer Enhancement of BAPIs (CA-BFA).
    Further information
    For more information, refer to the SAP Library under Project System -> Structures -> Project System Interfaces -> PS-EPS Interface to External Project Management Systems.
    Parameters
    I_PROJECT_DEFINITION
    IT_WBS_ELEMENT
    ET_RETURN
    EXTENSIONIN
    EXTENSIONOUT
    Exceptions
    Function Group
    CJ2054

Maybe you are looking for