on 01-18-2007 12:30 AM
Hi All,
I am trying to set WBS status (system/user) from CRTD to REL using BAPI_BUS2054_SET_STATUS. Basically I am adding WBS to existing project. But I am getting short dump during 'BAPI_PS_PRECOMMIT'. My program sequence goes like this
CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
CALL FUNCTION 'BAPI_PS_PRECOMMIT'
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
CALL FUNCTION 'BAPI_BUS2054_GET_STATUS'
CALL FUNCTION 'BAPI_BUS2054_SET_STATUS'
CALL FUNCTION 'BAPI_PS_PRECOMMIT'
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
I could not use BAPI in order suggested
BAPI_PS_INITIALIZATION
BAPI_BUS2054_CREATE_MULTI
BAPI_BUS2054_GET_STATUS
BAPI_BUS2054_SET_STATUS (To set the status at WBS element level)
BAPI_PS_PRECOMMIT
In this sequence could not see newly created WBS when I call BAPI_BUS2054_GET_STATUS.
Any clue or suggestions welcome. Thanks in advance.
Regards,
Trim
Hi,
Call BAPI_TRANSACTION_COMMIT after BAPI_BUS2054_CREATE_MULTI.
Regards
Subramanian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Subramanian,
I am calling CALL FUNCTION 'BAPI_PS_PRECOMMIT' ->
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' after
BAPI_BUS2054_CREATE_MULTI.
Below sequence what i have used.
CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
CALL FUNCTION 'BAPI_PS_PRECOMMIT'
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
CALL FUNCTION 'BAPI_BUS2054_GET_STATUS'
CALL FUNCTION 'BAPI_BUS2054_SET_STATUS'
CALL FUNCTION 'BAPI_PS_PRECOMMIT'
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
Hello Trim ,
This is a good thread . But i am still facing the issue in changing the status of WBS element using the flow that you have discussed above .
My requirement is as below
System status is currently DLFL
User status is CLSA
i need to change both the status to CLSD .
What i am trying to do ?
I am trying to call the BAPI in the sequence
call function 'BAPI_PS_INITIALIZATION'.
call function 'BAPI_BUS2054_CREATE_MULTI'
call function 'BAPI_BUS2054_GET_STATUS'
After getting status i change the values and pass the value of Set Status as CLSD
I filled the tables that we are passing for system status and User Status with below entries
System status values that i provide
WBS element Undo Set
1 | C0315RXZ2SXXX | DLFL | CLSD |
User status values will be same accept the undo user will have CLSA .
call function 'BAPI_BUS2054_SET_STATUS'
The BAPI set status give me and error as below .
C-0315-RX-Z2-SXX | U | User | CNIF_STATUS | 006 | I | Error in processing. Function was partially executed. |
C-0315-RX-Z2-SXX | U | User | BS | 036 | E | User status clsa must not be deleted |
C-0315-RX-Z2-SXX | S | User | CNIF_STATUS | 000 | E | Setting status CLSD not supported for object C-0315-R2-Z2-S003 |
i tried to debugg inside but the code that is written in the BAPI contradicts my inputs .
So i feel i am going some where wrong in the sequence or data that i am providing .
Can you please guide me ?
Also, in your code no need to call 'BAPI_TRANSACTION_COMMIT' becuase you are going to write COMMIT WORK.
Thanks,
Santosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I faced similar problem earlier and it was resolved by reading following documentation:
Notes:
Notes
1. Definition "Processing Unit"
In the following, the term "Processing unit" refers to a series of related processing steps.
The first step in a processing unit is initialization, which is done by calling the BAPI BAPI_PS_INITIALIZATION.
Afterwards, the individual BAPIs listed below can be used several times, if required.
The processing unit ends when the final precommit (call BAPI BAPI_PS_PRECOMMIT) is executed with a subsequent COMMIT WORK (for example, the statement COMMIT WORK, the BAPI "BAPI_TRANSACTION_COMMIT" or the BapiService.TransactionCommit method).
After the final COMMIT WORK, the next initialization opens a new processing unit via the BAPI "BAPI_PS_INITIALIZATION".
In principal, the following applies to each individual processing unit.
2. Creation of a Processing Unit
Each processing unit must be initialized by calling the BAPI "BAPI_PS_INITIALIZATION" once.
Afterwards, the following individual BAPIs can be used within a processing unit - they can also be used more than once, taking into account the "One-Project Principle" explained below. This also means that an object created in the current processing unit by a CREATE-BAPI can be changed by a CHANGE-BAPI or STATUS-BAPI.
Except for the BAPIs explicitly named below, you can only call up BAPIs that execute GET methods or READ methods only. In particular, the BAPIs for confirming a network may not be used with the individual BAPIs named below.
<b>Therefore in your issue, after calling BAPI_PS_PRECOMMIT you must call subsequent COMMIT WORK.</b>
Thanks,
Santosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks guy's it's working. I was doing in wrong sequence. Now what i got is
BAPI_PS_INITIALIZATION
BAPI_BUS2054_CREATE_MULTI
BAPI_BUS2054_GET_STATUS
BAPI_BUS2054_SET_STATUS
BAPI_PS_PRECOMMIT
BAPI_TRANSACTION_COMMIT
My mistake i had BAPI_PS_INITIALIZATION before SET_STATUS which was causing all problem. Any way now done. Thanks a lot for your help.
Regards,
Trim
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.