WBS Element Creation

Hi Friends,
  Can anyone give me a clue of how to create a WBS Element in Background? Is there any Function Module or BAPIs available?
Prompt replies would be rewarded.
Thanks in advance.
Regards,
Tamilarasan.

REPORT Z_TEST_PMB .
DATA: ipd type BAPI_PROJECT_DEFINITION,
      imp type table of BAPI_METHOD_PROJECT with header line,
      iwbs type table of BAPI_WBS_ELEMENT with header line,
      em type table of BAPI_METH_MESSAGE with header line.
ipd-project_definition = 'PS02'.
imp-refnumber = '1'.
imp-objecttype = 'WBS-ELEMENT'.
imp-method = 'CREATE'.
imp-objectkey = ' PS024'.
append imp.
clear imp.
imp-method = 'SAVE'.
append imp.
iwbs-PROJECT_DEFINITION ='PS02'.
iwbs-WBS_ELEMENT = 'PS024'.
iwbs-DESCRIPTION = 'Preparation'.
append iwbs.
break mackowskit.
CALL FUNCTION 'BAPI_PROJECT_MAINTAIN'
  EXPORTING
    i_project_definition               = ipd
    i_project_definition_upd           = ''
  tables
    i_method_project                   = imp
   I_WBS_ELEMENT_TABLE                = iwbs
   E_MESSAGE_TABLE                    = em.

Similar Messages

  • BADI/User Exit for WBS element creation (CRM to R/3)

    In CRM 4.0 once a Campaign or Trade Promotion is created, a WBS is also automatically in R/3 (tcode CJ20N)
    I have a requirement to fill out the 'user fields' at the WBS element level when the campaign/TPM status is set to Release.
    I also need to fill out the 'company code' at the Project Definition level.
    Could you let me know if there's a badi or user exit that i can use in order to achieve these requirements?
    Your help will be much appreciated.
    Thanks
    Elynor

    Hi Tomasz,
    Thanks for your reply. Could you give me a hint on how to use these Badis since the passing parameters cannot be changed?
    A sample code would be helpful
    Many Thanks.

  • 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

  • WBS Element creation and link to SD process

    Hi,
    I am involved in aproject, where they sell services.
    In this scenario, please help me understand the WBS role and linkage to SD processes.
    I was trying to create a contract, wherein it prompts to create a new WBS.
    I like to create new WBS element, can anyone please let me have the steps involved in this ??
    Please help me understand by experts.
    Thanks in advance.

    Hi,
    WBS is required in order to plan and post revenue. Also in case of milestone billing, dates are copied from WBS in billing plan.
    You can create single WBS thru tcode: CJ11. For simplicity you can give the sales order number as WBS number, enter a Project Profile.
    Let me know if you face any issues. I assume that you are not interested in entire WBS structure and a single element will suffice.
    Regards

  • WBS Element Creation Using BAPI

    Friends,
    While creating the WBS element using the bapi,
    BAPI_BUS2054_CREATE_MULTI   I'm getting an error in Return parameter of bapi.the error is
    "Individual check for creating the object WBS Element CRA.011 required"
    FYI: CRA.011 is nothing but the WBS element which i'm trying to create.
    Pls help me in this. Advise me what are the mandatory fields to be passed in the it_wbs_element table of bapi.
    Thanks.

    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.

  • Restriction on no. of WBS elements creation

    Hello Experts,
    Is there anyway can I restrict the no. of WBS elements that can be allowed to get created below a Superior WBS element ?
    Also, is there a way to restrict the no. of Orders in which a WBS can be assigned to ?
    Thanks.
    Bala

    Hi Pal,
    Thanks for your reply.. but the problem is the no.  of WBS created will be in double digits and it is not fixed , it varies from proj to proj ..
    is there any User exit available for this ?
    Thanks
    Bala

  • Issue in BAPI_PS_PRECOMMIT in mass creation of WBS Elements

    Hi,
    I am facing a issue with BAPI_PS_PRECOMMIT.
    we have the following WBS Hierarchy:
    S - Proj, (level1)
    S-XXX WBS Element (level2)
    S-XXX-001 WBS Element (level3)
    I have created a program for mass creation of WBS elements creation
    which uses the following BAPI's
    BAPI_PS_INITIALIZATION
    BAPI_BUS2054_CREATE_MULTI
    BAPI_PS_PRECOMMIT
    BAPI_TRANSACTION_COMMIT
    The proj: 'S' and the level2 WBS element: 'S-XXX' already exist in the system.
    When I run the program for delta load, so as to create the following level3 WBS elements:
    S-XXX-001
    S-XXX-002
    S-XXX-003
    The system is throwing the following errors at the BAPI_PS_PRECOMMIT:
    1. Final Check of the project definition and WBS elements: Error
    2. Validation unsuccessful
    Pls help me on this.
    Thanks,
    Deepak

    Check the WBS elements doesn't exist already in your system.
    Here is what I coded some days back for deletion of Network Activities, most of the things are same.
    You are doing for WBS element.
    * Call to initialization BAPI Before Delete
          CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
    * Call to Network Activity Deletion BAPI
          CALL FUNCTION 'BAPI_BUS2002_ACT_DELETE_MULTI'
            EXPORTING
              i_number           = t_bapi_activity-network
            TABLES
              it_delete_activity = l_t_del_vornr
              et_return = l_t_bapiret2.
          DELETE l_t_bapiret2 WHERE type <> 'E'.
          READ TABLE l_t_bapiret2 INDEX 1.
          IF sy-subrc EQ 0.                                      "If error in Deletion
            MOVE: f_idoc_contrl-docnum TO t_idoc_status-docnum,
                  l_t_bapiret2-type TO t_idoc_status-msgty,
                  'CNIF_PI' TO t_idoc_status-msgid,
                  l_t_bapiret2-number TO t_idoc_status-msgno,
                  l_t_bapiret2-message TO t_idoc_status-msgv1.
                  MOVE c_idoc_status_error TO t_idoc_status-status.
                  APPEND t_idoc_status.
                  ROLLBACK WORK.
                  EXIT.
          ELSE.                                                  "If Delete is successful COMMIT
    * Call to PreCOMMIT BAPI
            CALL FUNCTION 'BAPI_PS_PRECOMMIT'
             TABLES
               ET_RETURN       = l_t_bapiret3.
    * Call COMMIT BAPI
    *        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
          ENDIF.
    The other solution is use BAPI_PROJECT_MAINTAIN.

  • Multiple milestone creation issue for WBS element  'BAPI_PROJECT_MAINTAIN'?

    Hi all,
    I am using 'BAPI_PROJECT_MAINTAIN' to  create Project definition,WBS element & milestone for WBS at once.
    The program is working fine if one wbs element have one milestone.
    But If any of the WBS elements have more than one milestone, the milestones are not creating properly.
    The bottom level WBS milestones are creating for some higher level  WBS. some milestones are not at all
    creating. I am not getting any error message.
    Code for mile stone section is :
    **fill milsestone data for WBS in BAPI structures
            lv_mlstno = lv_mlstno + 1.
            it_wbsmilestone-milestone_number = lv_mlstno.
            it_wbsmilestone-wbs_element  = it_wbsdata-ID.
            it_wbsmilestone-milestone_usage = it_wbsdata-mlstn.
            concatenate it_wbsdata-edatu+6(4) it_wbsdata-edatu+3(2) it_wbsdata-edatu(2) into it_wbsmilestone-FIXED_MILESTONE_DATE_BASIC.
            it_wbsmilestone-SALES_DOC_DATE_INIDICATOR = it_wbsdata-faktp.
            it_wbsmilestone-INVOICE_PERCENTAGE   = it_wbsdata-fproz.
            append it_wbsmilestone.
            clear it_wbsmilestone.
    **fill milsestone data for WBS in BAPI update structures
            it_wbsmilestoneupd-milestone_number = cs_x.
            it_wbsmilestoneupd-wbs_element  = cs_x.
            it_wbsmilestoneupd-wbs_element  = cs_x.
            it_wbsmilestoneupd-milestone_usage = cs_x.
            it_wbsmilestoneUPD-FIXED_MILESTONE_DATE_BASIC = cs_x.
            it_wbsmilestoneupd-SALES_DOC_DATE_INIDICATOR = cs_x.
            it_wbsmilestoneupd-INVOICE_PERCENTAGE   = cs_x.
            append it_wbsmilestoneUPD.
            clear it_wbsmilestoneUPD.
    **Fill bapi table method project1 for the creation of WBS milestone
    **milestone will be created only after the creation of WBS elements first
    **lv_refnum is  the link to wbs element, which is already appened to it_methodproject
              it_methodproject-refnumber   = lv_refnum.
              it_methodproject-objecttype  = 'WBS Milestone'.
              it_methodproject-method      = 'Create'.
              append it_methodproject.
              clear it_methodproject.
          endif.
    How to resolve the issue?
    Please help.
    Thanks,
    vamshi

    Hi Ravi,
    Thanks for your continuous reply.
    The problem is solved.
    I  have passed the, reference number of WBS element  creation to milestone creation  in the 'Method' table.
    Thatswhy it is picking wrongly.
    I have corrected this by passing different reference numbers to WBS and milestone creations
    based on their tables.
    Thanks,
    Vamshi

  • WBS Elements not getting created in ECC Project System from CRM 7.0

    Dear all,
    We are trying to integrate SAP CRM 7.0 with SAP ECC-PS module. The objective is to bring in the marketing plan and elements data from the CRM system, and to create the corresponding WBS in project system. We have done most of the configuration as recommended by SAP in both the systems, and we see that the BDOCS are getting generated and sent to the ECC system. The following steps have been successfully completed:
    1.       Set up the RFC connections between the two systems
    2.       Selected the connection type as Middleware in CRM system.
    3.       Installed the cProject Add on in CRM box.
    4.       Created a project scenario (with project and network profiles) in the PS system and assigned the same in the CRM system.
    5.       The Project Scenario in PS config has the same name as the Project Type in CRM config.
    6.       Created and released the campaign ids being created in the CRM system.
    As already mentioned, we can see that the BDOCS are coming to the ECC system and are getting stored in BDOC_TRACK table. However the issue is that the corresponding WBS elements are not getting generated in the ECC system. Is there anything that that we are missing in the ECC box which would trigger the WBS element creation?
    Request you all to share your inputs which would be immensely beneficial for us in achieving this integration.
    Thanks and Kind Regards,
    Aditya Shrivastava

    Hello Aditya,
    We too are facing this issue.. if you have resolved the issue could you please let us know the solution ?
    Some inputs related to our system,
    We have upgrade from CRM 4.0 to CRM 7.0 SP07 and R/3 backend system is on 4.7 SP27, earlier we have completed the upgrade on sandbox without any issues which was upgrade to CRM 7.0 SP04 but with SP07 we are facing the problem of WBS Element not getting created in R/3.
    Your help is highly appreciated.
    Thanks & Regards,
    Sumukh Kapoor.

  • Create a WBS Element level 3 Using BAPI_BUS2054_CREATE_MULTI

    i have to create a new WBS element level 3 but i have some customs fields to use in the WBS element creation. Fields that i should take from prps ( prps-zzx, prps-zzy ).
    Any suggestion?

    i have to create a new WBS element level 3 but i have some customs fields to use in the WBS element creation. Fields that i should take from prps ( prps-zzx, prps-zzy ).
    Any suggestion?

  • Creation of project definition and wbs element

    I want creation of project definition and wbs element upto 4 level using bapis.
    i am using transaction cj27,cj01,cj02
    which function module to use for this??

    Hi,
    to create project definition with customer fields the BAPI you should use is : BAPI_BUS2001_CREATE
    to create WBS elements with different levels and specific fields the BAPI you should use is BAPI_BUS2054_CREATE_MULTI
    these bapi must be used in the sequence of call :
    BAPI_PS_INITIALIZATION
    BAPI_BUS2001_CREATE / BAPI_BUS2054_CREATE_MULTI
    BAPI_PS_PRECOMMIT
    BAPI_TRANSACTION_COMMIT
    before using the bapi, you must apply OSS note :
    637345 - Syntax error with enhanced PS tables
    i sent you the oss note to your mail
    please reward points if helpfull.

  • During creation of WBS element How to pass ACCount Assignment field as blnk

    Hi Experts,
    I am  creating of WBS element by using BAPI   ''BAPI_BUS2054_CREATE_MULTI'' .
    during creation, passed the ACCount Assignment field  as blank.
    but when i check that WBS in CJ20n that ACCount Assignment field in coming as checked.    Please suggest me how to pass this field as blank.
    Thanks
    Susant
    Edited by: Susanta22 on May 9, 2011 6:08 PM

    I have same issue. how you resolved it.

  • Creation of Documents and assigning it to WBS Elements

    Hi all,
    I have a question regarding creation of documents.
    I am using T-code CV01N.....
    How to create the document and how to assign it to a WBS Element?
    Do we have any BAPIs or FM available for this?
    Thanks in advance....

    Hi Raj,
    Documents can be created/checkin  from WBS/activity without going to CV01N. For this, you need to have the DMS configured.
    Another way, Create document using transaction CV01N and attach manually in WBS/activity from Project Builder.
    Srinivasan Desingh

  • Creation of WBS Element Hierarchy

    Hi Friends,
    I have input file like the below(1 Project definition and n WBS elements)
    Project Definition     WBS Element
    HE-000200     
                         HE-000200.01
                         HE-000200.01.00001
                         HE-000200.01.00002
                         HE-000200.02
                         HE-000200.02.00001
                         HE-000200.02.00002
                         HE-000200.03
                         HE-000200.03.00001
                         HE-000200.03.00002
                         HE-000200.04
                         HE-000200.04.00001
                         HE-000200.04.00002
    I created Project Definition HE-000200 by using BAPI_BUS2001_create.
    Now I want to create above WBS elements hierarchy for the above project.
    I am using the BAPI_BUS2054_create_multi.
    is it possitble to create wbs elemnents like the baove hierarchy by using BAPI_BUS2054_create_multi? if yes send me the code , it will help to me.
    !!!!! IT is very urgent.
    Waiting for your inputs
    Regards,

    Hi Raju,
    See this .,.,this might help u.,.,
    *& Include ZBAPIWBS
    *& Report Z_BAPI_CJ20N
    REPORT Z_BAPI_CJ20N.
    INCLUDE ZBAPICJ20NTOP.
    INCLUDE ZBAPICJ20NFILEUP.
    INCLUDE ZBAPICJ20NLOGIC.
    *& Include ZBAPICJ20NTOP
    DATA: BEGIN OF ITMAIN OCCURS 0,
    PROJECT_DEFINITION TYPE PS_PSPID,
    DESCRIPTION TYPE PS_POST1,
    PROJECT_PROFILE TYPE PROFIDPROJ,
    BUS_AREA TYPE GSBER,
    WBS_ELEMENT TYPE PS_POSID,
    WBS_DESCRIPTION TYPE PS_POST1,
    END OF ITMAIN,WA_MAIN LIKE LINE OF ITMAIN,ITWBS LIKE STANDARD
    TABLE OF ITMAIN WITH HEADER LINE, ITMAIN2 LIKE STANDARD TABLE OF
    ITMAIN.
    DATA: ITPRJDEF TYPE STANDARD TABLE OF BAPI_PROJECT_DEFINITION WITH
    HEADER LINE,WA_PRJDEF LIKE LINE OF ITPRJDEF.
    DATA: ITPRJDEFUP TYPE STANDARD TABLE OF BAPI_PROJECT_DEFINITION_UP WITH
    HEADER LINE, WA_PRJDEFUP LIKE LINE OF ITPRJDEFUP.
    DATA: ITMETPRJ TYPE STANDARD TABLE OF BAPI_METHOD_PROJECT,
    WA_METPRJ LIKE LINE OF ITMETPRJ.
    DATA: RETURN TYPE BAPIRETURN1,MSG TYPE STANDARD TABLE OF
    BAPI_METH_MESSAGE WITH HEADER LINE.
    DATA: LINES TYPE I,REFNO TYPE I VALUE 0.
    DESCRIBE TABLE ITMAIN LINES LINES.
    DATA: METTYPE TYPE STRING VALUE 'Create'.
    DATA: WA_DUPLI LIKE LINE OF ITMAIN.
    WA_DUPLI-PROJECT_DEFINITION = 'JB'.
    DATA: SPLIT1(50) TYPE C.
    DATA: PREVWBS TYPE PS_POSID VALUE ' ',
    LEFTWBS TYPE PS_POSID VALUE ' '.
    DATA: POS TYPE I VALUE 1.
    DATA: OFF TYPE I VALUE 0,MODE TYPE I,INDEX1 TYPE I VALUE 0,
    INDEX2 TYPE I VALUE 0,INDEX3 TYPE I VALUE 0,
    INDEX4 TYPE I VALUE 0,INDEX5 TYPE I VALUE 0,
    POS2 TYPE I VALUE 0,FLAG TYPE I VALUE 0.
    DATA: ITBUS TYPE STANDARD TABLE OF BAPI_BUS2054_NEW,
    WA_BUS LIKE LINE OF ITBUS, RET TYPE STANDARD TABLE OF BAPIRET2,
    WA_RET LIKE LINE OF RET, ITBUS2 LIKE STANDARD TABLE OF BAPI_BUS2054_NEW,
    WA_BUS2 LIKE LINE OF ITBUS, WA_BUS3 LIKE LINE OF ITBUS.
    DATA: BAPIRET TYPE BAPIRETURN1,
    PROJEX TYPE BAPI_PROJECT_DEFINITION_EX.
    *& Include ZBAPICJ20NFILEUP
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    FILENAME = ' '
    FILETYPE = 'DAT'
    TABLES
    DATA_TAB = ITMAIN .
    *& Include ZBAPICJ20NLOGIC
    SORT ITMAIN BY PROJECT_DEFINITION WBS_ELEMENT.
    LOOP AT ITMAIN INTO WA_MAIN.
    IF WA_DUPLI-PROJECT_DEFINITION <> WA_MAIN-PROJECT_DEFINITION.
    WA_PRJDEF-PROJECT_DEFINITION = WA_MAIN-PROJECT_DEFINITION.
    WA_PRJDEF-DESCRIPTION = WA_MAIN-DESCRIPTION.
    WA_PRJDEF-PROJECT_PROFILE = WA_MAIN-PROJECT_PROFILE.
    WA_PRJDEF-BUS_AREA = WA_MAIN-BUS_AREA.
    WA_PRJDEFUP-PROJECT_DEFINITION = 'X'.
    WA_PRJDEFUP-DESCRIPTION = 'X'.
    WA_PRJDEFUP-PROJECT_PROFILE = 'X'.
    WA_PRJDEFUP-BUS_AREA = 'X'.
    WA_METPRJ-REFNUMBER = REFNO + 1 .
    WA_METPRJ-OBJECTTYPE = 'ProjectDefinition'.
    WA_METPRJ-METHOD = METTYPE.
    WA_METPRJ-OBJECTKEY = WA_MAIN-PROJECT_DEFINITION.
    APPEND WA_METPRJ TO ITMETPRJ.
    WA_METPRJ-REFNUMBER = ''.
    WA_METPRJ-OBJECTTYPE = ''.
    WA_METPRJ-METHOD = 'Save'.
    WA_METPRJ-OBJECTKEY = ''.
    APPEND WA_METPRJ TO ITMETPRJ.
    CALL FUNCTION 'BAPI_PROJECT_MAINTAIN'
    EXPORTING
    I_PROJECT_DEFINITION = WA_PRJDEF
    I_PROJECT_DEFINITION_UPD = WA_PRJDEFUP
    IMPORTING
    RETURN = RETURN
    TABLES
    I_METHOD_PROJECT = ITMETPRJ
    E_MESSAGE_TABLE = MSG.
    IF SY-SUBRC = 0.
    FLAG = 1.
    ENDIF.
    WA_DUPLI-PROJECT_DEFINITION = WA_MAIN-PROJECT_DEFINITION.
    COMMIT WORK.
    DELETE ITMETPRJ FROM 1 TO 2.
    INCLUDE ZBAPIWBS_ALL.
    ENDIF.
    ENDLOOP.
    *& Include ZBAPIWBS_ALL
    LOOP AT ITMAIN INTO WA_MAIN WHERE PROJECT_DEFINITION = WA_DUPLI-PROJECT_DEFINITION.
    APPEND WA_MAIN TO ITWBS.
    ENDLOOP.
    *Sort the table
    LOOP AT ITWBS INTO WA_MAIN.
    SPLIT1 = WA_MAIN-WBS_ELEMENT.
    POS = 0.
    LOOP AT ITWBS WHERE WBS_ELEMENT <> SPLIT1.
    IF STRLEN( ITWBS-WBS_ELEMENT ) = STRLEN( SPLIT1 ).
    IF POS = 0.
    APPEND WA_MAIN TO ITMAIN2.
    ENDIF.
    APPEND ITWBS TO ITMAIN2.
    DELETE ITWBS WHERE WBS_ELEMENT EQ ITWBS-WBS_ELEMENT.
    POS = 1.
    ELSE.
    IF POS = 0.
    APPEND WA_MAIN TO ITMAIN2.
    DELETE ITWBS WHERE WBS_ELEMENT EQ WA_MAIN.
    ENDIF.
    POS = 1.
    ENDIF.
    ENDLOOP.
    INDEX1 = INDEX1 + 1.
    ENDLOOP.
    *Define UP element
    LOOP AT ITMAIN2 INTO WA_MAIN.
    WA_BUS-WBS_ELEMENT = WA_MAIN-WBS_ELEMENT.
    WA_BUS-DESCRIPTION = WA_MAIN-WBS_DESCRIPTION.
    WA_BUS-WBS_UP = ''.
    WA_BUS-WBS_LEFT = ''.
    SPLIT1 = WA_MAIN-WBS_ELEMENT.
    LOOP AT ITMAIN2 INTO WA_MAIN WHERE WBS_ELEMENT <> SPLIT1.
    IF STRLEN( WA_MAIN-WBS_ELEMENT ) < STRLEN( SPLIT1 ) .
    FIND WA_MAIN-WBS_ELEMENT IN SPLIT1.
    IF SY-SUBRC = 0.
    WA_BUS-WBS_UP = WA_MAIN-WBS_ELEMENT.
    PREVWBS = WA_MAIN-WBS_ELEMENT.
    ENDIF.
    ENDIF.
    ENDLOOP.
    APPEND WA_BUS TO ITBUS.
    INDEX2 = INDEX2 + 1.
    ENDLOOP.
    PREVWBS = ''.
    LEFTWBS = ''.
    Define LEFT ELEMENT.
    LOOP AT ITMAIN2 INTO WA_MAIN.
    POS = 0.
    SPLIT1 = WA_MAIN-WBS_ELEMENT.
    READ TABLE ITBUS INTO WA_BUS2 WITH KEY WBS_ELEMENT = WA_MAIN-WBS_ELEMENT.
    WA_BUS-WBS_ELEMENT = SPLIT1.
    WA_BUS-DESCRIPTION = WA_MAIN-WBS_DESCRIPTION.
    WA_BUS-WBS_UP = WA_BUS2-WBS_UP.
    OFF = SY-TABIX.
    LOOP AT ITMAIN2 INTO WA_MAIN WHERE WBS_ELEMENT <> SPLIT1.
    READ TABLE ITBUS INTO WA_BUS3 WITH KEY WBS_ELEMENT = WA_MAIN-WBS_ELEMENT.
    IF STRLEN( WA_BUS2-WBS_ELEMENT ) = STRLEN( WA_BUS3-WBS_ELEMENT ) AND
    WA_BUS2-WBS_UP = WA_BUS3-WBS_UP AND POS = 0.
    IF STRLEN( LEFTWBS ) <> STRLEN( SPLIT1 ).
    LEFTWBS = ''.
    ENDIF.
    IF STRLEN( LEFTWBS ) = STRLEN( SPLIT1 ).
    FIND WA_BUS2-WBS_UP IN LEFTWBS.
    IF SY-SUBRC <> 0.
    LEFTWBS = ''.
    ENDIF.
    ENDIF.
    WA_BUS-WBS_LEFT = LEFTWBS.
    LEFTWBS = SPLIT1.
    POS = 1.
    MODIFY ITBUS INDEX OFF FROM WA_BUS.
    ENDIF.
    ENDLOOP.
    ENDLOOP.
    WA_BUS-WBS_ELEMENT = ''.
    APPEND WA_BUS TO ITBUS.
    Store WBS ELEMENTS.
    LOOP AT ITBUS INTO WA_BUS.
    SPLIT1 = WA_BUS-WBS_ELEMENT.
    APPEND WA_BUS TO ITBUS2.
    INDEX3 = 1.
    POS = 0.
    LOOP AT ITBUS INTO WA_BUS WHERE WBS_ELEMENT <> SPLIT1.
    IF STRLEN( WA_BUS-WBS_ELEMENT ) <> STRLEN( SPLIT1 ) AND POS = 0.
    POS = 1.
    INDEX4 = INDEX3.
    CALL FUNCTION 'BAPI_PS_INITIALIZATION' .
    CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
    EXPORTING
    I_PROJECT_DEFINITION = WA_DUPLI-PROJECT_DEFINITION
    TABLES
    IT_WBS_ELEMENT = ITBUS2
    ET_RETURN = RET .
    CALL FUNCTION 'BAPI_PS_PRECOMMIT'
    TABLES
    ET_RETURN = RET.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT = 'X'
    IMPORTING
    RETURN = WA_RET.
    ENDIF.
    APPEND WA_BUS TO ITBUS2.
    INDEX3 = INDEX3 + 1.
    ENDLOOP.
    DELETE ITBUS2 FROM 1 TO INDEX3.
    DELETE ITBUS FROM 1 TO INDEX4.
    ENDLOOP.
    DELETE ITWBS FROM 1 TO INDEX1.
    CLEAR ITWBS.
    DELETE ITMAIN2 FROM 1 TO INDEX2.
    *At the end of all projects' processing
    IF FLAG = 1.
    CALL FUNCTION 'POPUP_FOR_INTERACTION'
    EXPORTING
    HEADLINE = 'PS Project & WBS Creation'
    TEXT1 = 'All the Projects have been created.Please check......'
    TICON = 'I'
    BUTTON_1 = 'OK'.
    ELSE.
    CALL FUNCTION 'POPUP_FOR_INTERACTION'
    EXPORTING
    HEADLINE = 'Deb Program'
    TEXT1 = 'No Projects were created...'
    TICON = 'I'
    BUTTON_1 = 'CANCEL'
    ENDIF.
    Regards
    Deb

  • Automatically PO creation from WBS element in a project

    Hi,
    Is it possible to create Purchase Order automatically from the project that has only WBS element (no network)?
    My project has only WBS element and my client want to trigger PO creation automatically for prorements to projects.
    I appreciate your replies.
    Regards,
    Ja

    Hi Ja,
    Sorry, but you cannot create a PO automatically for a project that has only WBS elements and no network or acitivites. Since materials can only be attached to activities in a project it is mandatory to have an activity to trigger a PO automatically from the project.
    You may have to create a PO manually and then assign the WBS as account assignment.
    Regards,
    Gokul

Maybe you are looking for

  • Appleworks Drawing & Painting: Color palettes *still* getting scrambled

    I have a problem when using Appleworks drawing files with painting frames. An Appleworks painting frame normally has two color palettes. One comes from the Drawing document, and this determines the background color of the painting frame. Anywhere tha

  • Is there a way to add a gradient to a text that has a 3d bevel from illustrator?

    I have a Logo and applied the 3D tool to use the round bevel. after that I try applying a gradient but it doesnt look good, does anybady know how to fix that?

  • Statement of Direction Question

    in the new SoD of July is a link to oracle.com/support/library/datasheet/oracle-lifetime-support-policy-datasheet.pdf Error: We're sorry, the page you requested was not found. who knows the correct URL?

  • Can't find an ipad with the iphone bluetooth

    hi everybody, nice to meet. i've a question about iphoine bluetooth. in my office 'ive got my iphone 4 with iOS 4.3.3 and an ipad with the same iOS version. well, the ipad can find the iphone and try to connect with it but it can't. the iphone no: it

  • Books on SAP BW

    Hi All, I am loking for detailed, real time Example given Books on SAP BW. Can anyone suggested. Thanks in advance Sukanya