Application Development 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: 

Project User status update

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

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

7 REPLIES 7

raymond_giuseppi
Active Contributor
0 Kudos

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

0 Kudos

My Return table is empty here , Any more leads pls ?

0 Kudos

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

0 Kudos

You are a life saviour . Thanks a ton.

Closing the thread as answered.

Regards,

AJ.

former_member185414
Active Contributor
0 Kudos

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.

0 Kudos

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.


0 Kudos

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.