cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple milestone creation issue for WBS element 'BAPI_PROJECT_MAINTAIN'?

Former Member
0 Kudos
708

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

enter the object type and method in the IMethodProject table in correct way,

why because they are case senstive.

Once check them and try it, i hope it will help you.

Regards,

ravi

Former Member
0 Kudos

hi,

Thanks for the reply.

No Problem with the obkect type and method as some milestones are created.

Any other solution?

Thanks,

vamshi

Former Member
0 Kudos

Hi,

Dont pass milestone number explicitly, system will automatically generates.

Regards,

Ravi

Former Member
0 Kudos

hi,

Thanks for the reply.

If i didn't pass the milestone number explicitly, all the milestones are creating for the first WBS element only.

Thanks,

Vamshi

Former Member
0 Kudos

Hi,

once place the code , i will check

Regards,

Ravi

Former Member
0 Kudos

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