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

short dump Error in BAPI_BUS2054_SET_STATUS

Former Member
0 Kudos
2,047

I am trying to set status of wbs element and have the following sequence of calls based on the

CALL FUNCTION 'BAPI_PS_INITIALIZATION' .

CALL FUNCTION 'BAPI_PS_PRECOMMIT'

TABLES

et_return = it_bapiret.

CALL FUNCTION 'BAPI_BUS2054_SET_STATUS'

IMPORTING

return = l_return

TABLES

i_wbs_user_status = it_wbs_user_status

e_result = lt_e_result.

IF l_return-type EQ 'E'.

gv_flg_error = 'X'.

ENDIF.

CALL FUNCTION 'BAPI_PS_PRECOMMIT'

TABLES

et_return = it_bapiret.

READ TABLE it_bapiret INTO it_bapiret WITH KEY type = 'E'.

IF sy-subrc = 0.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'.

ENDIF.

I am still getting the short dump :

Error analysis

Short text of error message:

Precommit did not run successfully

Information on where terminated

Termination occurred in the ABAP program "SAPLPS_BAPI" - in "CHK_PRECOMMIT".

The main program was "RS_TESTFRAME_CALL ".

In the source code you have the termination point in line 24

of the (Include) program "LPS_BAPIF01".

Any help to make this work is appreciated.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
893

U need to use RollBack option. use the BAPI "call function 'BAPI_TRANSACTION_ROLLBACK'." as below.

call function 'BAPI_PS_INITIALIZATION'.

call function 'BAPI_BUS2002_SET_STATUS'

exporting

number = network

tables

i_activity_system_status = it

e_result = itet.

read table itet into wa_itet with key message_type = 'E'.

if sy-subrc ne 0.

call function 'BAPI_PS_PRECOMMIT'

tables

et_return = etit.

call function 'BAPI_TRANSACTION_COMMIT'

exporting

wait = 'X'.

else.

call function 'BAPI_TRANSACTION_ROLLBACK'.

endif.

4 REPLIES 4
Read only

Former Member
0 Kudos
893

suzzie

you are always calling precommit after set_status.you should call only if set_status is successfull.

This is how we are calling for network status.

call function 'BAPI_PS_INITIALIZATION'.

call function 'BAPI_BUS2002_SET_STATUS'

exporting

number = network

tables

i_activity_system_status = it

e_result = itet.

read table itet into wa_itet with key message_type = 'E'.

if sy-subrc ne 0.

call function 'BAPI_PS_PRECOMMIT'

tables

et_return = etit.

call function 'BAPI_TRANSACTION_COMMIT'

exporting

wait = 'X'.

else.

  • MOVE wa_itet-message_text TO wa_error_tab-message_text.

*

  • wa_error_tab-key1 = network.

  • wa_error_tab-key2 = wa_itet-objectkey+12(4).

  • wa_error_tab-object_type = c_activity.

  • APPEND wa_error_tab TO e_error_tab.

endif.

Read only

0 Kudos
893

Thank you Vievek,

I added thet code to check message type for E, A, X as my message type returned was 'X' after "set status" and if it is not any of these only then I am precommitting. Unfortunately, I could not still resolve the issue.

Read only

0 Kudos
893

Message type "X" means Short Dump.

So you are getting error in "BAPI_BUS2054_SET_STATUS" itself.

try using CONVERSION_EXIT_ABPSN_INPUT on WBS ID before passing to WBS_ELEMENT

Read only

Former Member
0 Kudos
894

U need to use RollBack option. use the BAPI "call function 'BAPI_TRANSACTION_ROLLBACK'." as below.

call function 'BAPI_PS_INITIALIZATION'.

call function 'BAPI_BUS2002_SET_STATUS'

exporting

number = network

tables

i_activity_system_status = it

e_result = itet.

read table itet into wa_itet with key message_type = 'E'.

if sy-subrc ne 0.

call function 'BAPI_PS_PRECOMMIT'

tables

et_return = etit.

call function 'BAPI_TRANSACTION_COMMIT'

exporting

wait = 'X'.

else.

call function 'BAPI_TRANSACTION_ROLLBACK'.

endif.