cancel
Showing results for 
Search instead for 
Did you mean: 

Solution Manager 7.1 : Get selected Status before save ?

Former Member
0 Kudos
265

Hi Gurus,

I need your help, I'm currently on solution manager 7.1, and I need to make some field mandatory for a particular status.

I'm using Implementation of BADI ORDER_SAVE method : CHECK_BEFORE_SAVE.

Description :

The user is in message incident UI, with an incident in status E0001 for example.

When the user set the status E0002 by the button Actions -> E0002 and SAVE, I want to make the specific field "FIELD1" as mandatory.

My problem :

In my implementation method, CHECK_BEFORE_SAVE, I can get only the past status (E0001) , and not the selected status (E0002).

I used for that function : CRM_ORDER_READ and CRM_ORDER_READ_OW but in table ET_STATUS, I have only the past status E0001.

Maybe I can use ABAP OO to get the status actually selected in the container UI ? I'm new in ABAP OO so I don't know how to get this value.

Thank for your help !

Al.

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor
0 Kudos

Did you try to use the usual status FMs to accessthis information, as in classic dynpro management.

Almost every such FM reads first the data buffered in memory (of the function group BSVA with FM like STATUS_CHECK  or STATUS_CHANGES_GET ) and only when not found readsz the data from database (JEST, JCDS, etc.)

Regards,

Raymond

Answers (2)

Answers (2)

Former Member
0 Kudos

HI,

for this purpose we have one badi:CRM_ORDER_STATUS,

here we have two methods:BEFORE_CHANGE

in this method you will get the staus which user want to set,

here we have one Exception also: not_allowed.

if you don't want to allow to set this status can raised Exception not_allowed

one more point this badi is filter dependent so at the time of implementation you have to add staus profile and status to whome you want to perform operation.

hope this will solve your problem.

Thanks and Regards,

Vivek Gupta

Former Member
0 Kudos

Thx you vivek,

I can now check mandatory field for selected status.

I have a different problem now, I want to change the value of a field when selected status = 'E0008', but i can't call CRM_ORDER_MAINTAIN (Dump MESSAGE TYPE X) in AFTER_CHANGE (or BEFORE_CHANGE), and can't call CRM_ORDER_MAINTAIN_SINGLE_OW too (DUMP ASSERTION_FAILED).

Former Member
0 Kudos

I'm surprised that nobody know how to get the changed status after change and before save in the method CHECK_BEFORE_SAVE of BADI ORDER_SAVE.

I think it's an important point.

Former Member
0 Kudos

Hello Al Peau,

I'm having the same issue.

Did you solve it? Could you find the select status on UI?

Tks.