Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

WBS Element Creation

Former Member
0 Likes
615

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.

3 REPLIES 3
Read only

former_member182670
Contributor
0 Likes
586

You can do it with BAPI BAPI_PROJECT_MAINTAIN.

Check documentation of this FM.

You should use command 'Create'.

Let me know if you want example code.

Read only

0 Likes
586

Hi,

Thanks for that. It would be really helpful if you could gimme a sample piece of code.

Thanks in advance.

Regards,

Tamilarasan.

Read only

0 Likes
586
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.