10-29-2015 12:27 PM
Hello experts - I am using the following BAPI's inorder to update the project user status.
CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
CALL FUNCTION 'BAPI_BUS2001_SET_STATUS'
CALL FUNCTION 'BAPI_PS_PRECOMMIT'
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
I am getting subrc 0 after execution of CALL FUNCTION 'BAPI_BUS2001_SET_STATUS' , But getting a dump in BAPI_PS_PRECOMMIT .
From ST22 , I could see the pointer is on the redline .
The termination occurred in ABAP program "SAPLPS_BAPI", in "CHK_PRECOMMIT".The main program was "RS_TESTFRAME_CALL".
FORM chk_precommit.
DATA: chk_precommit_ok TYPE c,
chk_error type c.
CALL FUNCTION 'PS_FLAG_GET_GLOBAL_FLAGS'
IMPORTING
e_precommit_ok = chk_precommit_ok
e_error = chk_error.
IF chk_precommit_ok = space.
* Precommit wurde noch nicht aufgerufen.
MESSAGE x030(cnif_pi).
ELSEIF chk_precommit_ok <> 'Y'.
* Precommit wurde nicht erfolgreich durchlaufen.
MESSAGE x033(cnif_pi).
elseif not chk_error is initial.
* At least one single BAPI failed
MESSAGE x056(cnif_pi).
ENDIF.
Any idea on how to get rid of this ?
Thanks,
Arun.
10-29-2015 12:47 PM
You are using BAPI so a
I am getting subrc 0 after execution of CALL FUNCTION 'BAPI_BUS2001_SET_STATUS'
is not relevant, don't check sy-subrc but analyze RETURN table for any error message (TYPE = 'E' or 'A') at each level that returns it so BAPI + PRE COMMIT + COMMIT (if WAIT) and don't execute next step in this case.
Regards,
Raymond
10-29-2015 12:47 PM
You are using BAPI so a
I am getting subrc 0 after execution of CALL FUNCTION 'BAPI_BUS2001_SET_STATUS'
is not relevant, don't check sy-subrc but analyze RETURN table for any error message (TYPE = 'E' or 'A') at each level that returns it so BAPI + PRE COMMIT + COMMIT (if WAIT) and don't execute next step in this case.
Regards,
Raymond
10-30-2015 4:16 AM
10-30-2015 7:19 AM
Read 1901102 - Short dump MESSAGE_TYPE_X , this error is usually raised when sequence of call is not correct.
Hint: Also look at returned table E_RESULT too for more information than single record in RETURN parameter (this is not a table parameter in BAPI_BUS2001_SET_STATUS definition)
Regards,
Raymond
10-30-2015 9:00 AM
You are a life saviour . Thanks a ton.
Closing the thread as answered.
Regards,
AJ.
10-29-2015 1:05 PM
Hello Arun,
As suggested by Raymond, check the return table of all the BAPIs. It may be a configuration issue which does not allow to change the status of a project user. Also have you tried manually to change the status of a project user.
BR.
10-30-2015 4:18 AM
I am able to change the values in Front end but not through BAPI , My return table is empty and subrc is 0 after the BAPI call 'BAPI_BUS2001_SET_STATUS'.
Thanks,
AJ.
10-30-2015 5:15 AM
AFAIK, BAPIs only simulate what has been configured meaning if you can change via GUI/T-code then you can change via BAPIs also. So you may be missing out some BAPI/FM. I am not sure about exact BAPI/FM but one more check you can do is to Test all the BAPI's in sequence in SE37 and see if you are successful there.
I still think you are missing call to some BAPI/FM in your codebase and should re-check once the entire Function Group.
BR.