Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

To Set the user Status RCOG in WBS Element

Hello Experts,

I am trying to set the user status RCOG in WBS Element.

My requirement is calculation of POC and automatic setting the user status RCOG in WBS Element.

Please suggest me the solution. IF BAPI is helpful, then which one and in which sequence to be used.

I tried to use the following mentioned BAPIs but not getting the proper output.

Is it necessary to initialize the BAPI before using BAPI's

BAPI_BUS2054_GET_STATUS

BAPI_BUS2054_SET_STATUS

Thanks.

Swati.

Tags:
replied

Hello Swati,

Please try these in the following sequence.

IF NOT it_wbs_user_status[] IS INITIAL.

CLEAR l_return.

REFRESH lt_e_result.

  • call BAPI

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 .

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

  • EXPORTING

  • WAIT =

  • IMPORTING

  • RETURN =

Regards,

Rajat

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question