on 08-31-2013 4:50 PM
Hello experts,
The requirement is that I need to display an error message on order save if the credit card data entered by user does not matches with 'standard' card info in BP Master data. The error message should be removed when the user takes remedial action mentioned below. I have implemented ORDER_SAVE BADI to perform checks and collect/delete error messages.
I have a button in Payment Data assignment block in Sales Order screen to read Credit Card data from current order and add it as standard card for customer BP. The button is available only in EDIT mode of Sales Order screen. This is working fine as expected.
The issue is that when I click on save button, ORDER_SAVE BADI is not getting triggered(as Order data is not getting changed). As a result the relevant error messages are not getting deleted. I tried using FM <crm_message_delete> and message container classes in button event handler method but got some authorization related error. Is there any way I can trigger ORDER_SAVE method or is there any alternate way to delete error message?
Regards,
Amit
I found a workaround to trigger ORDER_SAVE BADI.
Option 1 - Create a custom attribute in ORDERADM_H BO and set the attribute value in SAVE method.
Option 2 - CRMD_ORDERADM_H already has dummy field which can be considered for setting in SAVE method.
I used option 2 because the field ORDERADM_H_DUMMY was not used anywhere. The BADI is getting triggered and messages are also getting deleted now.
Regards,
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
how are you editing ur bp data from ur order?
i had similar requirment for very few fields on BP to be editated from order it self. I created my own small component and add it in BT125H_TASK ( as i was working with activity ).
Provide us some more techincal things for the same....
make sure you do locking entity properly...
CALL METHOD SUPER->DO_PREPARE_OUTPUT.
DATA : LR_BUILHEADER TYPE REF TO CL_CRM_BOL_ENTITY.
DATA : LR_ADMINH TYPE REF TO CL_CRM_BOL_ENTITY.
LR_BUILHEADER ?= ME->TYPED_CONTEXT->BUILHEADER->COLLECTION_WRAPPER->GET_CURRENT( ).
IF LR_BUILHEADER IS BOUND.
IF LR_BUILHEADER->IS_LOCKED( ) = 'X'.
ELSE.
LR_ADMINH ?= ME->TYPED_CONTEXT->BTADMINH->COLLECTION_WRAPPER->GET_CURRENT( ).
IF LR_ADMINH->IS_LOCKED( ) = 'X'.
LR_BUILHEADER->LOCK( ).
ENDIF.
ENDIF.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
im not sure if its useful to you but i had similar issue with ORDER_SAVE BADI and crm_message_delete. after so many discussion with functional team as well as BASIS guys nothing much concluded and finally i implemented implicit enhancements in PAI of order save screen itself which went fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
Is your issue solved?
I hope you have all the three methods of order_save Badi
CHANGE_BEFORE_UPDATE
PREPARE
CHECK_BEFORE_SAVE
If still it is not getting triggered. Can you check when you only edit payment data assignment block, do your functional spec have any specific pre- requisite. If yes, check if you can use PPF action methods.
I tried editing Billing Assignment block on Service contract and saved. Order_save badi gets triggered for me. Is that your custom button??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
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.