cancel
Showing results for 
Search instead for 
Did you mean: 

PS Project is being created without structure(WBS elements)

Former Member
0 Kudos

Hi,

I am facing an issue with PS project creation. Project is being created successfully but no WBS elements getting created.

Using the BAPsI in the below order. BAPI return table contain success messages for all BAPIs. I am checking error for all BAPIs.

If there is no error, then I am committing the data with BAPI_PS_PRECOMMIT and BAPI_TRANSACTION_COMMIT -> Wait = 'X.

BAPI_BUS2001_CREATE

BAPI_BUS2054_CREATE_MULTI

BAPI_BUS2001_SET_STATUS

BAPI_PS_PRECOMMIT

BAPI_TRANSACTION_COMMIT -> Wait = 'X

Can you help why this is happening.

Regards,

Balavardhan.

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor
0 Kudos
  • Did you also call BAPI_PS_INITIALIZATION (first) ?
  • You could (should) also execute multiple call of BAPI_BUS2054_CREATE_MULTI, first call level 1 WBS, then call level 2 WBS, etc.

Regards,

Raymond

Former Member
0 Kudos

Hi Raymond,

The below is my BAPI FM calls to Create Project and WBS elements.

BAPI_PS_INITIALIZATION

BAPI_BUS2001_CREATE

BAPI_BUS2054_CREATE_MULTI

BAPI_BUS2001_SET_STATUS

BAPI_PS_PRECOMMIT

BAPI_TRANSACTION_COMMIT -> Wait = 'X

Regards,

Balavardhan.k

raymond_giuseppi
Active Contributor
0 Kudos

Regards,

Raymond

Former Member
0 Kudos

I am checking the BAPI retrun parameters too. No error. I did not understand why there is a inconsistency with Project and WBS elements creation.

Regards,

Balavardhan.K

Former Member
0 Kudos

I figured out why this issue occurring. The issue with WBS element population to BAPI parameters.

I corrected and it is working fine without any inconsistency.

Still I am using the below sequence of BAPI to create Project and WBS element together.

BAPI_PS_INITIALIZATION

BAPI_BUS2001_CREATE

BAPI_BUS2054_CREATE_MULTI

BAPI_BUS2001_SET_STATUS

BAPI_PS_PRECOMMIT

BAPI_TRANSACTION_COMMINT => WAIT = 'X'.

Answers (1)

Answers (1)

former_member188724
Contributor
0 Kudos

Hi Balavaradhan,

You can try These steps:

BAPI_BUS2001_CREATE

BAPI_PS_PRECOMMIT

BAPI_TRANSACTION_COMMIT -> Wait = 'X

BAPI_PS_INITIALIZATION

BAPI_BUS2054_CREATE_MULTI

BAPI_PS_PRECOMMIT

BAPI_TRANSACTION_COMMIT -> Wait = 'X

BAPI_PS_INITIALIZATION

BAPI_BUS2001_SET_STATUS

BAPI_PS_PRECOMMIT

BAPI_TRANSACTION_COMMIT -> Wait = 'X

This should work.

You can also use BAPI_PROJECT_MAINTAIN instead of all the steps above.

If you have any issues pls do let me know.

Regards,

K.S


Former Member
0 Kudos

Hi KS,

Thanks for reply. My question this should work as ALL or Nothing principle. The project should get created along with its WBS elements. So we can't do commit work at each stage.

Because of that I am using Commit FMs at the end.

For each step i am checking BAPI return parameter, if it is success i am proceeding further.

I didn't undestand why this is happening.

Regards,

Balavardhan.K

former_member188724
Contributor
0 Kudos

hi Bala,

I agree with you. But it will not work unless you commit the created project first and then only it will work to create the wbs elements.

Else as I said in one go you can use BAPI_PROJECT_MAINTAIN to do this in one step.

Regards,

K.S.

Former Member
0 Kudos

Hi K.S,

What I observed is, with the same appraoch(My original approach) it is working fine for some times. There is inconsitency, some times it is creating only project with out WBS elements. As you mentioned it should not work for every time. I am still confused why it is happening like this.

Regards,

Balavardhan.