‎2006 Jan 24 3:43 PM
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.
‎2006 Jan 31 9:55 PM
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.
‎2006 Feb 01 1:29 AM
Hi,
Thanks for that. It would be really helpful if you could gimme a sample piece of code.
Thanks in advance.
Regards,
Tamilarasan.
‎2006 Feb 01 7:10 AM
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.