Skip to Content
Former Member
Jan 05, 2012 at 04:18 AM

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.

How to resolve the issue?

Please help.