cancel
Showing results for 
Search instead for 
Did you mean: 

CRM_STATUS_CHANGE_FOR_ACTIVITY - "Deactivate Object" is not allowed

Former Member
0 Kudos
399

I am trying to use this function module to mark an IBase record as inactive.

The Parameters I am passing are:

ACTIVITY_ALLOWED

CHECK_ONLY

CLIENT 100

NO_CHECK

OBJNR 47113749F3D00667E10000000A20801E

VRGNG INAS

ZEILE

SET_CHGKZ

XNOAUTO

but i am getting the following error:

Exception ACTIVITY_NOT_ALLOWED

Message ID: BS Message number: 007

Message:

"Deactivate Object" is not allowed (<Unknown Object>)

I have debugged it and I am passing in the same code that i can see in the debug session when i run IB53! but for some reason, this does not work when i call the same function module!

has anyone come across this before???

I can set the Deletion flag fine, but i have set it as inactive!

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Fixed!

erika_schlachter
Active Participant
0 Kudos

Hi Barry,

the message long text statement is that the document has a system status which prohibits the change you are trying to do.

You can have a look first to the system statuses of your object. Than use transaction bs32, position on your INAS transaction and within the where used list check if any of the documents system statuses are in the list of the prohibited ones.

Another recomendation is to use another FM, like 'CRM_STATUS_SET_INTERN'.

Good luck,

Erika

erika_schlachter
Active Participant
0 Kudos

Hi Barry,

then welcome to CRM!

Did you see in which line the sy-subrc changed to a value greater than 0? I think it yould be a great help to see in which line the error happens.

Best regards,

Erika

Former Member
0 Kudos

Hi Erika

I have stepped through again and now i am not getting the ACTIVITY_NOT_ALLOWED error message.

It just fails to post! if I change the INAS to DELS it works fine and the Status is updated!

Thanks for your input anyway!

Former Member
0 Kudos

right....

looking at the error..

Diagnosis

The current status of object '' prohibits business transaction ''.

Procedure

To process business transaction '', you first have to change the status

of object '' to allow the transaction ''.

This gives you an overview of the system and user statuses that affect

the transaction. A transaction can only be executed if there is at least

one status that allows it and there is no status that forbids it.

Transaction analysis

This is driving me nuts!!!!

erika_schlachter
Active Participant
0 Kudos

Hi Barry,

I think that some customizing is missing in your case.

Please check in the first part of the function module the code SELECT SINGLE * FROM tj05 WHERE obtyp = iobtyp AND vrgng = vrgng. In this table the Permitted transactions per object type are stored.

An other option would be to use the CRM_ORDER_CHANGE_STATUS function module, or even the CRM_ORDER_MAINTAIN function.

Best regards,

Erika

Former Member
0 Kudos

Hi Erika

I have debugged that code and the entries are in the table TJ05.

I am not sure if I can use the other function modules to deactivate an IBase record!

I am a little new to CRM!

erika_schlachter
Active Participant
0 Kudos

Hi Barry,

I think that some customizing is missing in your case.

Please check in the first part of the function module the code SELECT SINGLE * FROM tj05 WHERE obtyp = iobtyp AND vrgng = vrgng. In this table the Permitted transactions per object type are stored.

Former Member
0 Kudos

Thank you for you prompt response.

I will check that out!

It is strange that I can manually set the flag in IB53 but the FM can't do it!