Application Development 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: 

BAPI for creating Networks in Project System

Former Member
0 Kudos

Hi,

Can you guys provide me BAPIs I can use in creating networks in Project Systems? I tried using BAPI_BUS2002_CREATE but encountered errors when checking the PS Global Flags. I tried setting the said flags by running the FM PS_FLAG_SET_GLOBAL_FLAGS but the changes are not reflected in the system.

Thanks in advance!

Cheers,

Ian

1 ACCEPTED SOLUTION

Former Member
0 Kudos

First

CALL FUNCTION 'BAPI_PS_INITIALIZATION'

Second

CALL FUNCTION 'BAPI_BUS2002_CREATE'

fill values in I_NETWORK

Third

CALL FUNCTION 'BAPI_PS_PRECOMMIT'

Last

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

If you have a project, you will need to create it with

CALL FUNCTION 'BAPI_BUS2001_CREATE', but you need to do all the steps above, starting with INITIALIZATION.

Use CALL FUNCTION 'BAPI_BUS2054_CREATE' to create WBS elements.

6 REPLIES 6

former_member188685
Active Contributor
0 Kudos

after setting the flags also you are still getting the error.

And Use BAPI_TRANSACTION_COMMIT when there is no error.

0 Kudos

Hi Vijay,

The changes not reflected that i mentioned were the PS flags that i set. So i was not able to proceed with the creation of PS networks.

Many thanks,

Ian

0 Kudos

Hi,

The BAPI mentioned by you will create Network header only. I think you would also like to create activity, elements etc in that network, so suggest use BAPI_NETWORK_MAINTAIN. Refer to documentation in SE37.

Regards

Former Member
0 Kudos

HI,

To reflect changes in the system you should use the bapi with the sequence :

 BAPI_PS_INITIALIZATION

 BAPI_BUS2002_CREATE

 BAPI_PS_PRECOMMIT

 BAPI_TRANSACTION_COMMIT

please see :

http://abap.wikiprog.com/wiki/BAPI_BUS2002_CREATE

Regards,

Ihsen ABROUG

Former Member
0 Kudos

Hi Ian,

Do you have custom fields in your standard PS tables ?

If yes you have to implement OSS note 637345 u201CSyntax error with enhanced PS tablesu201D

it will work fine.

Former Member
0 Kudos

First

CALL FUNCTION 'BAPI_PS_INITIALIZATION'

Second

CALL FUNCTION 'BAPI_BUS2002_CREATE'

fill values in I_NETWORK

Third

CALL FUNCTION 'BAPI_PS_PRECOMMIT'

Last

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

If you have a project, you will need to create it with

CALL FUNCTION 'BAPI_BUS2001_CREATE', but you need to do all the steps above, starting with INITIALIZATION.

Use CALL FUNCTION 'BAPI_BUS2054_CREATE' to create WBS elements.