Application Development and Automation 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: 
Read only

BAPI_BUS2001_SET_STATUS

Former Member
0 Likes
4,094

Hi,

I ' ve been trying to change the project status, the only bapi i found out is BAPI_BUS2001_SET_STATUS... but when i test it from se37 trx and complete the parameters after the execution it says "Imposible treatment because of incorrect initialization. The function wasn't executed"

Do you have any solution?

Thanks!

9 REPLIES 9
Read only

Former Member
0 Likes
2,488

Hi

<b>Please read the documentation of the BAPI - BAPI_BUS2001_SET_STATUS before implementing it in the system. This is a must.</b>

Here is the docuementtation of this BAPI.

BAPI_BUS2001_SET_STATUS
____________________________________________________
Short Text
Set/Reset Status for BUS2001 (Project Definition)

Functionality
With the BAPI BAPI_BUS2001_SET_STATUS, one system status (UNDO_SYSTEM_STATUS) and one user status (UNDO_USER_STATUS) can be revoked each time, and one system status (SET_SYSTEM_STATUS) and one user status (UNDO_USER_STATUS) can be set each time for a project definition (PROJECT_DEFINITION).

The following system statuses are supported:

'REL' Released (I0002) set
'TECO' Technically completed (I0045) set/revoke
'CLSD' Closed (I0046) set/revoke
'MDLK' Master data locked (I0065) set/revoke
'DLFL' Deletion flag (I0076) set/revoke
User statuses can be set or revoked corresponding to the status profile assigned to the project. These must be transferred into the current logon language via the key.

The processing sequence is as follows:

1. Revoke system status
2. Revoke user status
3. Set system status
4. Set user status
Even if the system/user status cannot be set/revoked, all other actions are carried out.

The inheritance of the status does not take place integrated between project and network. A change in status only has an effect on the WBS elements and not on a network that may be assigned.

The BAPI can be called repeatedly until an LUW (Logical Unit of Work) is closed with BAPI_PS_PRECOMMIT and BAPI COMMIT WORK.

Only one project or WBS element can be processed from a project.


Notes
An error message appears in the RETURN return parameter if an error occurs during processing. The messages that were generated during the process appear in the E_MESSAGE_TABLE table after being called.

Further information
For  more information, see the SAP Library under Project System -> Structures -> Project System Interfaces -> PS-EPS Interface for External Project Management Systems.

Parameters
PROJECT_DEFINITION
UNDO_SYSTEM_STATUS
UNDO_USER_STATUS
SET_SYSTEM_STATUS
SET_USER_STATUS
RETURN
E_RESULT

Exceptions
Function Group
CNIF_STATUS_2001

Hope this will help.

Please reward suitable points.

Regards

- Atul

Read only

Former Member
0 Likes
2,488

I 've readen the help before, but it didn't help...

The thing is my proyect is in system status open (ABIE. i'm log on in spanish) and i want to change it to released ( LIB.), maybe i'm completing those status in wrong way..in wich table can i found the possible states?

Read only

0 Likes
2,488

How are calling this BAPI ? could please post the code...

The statuses possible from the documentation are - 'REL','TECO','CLSD','MDLK','DLFL'...

Thanks.

Read only

0 Likes
2,488

Hi

<b>You can find the system status in the standard table - TJ02T ( It contains System status texts in all the possible langauages)</b>



ISTAT   SPRAS TXT04 TXT30      
                               
I0001   S     ABIE  Abiertos   
I0002   S     LIB.  Liberados 

Hope this will help.

Please reward suitable points.

Regards

- Atul

Read only

0 Likes
2,488

Hi

I guess these are user status, not the system status... right ?

Regards

- Atul

Read only

Former Member
0 Likes
2,488

It seems to be that it is not possible to change the status created CRTD to another...

Anybody knows another bapi that changes the system status?

For creating the project i use the bapi BAPI_PROJECTDEF_CREATE but it doesn't have an option to set the status,

thanks again!

Read only

0 Likes
2,488

Hi,

When you use BAPI_BUS2001_SET_STATUS to release the Project, You have to use in this order only.

<b>1</b>. BAPI_PS_INITIALIZATION ( "Initilize )

<b>2.</b> BAPI_BUS2001_SET_STATUS ( to set Project status)

<b>3</b>. BAPI_PS_PRECOMMIT ( "Precommit )

<b>4</b>. BAPI_TRANSACTION_COMMIT ( "Commit )

If you call these BAPIs in this order, then only you can set the status.

For more information, see the documentation of BAPI_BUS2001_SET_STATUS.

Let me know if you have any question.

Regards,

RS

Read only

Former Member
0 Likes
2,488

Hi.

By the way, the status they are talking about arent user status.. they are the transtation to spanish (TJ02T , language dependant status table).

REL release = LIBE Liberado in spanish.

CRT created = ABIE Abierto in spanis.

Read only

Former Member
0 Likes
2,488

Mariela.

For system status you have to set it in English ( 'REL' or 'REL '), even though SAP shows it in logon language ('LIBD' in spanish).

CALL FUNCTION 'BAPI_BUS2001_SET_STATUS'

EXPORTING

project_definition = codproyecto

UNDO_SYSTEM_STATUS =

UNDO_USER_STATUS =

SET_SYSTEM_STATUS = 'REL'

SET_USER_STATUS =

IMPORTING

RETURN = return

TABLES

E_RESULT = bapiresult

.