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

BAPI_PROJECT_MAINTAIN

Former Member
0 Likes
1,509

Hi to all,

I am using BAPI_PROJECT_MAINTAIN to add WBS elements to an EXISTING project for example at level-2.

The project stucture is as below:

====================

WBS1 Level-1

WBS2 Level-2

WBS3 Level-2

WBS4 Level-3

WBS5 Level-1

WBS6 Level-1

====================

I wanto to add new WBS at level 2 to this exsisting project with the up structure, so that I can obtain the structure below

====================

WBS1 Level-1

WBS2 Level-2

WBS3 Level-2

WBS3a Level-2

WBS4 Level-3

WBS5 Level-1

WBS6 Level-1

====================

How can I do? Using BAPI_PROJECT_MAINTAIN I have an error.

I have problems with hierarchy?

Thank you very much,

Antonio

4 REPLIES 4
Read only

krzysztof_konitz4
Contributor
0 Likes
1,272

Hi,

Try to activate error log for BAPI_PROJECT_MAINTAIN using:

METHOD_PROJECT-OBJECTTYPE = 'Trace'.

METHOD_PROJECT-METHOD = 'Create'.

METHOD_PROJECT-OBJECTKEY = FILENAME.

APPEND METHOD_PROJECT.

I think that the best approach is first to read hierarchy using:

CALL FUNCTION 'BAPI_PROJECT_GETINFO'

EXPORTING

PROJECT_DEFINITION = PROJECT_DEFINITION-PROJECT_DEFINITION

IMPORTING

RETURN = RETURN

TABLES

E_WBS_HIERARCHIE_TABLE = WBS_HIERARCHIE_TABLE.

and then modify it accordingly

Krzys

Read only

Former Member
0 Likes
1,272

Hello Antonio!

I don't know if you already solved the problem, I had to do the same thing,

First you need to create the element (you can use the BAPI with method CREATE), and then you need to rebuild the hierarchy (with the same bapi with other paramethers), for the second step I used BAPI_PROJECT_GETINFO which Krzys suggested, with that you can get the actual hierarchy and then modify it as you need,

The documentation in BAPI transaction is very helpful with the paramethers you need to use,

I hope it helps,

Frinee

Read only

Former Member
0 Likes
1,272

Hi,

Based on the above notes and lots of test, we are not able to update the Project hieararchy. I created the Project and WBS using the BAPI successfully, but all the WBS are level 1. I am unable to restructure the WBS to other lower levels. Any input will be appreciated.

thanks

-satish

Read only

0 Likes
1,272

Hi All and Satish,

I am having trouble updating Hierarchy using BAPI_PROJECT_MAINTAIN function module. Any solution or code please?

Thanks

ABAPer