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_BUS2054_CREATE_MULTI

Former Member
0 Likes
3,089

while creating Wbs elements from Bapi BAPI_BUS2054_CREATE_MULTI i am getting message that INdividual checks are needed. and after that when i am doing BAPI PSPRECOMMIT it is failing ? Can anybody help me on this

1 ACCEPTED SOLUTION
Read only

Former Member
2,298

Hi,

When you use BAPI BAPI_BUS2054_CREATE_MULTI , it should be called with these BAPIs and this order only.

1. BAPI_PS_INITIALIZATION "Initilize

2. BAPI_BUS2054_CREATE_MULTI ( to create WBS )

3. BAPI_BUS2054_SET_STATUS "Release WBS ( only if you want to REL )

4. BAPI_PS_PRECOMMIT "Precommit

5. BAPI_TRANSACTION_COMMIT "Commit

Please let me know if you are using these bapis in these order.

Regards,

RS

8 REPLIES 8
Read only

Former Member
2,299

Hi,

When you use BAPI BAPI_BUS2054_CREATE_MULTI , it should be called with these BAPIs and this order only.

1. BAPI_PS_INITIALIZATION "Initilize

2. BAPI_BUS2054_CREATE_MULTI ( to create WBS )

3. BAPI_BUS2054_SET_STATUS "Release WBS ( only if you want to REL )

4. BAPI_PS_PRECOMMIT "Precommit

5. BAPI_TRANSACTION_COMMIT "Commit

Please let me know if you are using these bapis in these order.

Regards,

RS

Read only

0 Likes
2,298

do i need to initialize before the use of multi bapi coz BAPI_PS_PRECOMMIT does that

Read only

0 Likes
2,298

Hi,

Not before BAPI_PS_PRECOMMIT. <b>BUT YES before you use BAPI_BUS2054_CREATE_MULTI, you have to use BAPI_PS_INITIALIZATION</b>.

Let me know if you have any question.

Regards,

RS

Read only

0 Likes
2,298

Hi RS,

But if i am trying to release the wbs elements before BAPI_PS_PRECOMMIT it odes not releases them and if i am trying to use BAPI_PS_PRECOMMIT before it its creating the element but not attaching the networks to it. please help.

Read only

0 Likes
2,298

Hi,

I am using these BAPIs to create project, WBS elements and release WBSs. Please send me the order in which you are calling these BAPIs. Also mentioned what you are doing with each BAPIs.

Regards,

RS

Read only

0 Likes
2,298

the code is as follows:

<b>CALL FUNCTION 'BAPI_PS_INITIALIZATION'.

CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'

EXPORTING

i_project_definition = w_projdef-project_definition

TABLES

it_wbs_element = i_wbse

et_return = i_return.

  • extensionin = it_extra.

READ TABLE i_return INTO w_return WITH KEY type = c_e.

IF sy-subrc = 0.

break qqrey1d.

MESSAGE s000(fb) WITH

w_return-message(50) w_return-message+50.

PERFORM bapi_transaction_rollback.

RAISE wbs_not_created.

ENDIF.

PERFORM: bapi_ps_precommit,

bapi_transaction_commit.

LOOP AT i_wbse INTO w_wbse.

CLEAR w_wbs_ret.

PERFORM set_wbs_status USING 'REL' w_wbse-wbs_element w_wbs_ret.

WAIT UP TO 1 SECONDS.

IF w_wbs_ret = 1.

MESSAGE s000(fb) WITH

'Failed to Relase WBS Element' w_wbse-wbs_element.

ENDIF.

ENDLOOP.

CHECK NOT i_wbs[] IS INITIAL.

CALL FUNCTION 'Z_PN_UPDATE_ZNWBS_ELEMENT'

EXPORTING

x_update = c_i

TABLES

t_zit_wbs_element = i_wbs.</b></b>

Read only

0 Likes
2,298

Hi,

There is nothing wrong with your code.

Regarding, the error you have mentioned in your first post "INdividual checks are needed", actually we also gest this message. But since this is not "Error" or "Abort" message. We just ignore it and it works fine.

You mentioned before that you "release" the wbs status. Where is that BAPI?

Also, you mentioned that you add network too. Where is that BAPI.

Just give me the sequence of BAPIs you are using and what error you are getting in each different sequence.

Give me these detail, i will look into it.

Regards,

RS

Read only

vikash_pathak
Participant
0 Likes
2,298

HI Friends,

when i am working with  BAPI_BUS2054_CREATE_MULTI , i am getting error that,

E

CNIF_PI76Hierarchy reference element TO-00000008.01 for WBS element TO-00000008.01.01 does not existTO-00000008.01TO-00000008.01.01
ECNIF_PI74

Hierarchy structure for WBS element TO-00000008.01.01 not possible

TO-00000008.01.01

Plz help me out, its urgent,

Thanks in Advance

Vikash