Skip to Content
author's profile photo Former Member
Former Member

short dump Error in BAPI_BUS2054_SET_STATUS

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

Error in BAPI_BUS2054_SET_STATUS

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 06:58 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 24, 2008 at 04:30 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.