on 09-03-2012 6:05 PM
Hi,
Im doing some modifications to a order using a custom action, that invokes a method call.
This method is changing the system and the user status to a "disabled status".
This disabled status does not allow the "change document" transaction so the user cannot change anything in the order.
Im currently using the following functions/methods:
Basicly i want to disable edit mode when i click on the action.
At this moment if i click on the action, the input fields remain visible. But if i leave the order (Back button says the object is not saved so i either save or leave without saving (the result is the same) ) and enter again on the order, the fields are disabled and edit mode is not allowed.
Any suggestion?
I have tried to change "register for save" with CRM_STATUS_CHANGE" in terms of execution order but the result is equivalent.
Thanks for the replies
my logic seems fine to our business scenario the real problem is that the screen is not getting updated on action click (im using SAP CRMD_ORDER UI).
I am clicking on the action, and invoking my method call. The Screen remains the same (Message "Action Performed" appears) but this action changed the document to a disabled state (the input fields are still editable because the screen wasnt updated).
If i leave the transaction and enter on it again the screen shows the data up to date
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use BAdI CRM_ORDER Method ENQUEUE to prevent the change of the order by your own logic.
Here you can check system or user status for example. To set a specific status - you can use an action or BAdI ORDER_SAVE.
By the way, if you are working with WebUI - you should not execute any commit work at all.
Use the BOL to save changes:
DATA: lr_core TYPE REF TO cl_crm_bol_core,
lr_entity TYPE REF TO cl_crm_bol_entity,
lr_tx TYPE REF TO if_bol_transaction_context.
lr_entity ?= me->typed_context->btadmini->collection_wrapper->get_current( ).
lr_tx ?= lr_entity->get_transaction( ).
IF lr_tx IS NOT BOUND.
lr_core = cl_crm_bol_core=>get_instance( ).
lr_tx = lr_core->begin_transaction( ).
ELSE.
IF lr_tx->check_save_possible( ) = abap_true.
CHECK lr_tx->save( ) EQ abap_true.
lr_tx->commit( ).
ENDIF.
ENDIF.
me->view_group_context->reset( ).
br
Jürgen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Felipe,
try to call FM CRM_ORDER_SAVE after calling FM CRM_STATUS_CHANGE_EXTERN_OW and before call BAPI_TRANSACTION_COMMIT.
hopes it helps
cheers
eddhie kurnianto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Filipe ,
You can use CRM_ORDER_MAINTAIN to change user status . If system status is related to the user status then you need not change it explicitly. You can remove change_extern FM and directly use CRM_ORDER_SAVE ,unless your action doesn't not trigger on save condition .
Regards,
Nithish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.