Skip to Content
0
Former Member
Jul 06, 2006 at 10:48 AM

bapi_project_maintain

130 Views

I create a project with 7 WBS using function bapi_project_maintain.

Everything is going well until I have to set a WBS hierarchie.

I need to set a level 1 for the first WBS and level 2 for the rest.

I get the error: 'The transfer hierarchie is inconsistent'

I code table like this:

I_WBS_HIERARCHIE_TABLE-WBS_ELEMENT = PROJECT.

DLUGOSC = strlen( PROJECT ).

I_WBS_HIERARCHIE_TABLE-WBS_ELEMENT+DLUGOSC = '-BDG'.

I_WBS_HIERARCHIE_TABLE-PROJECT_DEFINITION = PROJECT.

I_WBS_HIERARCHIE_TABLE-UP = ''.

I_WBS_HIERARCHIE_TABLE-DOWN = PROJECT.

I_WBS_HIERARCHIE_TABLE-DOWN+DLUGOSC = '-CP'.

I_WBS_HIERARCHIE_TABLE-LEFT = ''.

I_WBS_HIERARCHIE_TABLE-RIGHT = ''.

APPEND I_WBS_HIERARCHIE_TABLE.

I_WBS_HIERARCHIE_TABLE-WBS_ELEMENT = PROJECT.

DLUGOSC = strlen( PROJECT ).

I_WBS_HIERARCHIE_TABLE-WBS_ELEMENT+DLUGOSC = '-CP'.

I_WBS_HIERARCHIE_TABLE-PROJECT_DEFINITION = PROJECT.

I_WBS_HIERARCHIE_TABLE-UP = PROJECT.

I_WBS_HIERARCHIE_TABLE-UP+DLUGOSC = '-BDG'.

I_WBS_HIERARCHIE_TABLE-DOWN = ''.

I_WBS_HIERARCHIE_TABLE-LEFT = ''.

I_WBS_HIERARCHIE_TABLE-RIGHT = ''.

APPEND I_WBS_HIERARCHIE_TABLE.

I_WBS_HIERARCHIE_TABLE-WBS_ELEMENT = PROJECT.

DLUGOSC = strlen( PROJECT ).

I_WBS_HIERARCHIE_TABLE-WBS_ELEMENT+DLUGOSC = '-SA'.

I_WBS_HIERARCHIE_TABLE-PROJECT_DEFINITION = PROJECT.

I_WBS_HIERARCHIE_TABLE-UP = PROJECT.

I_WBS_HIERARCHIE_TABLE-UP+DLUGOSC = '-BDG'.

I_WBS_HIERARCHIE_TABLE-DOWN = ''.

I_WBS_HIERARCHIE_TABLE-LEFT = ''.

I_WBS_HIERARCHIE_TABLE-RIGHT = ''.

APPEND I_WBS_HIERARCHIE_TABLE.

When I use only first 2 all goes well. Problem starts when a third WBS is added.