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

PROBLEM WITH BAPI_BUS2054_DELETE_MULTI

Former Member
0 Likes
1,298

HELLO EXPERTS
I HAVE A PROBLEM WITH BAPI BAPI_BUS2054_DELETE_MULTI FOR DELETE SINGLE WBS IN CJO2.



DATE :
i_project_definition TYPE bapi_bus2001_new - project_definition .


DATE : it_delete_wbs_element bapi_wbs_list LIKE OCCURS 0 WITH HEADER LINE .
DATE : et_return bapiret2 LIKE OCCURS 0 WITH HEADER LINE .
DATE : extensionin bapiparex LIKE OCCURS 0 WITH HEADER LINE .
DATE : extensionout bapiparex LIKE OCCURS 0 WITH HEADER LINE .
*
*
START- OF- SELECTION .

 
MOVE ' ICC0983 ' TO i_project_definition .



 
it_delete_wbs_element - wbs_element = ' ICC0983 -001 ' .
 
APPEND it_delete_wbs_element .
 
it_delete_wbs_element - wbs_element = ' ICC0983 -002 ' .
 
APPEND it_delete_wbs_element .




 
CALL FUNCTION ' BAPI_BUS2054_DELETE_MULTI '
   
EXPORTING
     
i_project_definition = i_project_definition
   
TABLES
     
it_delete_wbs_element = it_delete_wbs_element
     
et_return = et_return .
* = EXTENSIONIN
* = EXTENSIONOUT
 
.

 
LOOP AT et_return .

   
WRITE 😕 et_return -message .


 
ENDLOOP .



THE REPORT GIVES THE FOLLOWING MESSAGE :

Object WBS Element ICC0983 -001 Could not be deleted E | CNIF_PI The 011
Processing not possible Because there is no initialization E | CNIF_PI | 078
Object WBS Element ICC0983 -002 Could not be deleted E | CNIF_PI The 011
Processing not possible Because there is no initialization E | CNIF_PI | 078


know the error ?

3 REPLIES 3
Read only

sachin_yadav3
Active Participant
0 Likes
844

Hi,

May be you could try by setting deletion flag using bapi   BAPI_BUS2054_SET_STATUS.

Regards

Sachin

Read only

Former Member
0 Likes
844

Hi Antonio,

Do you  manage to delete the WBS without using the BAPI ?

Can be an issue of internal/external format differences: in here wbs ICC0983 doesn't seem to exist, and could be because of that.

Take care,

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
844

Hi Antonio

If you read the documentation of this BAPI it clearly states to use following BAPI's in order

  1. BAPI_PS_INITIALIZATION
  2. BAPI_BUS2054_DELETE_MULTI
  3. BAPI_PS_PRECOMMIT
  4. BAPI_TRANSACTION_COMMIT

Please read documentation for more details

Nabheet